#dev 2024-01-07

2024-01-07 UTC
#
sknebel
what is custom emoji?
#
Loqi
It looks like we don't have a page for "custom emoji" yet. Would you like to create it? (Or just say "custom emoji is ____", a sentence describing the term)
#
sknebel
Custom emoji are "picture characters" just like [[emoji]], but not from the standard unicode set but rather custom/user-provided.
#
sknebel
custom Emoji << silo examples: Twitch, Slack, Discord
#
Loqi
ok, I added "silo examples: Twitch, Slack, Discord" to a new "See Also" section of /custom_emoji https://indieweb.org/wiki/index.php?diff=92003&oldid=92002
#
sknebel
[manton] I'm curious, does micro.blog do anything with custom emoji from the Fediverse?
#
[tantek]
sknebel does the Fediverse have a FEP for that?
#
sknebel
no idea
#
sknebel
it might predate FEPs being a thing even (and I honestly have no idea how many of the implementers care about FEPs)
#
[tantek]
on another topic, does anyone care about replacing Markdown or is that a "don't care" or "please don't" topic for folks here? IndieWeb relevance is of course easier richly styled note authoring. I'm getting close to a general outline and a figuring out a lot of the details
#
[tantek]
and yes, I realize it has to be much better (not just a little) than Markdown to motivate folks to switch
#
[tantek]
ah I see custom emoji are a Mastodon AS2 extension before FEPs were a thing
#
sknebel
no idea if mastodon initially came up with it or someone else, but yes, quite "old" in relative terms
angelo joined the channel
#
sknebel
and widely supported
#
[tantek]
custom emoji << Twitter popularized custom emoji starting in 2014 <blockquote>In 2014, Twitter introduced hashflags, special hashtags that automatically generate a custom emoji next to them for a certain period of time. Hashflags may be generated by Twitter themselves or be purchased by corporations.</blockquote> — https://en.wikipedia.org/wiki/Twitter#Posts. It's likely that Mastodon got the idea (like most of Mastodon's UI) from Twitter.
#
Loqi
ok, I added "Twitter popularized custom emoji starting in 2014 <blockquote>In 2014, Twitter introduced hashflags, special hashtags that automatically generate a custom emoji next to them for a certain period of time. Hashflags may be generated by Twitter themselves or be purchased by corporations.</blockquote> — https://en.wikipedia.org/wiki/Twitter#Posts. It's likely that Mastodon got the idea (like most of Mastodon's UI) from Twitter." to the "See Also" section of /custom_emoji https://indieweb.org/wiki/index.php?diff=92017&oldid=92016
#
sknebel
I kinda doubt that. they are pretty much identical in use custom emoji in slack, discord, twitch, ..., which is not that weird "use our ad-sponsored hashtag and show an icon on the hashtag" from twitter
#
sknebel
also if only one global authority can add them they are hardly "custom"
#
sknebel
the per-community thing is a big part of it
#
[tantek]
Others can add them, for a few
bterry1, Fisher24459951 and jacky joined the channel
#
s​tarrwulfe
If anyone more technical than me can give this post I made a look:
#
s​tarrwulfe
I'm wondering if what I'd like to do is even possible... What technology stacks should I start investigating?
#
Loqi
[preview] [starrwulfe] Let me get right to the point:I want a way to use my space on Craft.do as a blog. I love using Craft as my space to outline and organize and it ticks all the boxes Tantek raises about capturing all the thoughts surrounding a good post first, then pub...
#
s​tarrwulfe
real_devastatia[d] capjamesg[d] ⬆️ thats what I was alluding to earlier ⬆️
kubie joined the channel; kubie left the channel
#
sknebel
starrwulfe: in theory that could be done, either as a sort of proxy or as something that on command converts pages to differently-formatted HTML and publishes them somewhere
#
sknebel
it seems craft.do doesnt have an API, so one would have to do it entirely through their frontend, which is always a bit risky with unexpected changes, being blocked as a "bot", ...
jonnybarnes and barnaby joined the channel
#
s​tarrwulfe
Ahh but there is an API:
#
IWDiscord
<s​tarrwulfe#0>
#
s​tarrwulfe
There are extensions known as CraftX extensions that hook in and use the api to publish straight to Ghost and Medium or bring files into Ulysses and iA Writer for example. If I can build off those to engineer in the same manner, then it may be doable.
#
s​tarrwulfe
There’s also this project using Notion’s API that I’ll fork and dig into to see if I can find a way to do everything in CraftDoc as it’s doing with Notion:
#
IWDiscord
<s​tarrwulfe#0>
#
Loqi
[preview] [izuolan] notionic: Notion + Craft.do + Next.js = Notionic
petermolnar joined the channel
#
d​arylsun
Did something happen to IndieLogin?
#
d​arylsun
Apparently PGP is disabled now? But it can't detect my email address either???
#
d​arylsun
Never mind, I think I forgot to put my email in the header for my homepage
gRegorLove_ joined the channel
#
d​arylsun
Hmmm, still not working...
[jeremycherfas], jacky and [jacky] joined the channel
#
r​eal_devastatia
starrwulfe[d]: A CMS stores the page content and metadata in a database. It's a relatively simple matter to retrieve that data to generate an RSS feed.
#
r​eal_devastatia
I'm not familiar with CraftDocs or any of the other tools because I've always coded everything from scratch except when I worked on my former employer's custom CMS.
#
r​eal_devastatia
Your question about sub-sites sounds like what we called sections in Web MVC (model-view-controller). There are separate Controller classes for each section of an MVC website.
#
r​eal_devastatia
I don't like building hierarchies of Controllers because a controller is just a glorified switch statement.
#
r​eal_devastatia
[tantek]: What app are you considering converting to/from Markdown? I don't like Markdown personally, especially when used on forums. vbCode (aka bbCode, MyCode, etc.) has been used on forums for decades, and that's what forum users are familiar with. Being forced to use Markdown instead trips me up.
#
c​apjamesg
[tantek] If you can make something simpler than markdown, with less weird hidden things you don't know apply (I recall there being something about two spaces at the end of a line doing something. I can't remember.), it's worth a think!
#
r​eal_devastatia
starrwulfe[d] "These probably mean some sort of database and parsing engines would need to be running at set intervals to parse the CraftDocs..."
#
r​eal_devastatia
You may have to resort to a periodic cron job, but ideally there would be hooks in the CMS that allow you to do those things when you publish the page.
#
c​apjamesg
I like markdown, but I only use a small subset of it in publishing. I use headings, italics, images, and occasionally bold text. Sometimes I use other things, but so rarely they aren't coming to mind right now.
#
Zegnat
capjamesg: two spaces gives a linebreak. As Markdown by de
#
Zegnat
by default allows soft wrapping and does not add linebreaks when you put a linebreak in your plain text
#
Zegnat
(sorry, accidental enter)
#
r​eal_devastatia
My backend parser parses pages in two different ways. It renders one version with JS clickables because they're required for the SPA site. It renders another straight HTML version for my RSS feed.
#
c​apjamesg
The fact that I can say "## title" with markdown, for example, is amazing, rather than say <h2>title</h2> as I would in HTML.
#
c​apjamesg
The more out of the way my writing markup can be, the better.
#
c​apjamesg
Oh, and I use links.
#
c​apjamesg
Out of ReST (which I don't like), markdown, and MediaWiki, markdown is my favourite for links.
#
c​apjamesg
I forget which order links go in for MediaWiki almost every time I add a link (and I have been using the software for years).
#
c​apjamesg
(is it link then text or text then link?)
#
c​apjamesg
Zegnat++
#
Loqi
Zegnat has 8 karma in this channel over the last year (18 in all channels)
#
Zegnat
I have the same problem with MediaWiki link syntax, hahaha. And then the difference between internal and external links. Not just [ vs [[, but also whether you split link and text with | or space...
#
Loqi
rofl
#
Zegnat
I like the idea of ReST a lot. Just wish it was more widely available. Hard to say whether I would prefer it over Markdown or not now, when I cannot use it in many places.
#
r​eal_devastatia
capjamesg[d]: The only headline tag I use is <h1>, and that's for page titles. The page skeleton containing the <h1> tag is automatically generated when I create a new page, and the <h1> content is inserted automatically populated when I type the article title into the title field.
#
r​eal_devastatia
[edit] capjamesg[d]: The only headline tag I use is <h1>, and that's for page titles. The page skeleton containing the <h1> tag is automatically generated when I create a new page, and the <h1> content is automatically populated when I type the article title into the title field.
#
r​eal_devastatia
Oh, and the volume headers on my front page are <h3>, but I only have to add one of those once a year.
#
r​eal_devastatia
Here's some fun. Have a text input for the title and a textarea for the content. Have an empty <h1> tagset in the content field. Watch the title in the content magically fill itself in as you type in the page title.
#
r​eal_devastatia
function initTitleField()
#
r​eal_devastatia
function keyup()
#
IWDiscord
<r​eal_devastatia#0>
#
r​eal_devastatia
{
#
r​eal_devastatia
{
#
r​eal_devastatia
var bodyField = document.getElementById('edit-content-field');
#
r​eal_devastatia
var titleField = document.getElementById('edit-title-field');
#
r​eal_devastatia
bodyField.value = bodyField.value.replace(/<h1>.*<\/h1>/i, '<h1>' + titleField.value + '</h1>');
#
r​eal_devastatia
} // keyup
#
IWDiscord
<r​eal_devastatia#0>
#
r​eal_devastatia
with (document.getElementById('edit-title-field')) {
#
r​eal_devastatia
removeEventListener('keyup', keyup);
#
r​eal_devastatia
addEventListener('keyup', keyup);
jacky joined the channel
#
[tantek]
real_devastatia: (nearly) all of them. There may be some obscure uses of Markdown out there that require its complexity but I'm ok blowing those off (which should probably "just" use HTML anyway)
#
[tantek]
capjamesg, MUCH simpler. I agree with your complaints about Markdown
[snarfed] and jacky joined the channel
#
[tantek]
Thanks for sharing the subset / use cases of Markdown you find useful. It's likely I will leave out a bunch of Markdown's more esoteric / complex features for the trade off for a simpler and easier to remember syntax
[KevinMarks] joined the channel
#
[KevinMarks]
Markdown still can't nest lists reliably
#
[tantek]
capjamesg, re: which order links go, this is one of the big papercuts in Markdown that motivated me to start this project years ago
#
[tantek]
MediaWiki markup is weird enough that it doesn't really pretend to be plain-text readable (it isn't IMO)
#
[tantek]
[KevinMarks] interesting I thought they'd solved that but I’m interested in plaintext nested lists examples / usecases that screw up Markdown
#
c​apjamesg
Almost every time I want to make a table, for example, I use HTML.
geoffo joined the channel
#
[tantek]
Tables are hard capjamesg. I haven't seen many good plaintext examples that "just work"
#
c​apjamesg
> doesn't really pretend to be plain-text readable (it isn't IMO)
#
c​apjamesg
Yeah, but it is difficult to author.
#
IWDiscord
<c​apjamesg#0>
#
[tantek]
I haven't solved tables yet but I'm open to it
#
c​apjamesg
(links in particular)
#
[tantek]
Markdown very much pretends to be plaintext readable from the very first paragraph of its inventing description. I have the citations
#
[tantek]
And yes Markdown messed that up with quite quickly with links, image, and more
#
c​apjamesg
Irrespective of that, I don't think a lot of people authoring markdown are publishing it raw.
#
[tantek]
This was a big motivation for coming up with a replacement for it
#
[KevinMarks]
Tables without colspan aren't too bad, but interpreting tab separated on paste is the main win
#
[tantek]
Markdown itself went against its primary design principle
#
c​apjamesg
Rather, they write markdown knowing it is going to be presented.
#
c​apjamesg
I love how a "markdown guide" admits "Creating tables with hyphens and pipes can be tedious." 😄
#
[tantek]
Which is why there's an opportunity to replace it. That's extra cognitive load we can eliminate "writing knowing it is going to be 'presented'" AKA rewritten/reformatted
#
c​apjamesg
That is maybe a problem for another day, though. Tables are _hard_.
#
[tantek]
Yes Tables I’m putting on for now
#
[KevinMarks]
There's a lot of duelling markdown in fediverse as some tools do it (correctly imo) on input text, and some on posted text. AP is defined as html, but treating is as markdown is a thing some clients do
#
[tantek]
Lol even that guide has them in "extended syntax". Tables were not a Markdown v1 thing
#
[KevinMarks]
They're useful in github issues etc
#
c​apjamesg
Yes. I haven't used most of the features in that guide. I didn't even know a lot of them existed.
#
[tantek]
[KevinMarks] great example of dueling use or non-use of MD in clients. That's what I'm talking about capjamesg. There are cross site/app uses where you don't know if text you enter will be screwed up my markdown or not
#
[KevinMarks]
I tend to move tables through Google sheets before emailing them via Gmail, as they have wrangled the outlook interop
#
r​eal_devastatia
[tantek]: Typing HTML for tables is tedious.
#
[tantek]
real_devastatia, having typed many HTML tables, I agree
to2ds joined the channel
#
to2ds
I have one page that uses Markdown for an HTML table, and I think it might have been easier to just use the HTML tags instead.
#
[KevinMarks]
It isn't if you type html rather than xhtml - <td> is self closing as is <tr>
#
[tantek]
Yet exactly that to2ds
#
[tantek]
[KevinMarks] it's still annoying compared to say using tabs for columns for example :)
#
[tantek]
And line breaks for rows
#
r​eal_devastatia
I don't self-close tagsets that have closing tags.
#
[KevinMarks]
Sure, but replacing \n with <tr><td> and \t with <td> gets you most of the way
#
c​apjamesg
[tantek] Was your timeline graph that you showed at HWC a table?
#
c​apjamesg
I think about that graph a lot.
#
c​apjamesg
It is one of my favourite pieces of HTML.
#
[tantek]
capjamesg yes
#
[tantek]
A very carefully written table that is likely too complex and too fragile to update unless you really understand what it is doing
#
[tantek]
I’m proud of the presentation of it, not the code
#
c​apjamesg
Yeah. I think there should be some kind of generator for it.
#
r​eal_devastatia
I found a flexbox widget that creates an org chart from nested lists. The problem I keep having with flexbox-based widgets though is that they break when used in a flexbox page layout.
#
[KevinMarks]
Tables with svg in some elements can be good
#
c​apjamesg
I thought "web component!" to help make authoring easier, but then you'd need JS and you miss part of the magic.
#
[KevinMarks]
This is where I go mad in nunjucks or jinja2
#
c​apjamesg
jinja2++
#
Loqi
jinja2 has 2 karma over the last year
#
[tantek]
I also dislike template language but that's another conversation
#
[tantek]
languages*
#
[tantek]
I believe I have broken down the relevant use-cases to: text styling, auto-linking, hyperlinking and other attributes (e.g. alt text), and block styling (headings, lists, paragraphs, block quotes). Leaving out table styling for now
#
c​apjamesg
I like templating languages but I have seen them used poorly.
#
r​eal_devastatia
Google "mark turanksy better javascript templates". It uses pure JS like ASP, not a template language.
#
[tantek]
I will look at the specific use-cases mentioned above and make sure those categories cover them
#
c​apjamesg
When it is hard to know if main app logic or templating logic is controlling something, you have a problem.
#
[KevinMarks]
I know what you mean, but trying to do iteration without explicit declarative tooling I'd hard
#
[tantek]
Anyway I’m solving the markdown problem first and am procrastinating on the template language problem
#
c​apjamesg
oneproblematatime++
#
Loqi
oneproblematatime has 1 karma over the last year
#
[KevinMarks]
Mavo is the closest I've seen to making it html native, and the separation of templating macros ends up being tjeb lesser evil a lot of the time
#
[tantek]
[KevinMarks] did Mavo get any uptake beyond the author?
#
[KevinMarks]
I'm not sure. I think it did fall between the server and client models
#
[KevinMarks]
My pov is that if Lea, who knows much more about the domain than I do, and is a star at api and design can't square that circle, it may be too hard
#
r​eal_devastatia
Turansky says you have to put the templates in textareas, but I ship disallowed stuff in JSON by base64 encoding it on the server and decoding it in the client.
#
c​apjamesg
I admire the work Lea did on Mavo.
#
[tantek]
Lea has designed something that makes total sense for her, but she may have overoptimized. Super experts have a tendency to sometimes do that without realizing it
#
rubenwardy
missed the conversation a bit but... I switched from Markdown to ASCIIDoc for writing my book as Markdown just doesn't have the features I need. Like admonitions
#
[tantek]
capjamesg I also admire the work out into Mavo, to be clear. LOTS of cleverness in it
#
rubenwardy
my blog still uses Markdown though
#
[KevinMarks]
Conditionals and iterating are the tricky parts of templating
#
[tantek]
admonitions?!?
#
c​apjamesg
GitHub has them.
#
c​apjamesg
But they aren’t standard.
#
c​apjamesg
And they are poorly documented.
#
[tantek]
I see blogs that have been migrated from one platform to another showing Markdown garbage punctuation in posts
[Jo] joined the channel
#
[tantek]
Was admonition a typo or what is that rubenwardy?
#
r​eal_devastatia
[KevinMarks]: Scroll up and click? lol
#
rubenwardy
TIP, WARNING, IMPORTANT
#
c​apjamesg
[tantek] it is basically a callout box.
#
[tantek]
Lol [!note] is better than <note> how?
#
c​apjamesg
Yeah. I forget the syntax all the time.
#
[tantek]
That's ridiculous
#
[tantek]
It's worse than HTML
#
c​apjamesg
Agreed.
#
r​eal_devastatia
I feel like I'm shadow banned in here. See you folks later! lol
#
[tantek]
Truly demonstrates Markdown folks losing it
#
c​apjamesg
real_devastatia[d] Nooo! 😅
#
[tantek]
You're not real_devastatia!
#
[tantek]
You can always check the logs to see if posts are making it through
#
rubenwardy
anyway, Markdown isn't a standard in itself, the introducing document isn't an exact specification. There's so many different implementations. I recommend CommonMark or GitHub Flavoured Markdown (GFM)
#
c​apjamesg
The syntax reminds me of Ruby real_devastatia[d].
#
c​apjamesg
Wait…
#
c​apjamesg
What is it called. ERB?
#
rubenwardy
<+[tantek]> Lol [!note] is better than <note> how?
#
rubenwardy
It can't be confused with HTML, for one
[capjamesg] joined the channel
#
[tantek]
real_devastatia, I agree on your points about vbCode, bbCode, MyCode (TIL)
#
[tantek]
rubenwardy, the point being since markdown allows HTML, if you're (the general you) willing to pollute your doc with "[!note]" then might as well use <p class="note">
#
[tantek]
That being said, I do like the inline admonition syntax in https://docs.asciidoctor.org/asciidoc/latest/blocks/admonitions/ because it is literally "just" text with the use of ALLCAPS to communicate the admonition! I bet that solve like 90% of use-cases
#
rubenwardy
you can't include markdown inside html blocks (unless it's inline)
#
[tantek]
NOTE: this is an informative (non-normative) note that does not impact spec compliance
#
[tantek]
That part is fine and I may copy that if there's a demand for it
#
rubenwardy
yeah. ASCIIDoc is just more flexible (at the cost of being a bit finicky
#
rubenwardy
can have plugins as well I believe
#
rubenwardy
in my Markdown version, I used liquid for callouts
#
[tantek]
Their block formatting is kinda horrible to read tho
#
rubenwardy
{% include warning.html note=warnings.thing %}
geskeca joined the channel
#
Zegnat
I prefered ReST over AsciiDoc for extensions, last time I checked. But no idea how AsciiDoc has evolved now.
#
Zegnat
ReST also has a syntax for callouts, and also calls them admonitions. Anyone know where that term came from?
jacky joined the channel
#
[tantek]
I don't believe a plain text format should have extensions--
#
Loqi
extensions has -1 karma over the last year
#
rubenwardy
It's very useful when writing a book as it gives you more customisation over how it's formatted
#
[tantek]
Book formatting needs are next level
#
rubenwardy
For my blog, I've used "extensions" (well, custom liquid tags and includes) to have:
#
rubenwardy
- figures and galleries
#
rubenwardy
- embed cards (links that show the OpenGraph title and image)
#
rubenwardy
- youtube embed
#
rubenwardy
my figure extension automatically generates optimised thumbnails
#
[tantek]
What is liquid?
#
Loqi
Liquid is an open source templating language developed by Shopify https://indieweb.org/Liquid
#
[tantek]
Ah yeah templates are very different from plaintext formatting
#
rubenwardy
it's a markdown file though
#
rubenwardy
just with `{% figure "./image.png", "An image" %}` sprinkled around
#
rubenwardy
there is a way I could extend the markdown parser to turn automatically turn images on their own into figures, but I wanted the ability to have different alts to captions
jacky and geoffo joined the channel
#
[tantek]
I think figures with alts and captions could be done without template pollution. I'll think on this a bit. I have some ideas
geskeca joined the channel
#
rubenwardy
I could make it so `![alt](src)\nCaption` works
#
rubenwardy
but that requires messing with the markdown parser
[Paul_Robert_Ll] joined the channel
#
[Paul_Robert_Ll]
I use this plugin for markdown it (there are others that do similar): https://www.npmjs.com/package/markdown-it-image-figures
#
[Paul_Robert_Ll]
Personally, I think Markdown (or CommonMark) could do with redefining the syntax for images with titles to be images with figure captions.
#
[tantek]
Markdown image syntax is a lost cause of punctuation pollution. No good to be had there
#
[tantek]
I have already dumped that for more plain text friendly alternatives (including alt text) and hyperlink.
#
[tantek]
I've implemented this in CASSIS and this is how I do photos with alts and hyperlinks on my blog already
#
rubenwardy
[Paul_Robert_Ll]: I saw that, but doesn't support separate caption to alt
#
[Paul_Robert_Ll]
It does: `![alt text](/path/to/image.jpg "figure caption")`
#
rubenwardy
I suppose there's probably hooks to insert my thumbnail system as well
#
[Paul_Robert_Ll]
FWIW, I’m storing my markdown files in a separate repo, and took the time to document that particular conventions I’m using in my documents. https://github.com/paulrobertlloyd/paulrobertlloyd-content
#
Loqi
[preview] [paulrobertlloyd] paulrobertlloyd-content: Content for my personal website.
#
s​tarrwulfe
Saw the earlier convo about Markdown/HTML/BBCode and tables... Thought I'd leave this tool here that saves me all the time:
#
IWDiscord
<s​tarrwulfe#0>
geoffo joined the channel
#
s​tarrwulfe
One of the more mindnumbing parts of my job is that I have to make some of our data tables into ASCII sometimes for presenting in notes that need to show up in TTY/terminal screens and plain text messages where the only thing I'm guaranteed is monospaced font.
#
s​tarrwulfe
So this has helped me tremendously.
#
c​apjamesg
aaronpk You may find https://github.com/swyxio/domainblocklist interesting (maybe start from the bottom of the README, after the list)
#
c​apjamesg
[edit] aaronpk You may find https://github.com/swyxio/domainblocklist interesting (maybe start from the bottom of the README, after the list)
geskeca joined the channel
#
Loqi
[preview] [swyxio] domainblocklist: domains that are mostly just automated reposts of content sites like CSS Tricks
#
Loqi
[preview] [swyxio] domainblocklist: domains that are mostly just automated reposts of content sites like CSS Tricks
#
[tantek]
create << useful for making ASCII tables (suitable for monospace displays like inside pre tags) https://www.tablesgenerator.com/
#
Loqi
ok, I added "useful for making ASCII tables (suitable for monospace displays like inside pre tags) https://www.tablesgenerator.com/" to the "See Also" section of /create https://indieweb.org/wiki/index.php?diff=92024&oldid=91302
#
[tantek]
starrwulfe++ great find and that gives me some ideas for plain text tables!
#
Loqi
starrwulfe has 1 karma in this channel over the last year (4 in all channels)
#
s​tarrwulfe
🤠 much obliged!
#
s​tarrwulfe
You'll also find it does MediaWiki, LaTex and all that too.
geoffo and bterry joined the channel
#
c​apjamesg
[KevinMarks] I saw that.
#
c​apjamesg
Impressive engineering.
#
c​apjamesg
Seriously impressive engineering.