Open kgjenkins opened 3 years ago
One complication would be links between gardens. Right now, it is easy to link to other gardens in the same directory, since Atom makes it easy to see those filenames. Using ids might make that harder.
If this proposal ends up not being possible, a fallback would be to publish an id-based permalink on each garden page, and set up Hugo to run a redirect from the permalink (.../garden/12345
)
to the filename-based URL (.../province/judaea/caesarea_maritima/byzantine_law_court_and_roof_garden/
).
Christian made the great suggestion that we could hash the URL to get a unique ID. If the script only adds such article IDs when they don't already exist, then there shouldn't be any problem moving or renaming a file.
I have a garden-ids
branch that does the following:
hugo new province/name/sublocation/garden.md
And, finally, the main reason for doing all of this...
I currently have this branch published to the test website..
Here is the full URL of a garden: https://roman-gardens.github.io/gre-website-test/province/africa_proconsularis/pupput/house_of_the_black_and_white_triclinium/
And here is the permalink: https://roman-gardens.github.io/gre-website-test/id/b758b14e74
On the public site, these URLs will be even shorter (although this one doesn't work yet until we publish to the public website): https://roman-gardens.github.io/id/b758b14e74
p.s. I didn't use the Hugo permalink feature for this, because it broke relative links to images, etc. Using Hugo aliases that redirect to the full URL works much more smoothly.
And if we like this, we'll want to
I've re-published the garden-ids
to the test website, so the links above should work again.
Consider adding an opaque id to the front matter of each garden, and see if there is a way to keep the place hierarchy in the directory structure (and even the file names), but the public URLs would use the gre_id for a shorter, more stable URL that would act as a permalink for citation, and would look something like:
instead of:
Potential benefits:
Potential implementation:
article_id
that is currently unused?)archetypes/default.md
, either as a auto-increment integer id, or else a random string id that will be unique.