#dev 2021-01-05
2021-01-05 UTC
DanC joined the channel
# [KevinMarks] Um I don't know which one I picked
# [KevinMarks] Yes, because it defines the structure better. A lot of existing editors do odd things to the html in the cause of wysiwyg.
# [KevinMarks] Or they use something else as the editable form, some wiki text or markdown variant, or another rich text structure
# [KevinMarks] Which means that round tripping is hard
# btrem https://chat.indieweb.org/2021-01-05/1609808170025400 [tantek] I didn't think PUT was intended for changing a resource. But yes, there were very few implementations of PUT, which probably says all that needs to be said.
# shoesNsocks btrem: I only have a few files at the root, so I put a `layout: mainlayout.njk` in each, but I'm interested in the answer if you find it
# Loqi [KyleMit] The challenge is, when using a [global data object](https://www.11ty.dev/docs/data-global/) in the `_data` directory, the returned values are set on a property with the same name as the file
So if you have the following file:
`_data/data.json`
...
# shoesNsocks ah!
# shoesNsocks I was just starting to explore the idea of putting 'root-level' files in a subdirectory but coming up with some sort of trick to modify the permalink, but that's really just moving the problem from one variable to another. Glad there's a way
# shoesNsocks I just read that issues thread, and the suggestion at the tail end seems to have worked for me.
# shoesNsocks I created `_data/layout.json` which contains "../_includes/mainlayout.njk" and a bare markdown file in my root dir used that template.
# shoesNsocks that doesn't even look like valid JSON? Just a relative path in quotes? But it works, on my setup.
# [tantek] if we had actual GET/PUT symmetry, you would 100% edit your content exactly as it is displayed, but in practice as we seem to implicitly accept, no one actually wants that, or rather, no one actually wants to edit their posts, content etc in the context of all the other crap that their template display on their page
# @kaushikgopal ↩️ I've also been looking at Webmentions which is an open standard (http://webmention.io) + something like Bridgy - which seems to give the best of both of these worlds. (twitter.com/_/status/1346276600208244736)
# [KevinMarks] There's 2 kinds of if in nunjucks
# [KevinMarks] MaVo was the closest to that.
# [KevinMarks] The difficulty is in handling iteration and conditionals
# [KevinMarks] I find the nunjucks/jinja2 approach useful in the same way PHP is
# [KevinMarks] But it's a but more direct - you have a json shaped content that the template has access to and can use iterators and conditionals on
# [KevinMarks] I meant in the nunjucks/jinja2 context.
# shoesNsocks @btrem I made a simplified repo where that default-template solution seems to work (https://github.com/shoesandsocks/eleventy-default-template-example), but I can imagine more complex projects where it wouldn't. Particularly with non-default-name folders, etc (from 11ty's point of view.)
# shoesNsocks @btrem I started fooling with 11ty with the advantage of a blank slate -- beyond some *very* rudimentary jade/pug in a "teach yourself Node/Express" thing a few years ago, I've never used templating before. I've just been tweaking Nunjucks examples I see elsewhere... 😆
gbmor joined the channel
ShadowKyogre joined the channel
# btrem I don't know where I said this (here? #indieweb channel?) but I'm switching from simple html + css to 11ty because I don't want to create and manage blog posts/links/navigations. It's sure to break because I'll forget something. 11ty seems like a good compromise between managing that stuff, but allowing me to write in markdown if I want to keep it
# @kevinmarks ↩️ Webmentions with http://brid.gy for tweets and http://commentpara.de for free form? (twitter.com/_/status/1346294374288777218)
# @kevinmarks ↩️ Webmentions with http://brid.gy for tweets and http://commentpara.de for free form? (twitter.com/_/status/1346294374288777218)
# [KevinMarks] That second if expression style is what you can use instead of a ternary a lot of the time
# [KevinMarks]
{{ "true" if foo else "false" }}
# [KevinMarks] Which is clearer than a ternary for the simpler case
# lahacker does anyone know how to reference operating-system colors from within css?
nickodd joined the channel
# lahacker oh it was "operating system" that i was missing from google searches
# lahacker found it
# shoesNsocks @btrem hm, never seen that use-case (but I'd never seen the default-template-applied-to-project-root either).
# shoesNsocks I just tested that idea. Template that's just <html>
{{ content }}
</html> and specifically name it in frontmatter. seems to be ok# shoesNsocks (you don't want to ignore those files altogether, in an `.eleventyignore`, right? just not have them pass thru template b/c they're already "full" html?)
# shoesNsocks @btrem random dumb question - what happens if you put an HTML file in .eleventyignore AND explicitly call passthrough on it, in the 11ty config??
# shoesNsocks ha!
# [KevinMarks] It's
{{ }} for an expression but {* *}
for control# [KevinMarks] So
{* if foo **} {{site.name}} {** else *} <a>{{site.name}} </a>{** endif *}
# [KevinMarks] With {{ it's an expression
# [KevinMarks]
{{ site.name if foo else "<a>" + site.name + "</a>" }}
# [KevinMarks] (I am doing this from memory not in an editor)
# @soMelanieSaid ↩️ I do use Webmentions for my main personal site, looking for something a bit more friendly to a “non-technical” audience (used to inline comment forms) since this is for my fiber crafts blog. Thank you though! (twitter.com/_/status/1346310701460033536)
# [KevinMarks] Oh, I typoed
{* else *}
# aaronpk [snarfed] just had a thought... if bridgy is using a browser extension for Instagram now can't it look at the notifications page to get notifications for all photos with recent likes/comments instead of polling individual photos? (Or maybe that's how it already works and I just haven't looked into it actually 🙊)
[tw2113_Slack_] joined the channel
# [tw2113_Slack_] i thought build tools were meant to make lives easier
# [tw2113_Slack_] a hand rolled blog roll?
# Loqi It looks like we don't have a page for "autolinker" yet. Would you like to create it? (Or just say "autolinker is ____", a sentence describing the term)
# Loqi An autolink is a hyperlink that was automatically added to some text to link that text to an obvious or useful destination, like hyperlinking a URL in plaintext to the URL itself, linking hashtags to search results, and @-names to their profile pages https://indieweb.org/autolink
btrem left the channel
[snarfed] joined the channel
[xavierroy] joined the channel
# [snarfed] [gRegorLove] [chrisaldrich] i’ve made some significant changes to the bridgy browser extension, mind upgrading? you may need to remove and reinstall. https://chrome.google.com/webstore/detail/bridgy/lcpeamdhminbbjdfjbpmhgjgliaknflj , https://addons.mozilla.org/en-US/firefox/addon/bridgy/
jacky joined the channel
# [xavierroy] [snarfed] I see only instagram in the options?
# [xavierroy] Thought it was for every platform that bridgy supports!
# @ki_run ↩️ +1 for webmentions. It is one of a family of protocols (called social web or something like that) and my understanding is that it also allows to comment or share to feed without being tied to a particular service. ActivityPub is the most relevant protocol (twitter.com/_/status/1346353967874367488)
djmoch and schmudde joined the channel; nickodd left the channel
# @sockeqwe ↩️ Thanks! Webmentions sounds indeed very interesting. Will give it a try (twitter.com/_/status/1346390452442984448)
strugee, hoschi, gxt, [KevinMarks], stacktrust, jamietanna, [Roy_Mosby] and ShadowKyogre joined the channel; ShadowKyogre left the channel
# @mxbck ✏️ Today I learned how to use @Netlify build plugins to have folders stick around between builds, and I'm using it to cache webmentions for my @eleven_ty site. Here's how:
https://mxb.dev/blog/persistent-build-folders-netlify/ (twitter.com/_/status/1346467875964424205)
lanodan, hoschi, KartikPrabhu, [Roy_Mosby] and [jeremycherfas] joined the channel; ShadowKyogre left the channel
btrem joined the channel
# [jeremycherfas] You’re not going overboard.
# [jeremycherfas] But just in case, tie yourself to a railing.
# [jeremycherfas] As you said a couple of days ago, do what pleases and interests you.
# [jeremycherfas] I’d be tempted to save the data locally, if it were me.
[Raphael_Luckom] joined the channel
# [Raphael_Luckom] If I was looking at that much historical data behind an API and I was thinking about mirroring it, I might check to see if it's available in bulk for download. If you think you might want _all_ the data, scraping might be an inefficient way to get it. And if there's a more efficient bulk way, that might make wholesale download more appealing
# [Raphael_Luckom] "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway." - https://en.wikiquote.org/wiki/Andrew_S._Tanenbaum
[snarfed] joined the channel
[tantek] joined the channel
# [tantek] I feel this very strongly: "The best tool is no tool, the best build step is no build step, the best update is no update. HTML gives us all that, and more." https://blog.steren.fr/2020/my-stack-will-outlive-yours/
# [Raphael_Luckom] yep, everyone's got preferences!
[schmarty] joined the channel
# Zegnat GWG: if it is *a lot* of CSVs where i feels like even bulk downloading might be you overtaxing them, maybe get in touch with them and offer your services for getting it all published on the internet archive? That seems like a great place for this historical data, and then they can point there if others are interested in bulk download? You can always refer to all the indieweb video archiving you have been doing as prior work with
gRegorLove and [KevinMarks] joined the channel
# [KevinMarks] Tantek, I put it under manual until it hurts but maybe we need a page for html advocacy.
# [KevinMarks] What is longevity?
# Loqi Longevity is the goal of keeping your data as future-friendly and future-proof as possible; it is one of the indieweb principles https://indieweb.org/longevity
# [KevinMarks] That page needs Ian's quote about html5 too
# [KevinMarks] longevity << “I decided that for the sake of our future generations we should document exactly how to process today's documents, so that when they look back, they can still reimplement HTML browsers and get our data back”
# Loqi ok, I added "“I decided that for the sake of our future generations we should document exactly how to process today's documents, so that when they look back, they can still reimplement HTML browsers and get our data back”" to the "See Also" section of /longevity https://indieweb.org/wiki/index.php?diff=74173&oldid=73213
[tw2113_Slack_] joined the channel
# [KevinMarks] Hm, does loqi stop at newlines?
# [KevinMarks] longevity << Ian Hickson, 2007 http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2007-February/009517.html
# Loqi ok, I added "Ian Hickson, 2007 http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2007-February/009517.html" to the "See Also" section of /longevity https://indieweb.org/wiki/index.php?diff=74174&oldid=74173
ShadowKyogre joined the channel
# btrem https://chat.indieweb.org/dev/2021-01-05/1609872708704900 I appreciate the idea of keeping things simple. And that sometimes the solution just introduces another problem. But html by itself does not necessarily provide the flexibility needed to publish web sites efficiently. Happy to provide personal examples, though I don't think anyone needs
# Loqi [[tantek]] I feel this very strongly: "The best tool is no tool, the best build step is no build step, the best update is no update. HTML gives us all that, and more." https://blog.steren.fr/2020/my-stack-will-outlive-yours/
hoschi and ShadowKyogre joined the channel; ShadowKyogre left the channel
# [KevinMarks] Well, the other half of that is to use microformats in your templates so it is easier to extract the structure from the html if that's all that survives
[frank] and [Raphael_Luckom] joined the channel
# [Raphael_Luckom] Every time I use markdown for something substantial, like a blog, I find that I want at least 25% more features than it actually has--better size / positioning for images, ability to add classes to things, etc. It's interesting how many times the "document layout" problem has been solved in different ways--TeX, HTML, postscript, markdown. And they've all got different values and uses.
# [Raphael_Luckom] md is still my favorite, but I expect to extend a parser myself, at which point I'll be stuck on a frankenstein flavor for...how long have they been working on TeX now?
# [KevinMarks] You can embed html in markdown, that's part of the point. You shouldn't need to come up with even more convoluted syntax if it's easier to do in html
# [Raphael_Luckom] the problem, as btrem noted in #microformats, is that sometimes you want to modify the html that's generated from the markdown, rather than embedding extra html
ShadowKyogre left the channel
# [Raphael_Luckom] everyone has a way they like to do it. Almost everyone thinks that there is no one "right" way. And then goes on to explain why their way is the one right way.
KartikPrabhu joined the channel
jamietanna and [tantek] joined the channel
# Loqi Markdown is a way of writing and interpreting plain text so that it can optionally be converted to more explicitly meaningful or richly styled text like HTML https://indieweb.org/markdown
KartikPrabhu joined the channel
[Roy_Mosby], [snarfed] and btrem joined the channel
# aaronpk [snarfed]: i'm getting some errors in the chrome extension logs: instagram.js:187 POST https://brid.gy/instagram/browser/likes?id=tag:instagram.com,2013:2478978784175615953_1500881&token=... 400
# btrem [tantek] md is not a build tool. That we agree on. As I've said, repeatedly: sometimes, md/html+css is not always appropriate for publishing. Not for everyone. It's good that it worked for you, but I've had situations where writing long html tables and creating long indexes of pages would have been a nightmare.
# @JamieTanna ↩️ I allow interactions with my site using the Webmention standard, which allows folks to reply ie from their own website as well as anonymous comments via https://commentpara.de (https://www.jvt.me/mf2/2021/01/lcnv9/) (twitter.com/_/status/1346600318675648515)