#dev 2021-01-16

2021-01-16 UTC
#
btrem
The takeaway is that using more than one file type in a project -- a supposed strong suit of 11ty -- is sort of, I dunno, broken is too strong a word. Maybe I can call it "rocky"? "Difficult"? My 2 cents.
#
[tantek]
hmm the discussion of archive or aggregation pages like for months, years, tags etc makes me wonder how would one "edit" those pages with Micropub
#
[tantek]
I suppose their top level object is an h-feed so you'd need an h-feed aware Micropub client?
include joined the channel
#
aaronpk
what content lives in the aggregation pages other than the collection of posts in that time period?
#
aaronpk
that part should be all automatic and not require editing
#
btrem
I just found out I'm not the only one:
#
Loqi
[porglezomp] #758 Permalink format engine depends on file being formatted, not the defining template
#
[tantek]
aaronpk I suppose then the challenge is how to distinguish an "automatic" page vs. an editable page, from the perspective of Micropub
#
[tantek]
since Micropub operates on "just" URLs for editing
#
aaronpk
i wouldn't expect those kinds of automatic pages to be editable at all really
#
aaronpk
they aren't editable on my site even aside from micropub for example
#
[tantek]
aaronpk, as you pointed out I think, you can pin a particular post to the top of a tag aggregation page. while minor, that pinning is a piece of content
#
aaronpk
hm true i do have pinned posts on tag pages...
#
[tantek]
how would you edit which post is the pinned post on tag page, via micropub?
#
aaronpk
internally that's a setting on the pinned post
#
aaronpk
i edit the post and say "please pin to this tag page"
#
aaronpk
i suppose you could flip the logic around, but that would also assume you have some sort of internal storage object for the tag itself, which is often not the case with tags or date pages
#
aaronpk
and again i'm not even thinking about micropub yet
#
[tantek]
aaronpk, the way I think of that structurally is the h-feed has a u-pinned property which is the permalink of the pinned post
[KevinMarks] joined the channel
#
[KevinMarks]
I wouldn't expect a markdown page to be able to contain nunjucks syntax
#
[tantek]
similarly I could see wanting to edit the explicit p-name of the h-feed of such aggregation pages
#
[KevinMarks]
I mean, you can pass any string to the nunjucks processor, so it could be done, but I think in general ssg's separate posts and templates
#
aaronpk
h-feed with a pinned property seems reasonable, but it would for example take me a lot of internal refactoring to be able to store data associated with a tag page or date page
#
aaronpk
incidentally i did recently do some of that refactoring to be able to add more stuff to my date pages that isn't from individual posts
#
aaronpk
(that's where i'm now storing my time tracking logs, and where i will store daily step counts)
[schmarty] joined the channel
#
[schmarty]
I have it in mind to use micropub as the plumbing to automatically update tag and archive pages
#
[schmarty]
(For a system I quickly got stuck on so who knows when or if I will get to it)
#
[schmarty]
But I figure sure why not let micropub add an h-entry to an h-feed
#
[schmarty]
We have add/remove capability with micropub edits. Don't recall there being any semantics for ordering or whatnot.
#
aaronpk
i don't think any current h-entry properties are ordered
#
[schmarty]
But they're also not *not* ordered
#
[schmarty]
Every property is an array and every array has an order.
#
aaronpk
unless they are unordered sets
#
[tantek]
correct, from a microformats perspecitve, the parsed result *is* ordered
#
[tantek]
e.g. the children array *is* ordered
#
aaronpk
oh i guess that is true in microformats parsing
#
[tantek]
so yes, the order does matter
#
aaronpk
but in practical terms i don't think anyone considers the tags on their posts ordered
#
aaronpk
same with syndication urls
#
aaronpk
there aren't even that many properties that *have* more than one value in practice
#
[tantek]
the set of properties is a set, not ordered
#
[tantek]
but the values *of* a property are definitely ordered
#
aaronpk
in the parsing spec yes
#
aaronpk
but not actually how people use them
#
[tantek]
in the data model
#
aaronpk
e.g. nobody has two name values in practice
#
aaronpk
and people don't order their tags on a post
#
[tantek]
some h-cards do
#
[tantek]
it does reflect content order, which may (often) have a semantic to the author, and thus is preserved
#
aaronpk
i'm just saying ordering hasn't come up in micropub because most of the use is on single-value properties or properties where the order doesn't matter
#
[tantek]
order matters both in the source HTML, and thus the parsing spec maintains that in the mf2json output
#
[tantek]
micropub on your homepage h-card would absolutely matter about the name (or icon) for that matter, because folks consuming that h-card will likely always take the first value of those properties when representing you as an author somewhere else
#
aaronpk
sure, but as far as i know nobody has even tried to use micropub to edit their home page h-card
#
[tantek]
I keep feeling like that discussion has come up several times, including from GWG (editing your homepage using micropub)
#
[KevinMarks]
Order matters in recipes
#
btrem
For directions, typically yes. For ingredients, typically not.
#
aaronpk
directions are typically given as a long block of text anyway
#
aaronpk
not individual microformats values
#
btrem
Or an <ol> element.
#
btrem
Yes, not individual values.
#
aaronpk
microformats.org even says it's `e-instructions`
#
aaronpk
it's a bit sparse on the details
#
btrem
[KevinMarks] re: your comment about nunjucks and markdown: 11ty allows you to provide a njk layout for a md file. It also allows you to put frontmatter at the top of the md file to set the page title, article date, and permalink.
#
btrem
That's where the problems arise. I can use njk expressions to create a permalink in an njk file, but I can't use that same expression in an md file.
#
btrem
Even if I tell 11ty to process the md file with the njk processor.
#
btrem
IMHO, any cms/ssg should allow the site admin/author to create urls in a flexible and durable way. If the same expression to create permalinks fails on some files, then I need to have separate configuration files. That's a brittle situation.
#
btrem
aaronpk I don't see that as a weakness, but maybe I don't understand the issues. ISTM if order is important, then you would use <ol class="e-instructions">. If order is not important, you could use <div> or <p> or whatever.
#
aaronpk
you'd probably wrap the <ol> in a <div> so that the ol appears in the parsed microformats html, but yeah
#
aaronpk
otherwise the instructions property would be just the li elements inside
#
aaronpk
my point is there are very few microformats properties where order actually matters in practice, and of those, we haven't really seen any of them used in micropub
#
btrem
Right, like I said, I don't understand the issues, because I know practically nothing about micropub.
#
btrem
And when I added h-recipe classes, I at first ditched the wrapper <div> and put e-instructions on the <ol> tag. Then I checked the markup in a parser, and realized, "Oh, that's why that wrapper is there." And promptly put it back in.  ;-)
#
aaronpk
this thread started because of the question of how would you reorder values in a micropub edit, and i was explaining why this hasn't ever come up before
#
btrem
I did see the earlier part of the thread. In a broad way what you're saying makes sense. As to the details, as I said, I really don't know much about micropub. I suppose I probably should have minded my own business. So sorry for the noise.
#
[KevinMarks]
It does come up in other editors - both the medium and buzzfeed editors let you drag ordered things around.
KartikPrabhu and btrem joined the channel
#
lahacker
so i'm circling back to micropub now and in favor of micropub'ing all the things i'd like to store my /about as a top-level h-card and create a micropub profile editor
#
lahacker
is it something about the x-www-form-urlencoded format that doesn't allow one to provide their own ordering?
#
lahacker
i can see at least order of name, tel and email mattering
[tantek] joined the channel
#
[tantek]
KevinMarks, both those editors are editing all of a post's content, i.e. e-content. Not multiple properties or values of properties.
KartikPrabhu, treora and [KevinMarks] joined the channel
#
lahacker
welp now i get it..
#
lahacker
very much expected to ship the entire updated payload
#
lahacker
or at least the entire updated property
#
[KevinMarks]
yes, so you need to be sure you have made sense of it correctly
[tw2113_Slack_], [chrisaldrich], pikselaxam, dhanesh, swentel and [KevinMarks] joined the channel
#
@jezcope
The other day I saw a blog which used Webmentions for comments, but also linked to a service where people could send a #Webmention without having a site of their own to send from, like an #indieweb version of Disqus. Can anyone… https://scholar.social/@petrichor/105565514288932214
(twitter.com/_/status/1350427427974082563)
nickodd joined the channel
#
jeremycherfas
What do people do for rpi backup? Given how long it takes to read and write the SD card, I'm considering getting a spare card, and whenever I take a backup, immediately write it to the spare card, so I can just swap them out when I need to.
#
petermolnar
I gave up on using rpis as servers for a longer period; I somehow tend to destroy sdcards. However, I'd probaby set up two rpis, two different manufacturer cards, one of them logging turned off, etc, and automatically sync between the two.
#
jeremycherfas
I don't think I need that kind of redundancy, to be honest. I got caught today by a power outage, and the rpi was not plugged into my UPS. Would not reboot. So I am currently waiting for the image I created ages ago to be written to the card, and will then need to update all the things.
#
jeremycherfas
Just trying to avoid having to wait so long next time.
#
jeremycherfas
Although I have now plugged the pi into the UPS.
#
sknebel
keeping a second identical card around sounds like a good idea
#
sknebel
(newer pis also can boot from usb drives, which are more reliable. and one can do things to keep important parts read only etc, but that's a bit of configuration that needs to be thought through)
#
jeremycherfas
It's all I could think of.
#
petermolnar
I don't want to sadden you, but if it's an sd card wearout, the ups won't help
#
sknebel
problems due to power failure/power issues are more likely than actually wearing it out
#
jeremycherfas
I understand that. But what is a wearout? Something technical, or just a way of saying broken?
#
petermolnar
and I second sknebel recommendation about the usb thing. In an ideal world, it's get an m.2 -> usb3 adapter and plug an actuall ssd in the rpi, using that as anything writable, and the sdcard as read-only.
#
sknebel
somehow your typical SD card just is unreliable if theres any power issue at all, at work we pretty much treat them as disposable
#
sknebel
petermolnar: the newer pis can actually boot directly from us
#
sknebel
no need for a card at all afaik
#
sknebel
(but haven't tested that)
#
petermolnar
wearout happens because flash storage devices can only do so many read/write (mostly write) operations
#
jeremycherfas
I have loads of spare big USB drives. Let me investigate. Thanks for the tip.
#
petermolnar
if you exhaust the limit, it'll simply die
#
petermolnar
(btw, this applies to ssds as well, been there, but the limit is much higher)
#
petermolnar
good sdcards matter though; I bought samsung endurance pro ones and those seem to be better, than my previous attempts
#
sebbu
sknebel, that's why you should use either a laptop or a desktop with an UPS
#
sebbu
so if there's power issues, you can save your work and shut down before there's no power left
#
sebbu
some device can even be powered from the usb port (with usb 3.1 gen 2 and usb type c / usb power delivery), both way
#
sknebel
"power issues" is more than power failure, and "use a desktop" is not a solution for all computing problems :D
#
sebbu
a usb hub with an external power plug
#
sebbu
(which can be a power bank)
#
sebbu
i once tried to copy files from my tablet to my pc when i had low battery
#
sebbu
and the tablet's battery went down WHILE being plugged to the pc
#
sebbu
the 5V 0.5A of normal usb2 ports (i have usb3 ports on the desktop, but the tablet has microusb2) weren't enough to power MTP
#
sebbu
i need to buy a usb hub with a few 5V 2.4A ports
#
sebbu
maybe even a dock
#
jeremycherfas
Instructions seem reasonably clear, but everything requires a usable SD card to start off with, so I'll just wait for dd to finish doing its thing.
#
sebbu
i saw people using nitter instead of twitter api
#
sebbu
or old leaked auth token that still works using v1 api, even for suspended accounts
#
jeremycherfas
Hah. Of course, all my spare USB drives are USB 2.0. May as well go shopping while I wait for the restore to finish.
[schmarty] joined the channel
#
sebbu
jeremycherfas, reminds me that my NAS rebuild the RAID at a speed of 60MB/s
#
sebbu
on sata3 6gbps hdd
#
sebbu
(compare that to the 500MB/s or 3400GB/s speed of some SSD)
#
jeremycherfas
Is that good or bad?
#
sebbu
3400MB/s*
#
sebbu
well, it's acceptable
#
sebbu
i mean, i just take a few days to rebuild the whole 10TB aray
#
sebbu
a good hd should have around 150-200MB/s speed, it should be lower because raid6 need some preprocessing, but still
shoesNsocks joined the channel
#
jeremycherfas
Finally finished 548615 bytes/sec
raucao, nolith1, KartikPrabhu, ben_thatmustbeme, [Raphael_Luckom], [chrisaldrich] and Caleb[m] joined the channel; nickodd left the channel