#@jwz@Foone This is why it is right and proper to write your style tags as <STYLE TYPE="text/css"><!-- ... --></STYLE> and your script tags as <SCRIPT TYPE="text/javascript"><!-- ... //--></SCRIPT> which absolutely nobody does any more. (twitter.com/_/status/1349868940688719875)
#[chrisaldrich]On the SSG front, I see people complaining about build times with what I would presume to be sites with a few hundred or maybe a thousand posts. I'm reticent to even look at them with a site that has 27,000+ posts.
#[chrisaldrich]I know that [jgmac1106] has been having some issues with Known lately that is causing his time to post to be about 7 minutes and he's thinking of giving up on it for that reason, so I can only imagine how frustrating it would be to a user taking several minutes to rebuild an entire site to add a note with 280ish characters.
#aaronpkWait, how does it take 7 minutes to add a post to Known?
#robindrakeok I have the @me tags to mastadon and mewe, but what other rel links do I need to add?
#robindrakeor is this question better asked in #indieweb?
[Murray] joined the channel
#[Murray]A bit late, but on the SSG front: Gatsby's incremental builds are _interesting_, they sort of work outside of their own Cloud structure (Netlify, for example, also supports them) and they shaved about 30% off my build time, but no where near as much as I'd hoped/expected. Eleventy doesn't support it natively, but I've seen a few people manage to get it functionally working themselves, particularly with webmentions (so it caches incoming
#[Murray]people mean by "SSG" that it doesn't count any more 😉
#[Murray]webmentions and just rebuilds the relevant page/pages). And then there's Next's route, which could be argued to no longer be an SSG 😄 Effectively, you can set Next up to fully server-side render pages, but then it will cache a static page for a certain time. The first user therefore gets SSR, but if someone else visits that page they get SSG (effectively). That's been super useful for us at my work, but it's probably so far away from what
#[Murray]though if someone ever does release true incremental builds on an SSG I think it would get me to convert my site immediately. Watching 11ty very closely for that 😄
#@nicklewis↩️ I set up something similar two days ago and it works a treat. Handy if I've not updated my site for a few days but i.e webmentions are being received, I know they'll be reciprocated each day at least (twitter.com/_/status/1350025711126532103)
#sknebelit's not really "need to" - if you want to link to your profile somewhere else from your site, you can add rel=me to it. unless you want to use something that insists on you having something specific linked up, there is no "need" to do anything else or more
#[Raphael_Luckom]sorry, meant to be replying to Murray, wasn't all the way scrolled down
#[Raphael_Luckom]I do think that my incremental build system might _technically_ be a "static site generator" because it renders md to html. But it doesn't fulfill the same value proposition as hugo, so I agree with Murray that it might be useful to think of some of these infrastructure-required things as _not the same thing_.
[tantek] joined the channel
#aaronpkwordpress can do SSR on first view then serve a static page after and i'm really not sure i'd call that a static site generator :D
jamietanna joined the channel
#[Raphael_Luckom]If you could use wordpress at the cli to generate an all-static version of a site, would it count then?
hoschi joined the channel
#jamietannaSo a run from a few minutes ago too 3m8s to build the site on Netlify (68s was Hugo) to generate ~25000 files and then a further 4m55s to deploy it live
#aaronpkif no code has to run on the server then yes i'd count that
#aaronpkor rather, no code has to run in response to web requests
#[Raphael_Luckom]I really like that as the differentiator: does code run in response to web requests (defining a file-server level of interaction as "no code running")
#[Raphael_Luckom]One of my priorities is to define the services I depend on carefully. I really like the way AWS lets me organize a system and separate concerns, but I don't like being in bed with amazon-the-company. I'd like to be able to say "this is what I think static-site hosting looks like--it's an object store, plus eventing, plus routing, plus optionally a cache. And then be able to move pieces of that off AWS as better providers are available.
#[Raphael_Luckom]I think there are already a couple of places where I could maybe use Backblaze instead.
nickodd joined the channel
#petermolnarsome of these are the reasons why I ended up writing my own script (I'm not going to call it a static generator, that would be an overstatement): I can run it locally, do an rsync afterwards, plus it makes html with relative-only links inside the domain, so it even works offline, locally.
#petermolnaraaronpk: I used to have a cache plugin for WP that had the option to cache forever in memcache - I guess that's sort of a static generator...
#aaronpkthat's the thing i was trying to differentiate. caching vs actually generating static files
#[Raphael_Luckom]It feels like part of the reason there can be so much debate around ssgs is convergent evolution. People with vastly different goals and use cases pass through this zone where their code could be described as "an ssg", but everyone in that "built an ssg" space is headed in a different direction. That's plurality!
swentel, hoschi, schmudde, [tw2113_Slack_] and [chrisaldrich] joined the channel
#GWGI've been adding new archive pages to my site and was looking for new ideas
#GWGFor example, all photos posted on my site and all photo posts on my site are two different ones
btrem joined the channel
#btremshoesNsocks: do you have any recommendations for how to manage urls/permalinks with 11ty? Something not on 11ty.dev, as I've been through them, and still can't make anything work.
#shoesNsocks@btrem what's your goal? I don't think I'm doing anything much different that the starter -- blog posts are .md files in a folder structure like "2021/01/15/slug.md" and I end up with a post at "rich-text.net/2021/01/15/slug/index.html." But maybe I'm not sure what you're asking.
#btremAh, I'm going for a different url structure. I want e.g. example.com/articles/2020/foo and example.com/articles/2021/bar
#btremOne of the truly frustrating things about virtually every cms/ssg/etc. is the inability to offer flexibility in creating a url scheme. Even when the software docs promise lots of just such flexibility. :(
[KevinMarks] joined the channel
#shoesNsocksWould setting the `permalink` key in frontmatter help? Or maybe you're doing things programatically, lots of articles already written, and you don't want to go back and manually "touch" lots of existing files?
#btremOnly a few articles. But I hate the idea of adding a `permalink` key to each file. I'm bound to mess something up at some point. I was hoping to set `permalink` in .json files in the /posts/ and /articles/ directories and let it do its thing. But it appears to be unworkable. Especially if I use mixed formats, which I am: nunjucks and .md.
#btremQuite a shame, as the whole point of learning 11ty was to have a tool to manage urls for me. If it can't do that, its usefulness to me is limited.
#shoesNsocks@btrem random Q: are your current filenames also the slugs you'd like to see in the URL?
#btremPartly. I want the url to be based on both date and slug. /articles/2020/12-pets for an article about pets written last month; and /articles/2021/01-garden for an article written about gardening this month; etc.
#btremThing is, if the extension is different, 11ty uses a different processor, so the code to create the permalink fails spectacularly in some cases.
#shoesNsocks@btrem ah, yeah, that's a level of complexity I haven't run into...
#btremOk, thanks for the replies. I think I either need to suck it up and create urls "by hand" as they say (though when they say it, they never really mean "by hand"). Or try out a different ssg, which I really don't want to do. Especially since I might go through the work of learning e.g. Jekyll only to run into the same inflexibility.
#shoesNsocks@btrem, in your preferred URL scheme, where do the year, month, and tag/category/slug (in your examples above, "pets" and "garden"), come from? I am fooling with a sample repo and I think I can make it work if those 3 items -- year, month, and tag -- come from frontmatter data.
#shoesNsocks(but i'm still writing the frontmatter by hand, which might still not be what you're looking for)
#btremNo, I will have frontmatter in each file. I was hoping to only put in a date, a title (or maybe slug), and tags. And let 11ty create consistent urls from that. Year and month come from date; "pets" and "garden" would either be {{title | slug}} or from a dedicated mySlug item. The biggest obstacle is parsing page.date consistently. Nunjucks
#btremtemplates have one way to parse them, .md have a different way. Even when I tell 11ty to use .njk to parse .md. It might be that I'm just not pressing the right button so to speak. So far, I haven't come across a guide on the web that tells me which button to press, and how hard. ;-)
#[Raphael_Luckom]it's true that lots of systems have docs that aren't very clear, especially when you start using them. One thing that can help is to try to have your own code somewhere like github so you can point to the specific issues you're having. I don't know much about 11ty, but I'd be happy to spend a little while trying to work through the issue if you want.
#[Raphael_Luckom]Is there a word for "the non-state-holding parts of a system"? I'm thinking "plumbing" but there might be a better one
#btremHmm. Putting code on github is a really good idea.
#btremI mean, I already do that, but not for the reason you gave.
#[Raphael_Luckom]whenever I get stuck, I start trying to put together enough information for someone to understand what I'm trying to do and how it's breaking. 75% of the time I get the answer just by going through that exercise, and 5% of the time I actually succeed in getting help. the other 20% is failure.
#shoesNsocks@btrem I have been fooling around and maybe figured out an eleventy-config function that returns your preferred URL scheme, in .liquid, .md, and .njk files
#shoesNsocks(but yeah seeing sample code on github or similar would help!)
#btrem[Raphael_Luckom]: I often figure out the problem while writing an email to a list I subscribe to. I suppose that's the rubber duck phenomenon.
#btremWell bummer, it appears that codepen doesn't have a json box. Just html, css, and js. I suppose I can use js, but it thinks there's a syntax error.
#btremI used the html box instead. Here's my articles.json file:
#shoesNsocksah, seems like we're both heading in a similar direction (I didn't have the IF statement in permalink)
#btremYour idea uses the current date to get year and month. In other words, every time I rebuild the site, it will generate a new, possibly different, permalink for each page.
#btremI guess the question is, how do I get the template's frontpage date (aka page.date) into that function?
#btremAh yes, I can work with that, I think. I'll futz around with it and let you know how I make out.
#shoesNsocksI have 4 sample files in `/articles`, they each have a `mySlug` and a `date`. The permalink "thing" in the JSON file has access to each file's page.date. At least that how it looks here, I might be misunderstanding soemthing
#shoesNsocks(my JS in the config file is definitely hobbyist-level. probably a clever way to be more concise)
#btremActually, your code to pad the month is better than what I usually do. I go the route if month < 10 month ="0" + month. Which is rather inelegant. :-o
hoschi-it, hoschi, enpo, sknebel, malaclyps_, GWG, nekr0z, [tantek], astrojl_matrix and antonio[m] joined the channel
#btremI have a njk expression in my permalink {{ slug if slug else title | slug }} so if there's an explicit slug, it uses that. If not, it makes a slug out of the title. It works in e.g. /posts/foo.njk but it does not work in /posts/bar.md
#btremI mention this because that explains the problems I had earlier. A nunjucks filter does not work with md files.
#btremEven if you tell 11ty to process .md files with the nunjucks processor with the statement markdownTemplateEngine: "njk";