docs: build with eleventy instead of jekyll#9146
docs: build with eleventy instead of jekyll#9146alxndrsn wants to merge 69 commits intoapache:masterfrom
Conversation
This reverts commit 7747aae.
1. fix the directory that's watched, and 2. actually show errors if rebuild fail
* fix rebuild error logging for everything watched * parameterise colours * remove some logging from copy button * remove unnecessary config
|
Hello @alxndrsn, I gave this a spin and this looks like a great start! Thanks very much. I have some capacity to continue the work, would you mind if I move this branch into the PouchDB repo and finish it? |
Thanks for the support! I've been looking for some endorsement at #9135 (comment) before committing to this. If the hoodie team is in favour, perhaps some of you could comment or +1 there? |
|
Hello! I've manually tested this on my machine, and it all works very well, thank you for all the work. As far as I can tell, almost everything matches the old site apart from some negligible syntax highlighting differences. I've only found 2 issues that need resolving before merging:
Many of the guide pages don’t have code fences around some code snippets, for example here, and the
With those two changes and the resolved conflicts, this seems good to go! URLs all still work, ServiceWorker is serviceworking, the example PouchDB in the dev tools console works… LGTM. |
|
Thanks for the review, and catching these issues 👍
Problems were a bit deeper than this, but I've updated to make sure that highlighting is consistent across fenced and indented code blocks, in both markdown and liquid formats.
I've reverted to hardcoding the version number - I'm not looking to introduce process changes here, and the version in |
This comment was marked as resolved.
This comment was marked as resolved.
|
@espy in your commit at espy/pouchdb-actions-test@2691e89#diff-6744b4267bd2c2918dab97901f10b66cfffb1cff0dddd3c0fd01086f5294f3f0L3-R3, you've reverted the change in liquid templates to add quotes around language names in |
In the end, making indented code blocks work with eleventy's liquid parser caused some knock-on effects - some templated HTML blocks were being rendered instead as code. Instead I've disabled indented code blocks, and converted existing blocks to "fenced" (```) format. |
Yes, but I did also switch to using eleventy’s syntax highlighting plugin, that’s why that works. If I remember correctly that only required minimal CSS changes, some of which you also have already. Converting the indented code blocks to fenced ones was also my choice, in my experience being able to avoid significant whitespace like that is always a win 😅 |

Caution
Please do not merge this PR.
TODO
manifest.appcacheserviceWorker.jsmanifest.appcache)feed.xmltemplatingfeed.xmlasf.md(if this should be present)/, not/posts/Note
If building the site with this branch after using
npm run dev-site-with-docker, generated files indocs/_site/may belong toroot. To fix this:Benefits
Changes
Eleventy is mostly compatible with Jekyll, so there are minimal changes to the site.
The main changes are:
collections.xinstead ofsite.xsite.pagesneeded to be rebuilt manuallysite.timeneeded to be recreated, and has changed slightly. This shouldn't be an issue, as it's only used for versioningserviceWorker.jsandmanifest.appcache, which will change anyway when the site is rebuiltitem.data.xinstead ofitem.xpage.titleto globaltitlepostscollection means thatpostnow becomespost.datavsglobal, depending on how the template is usedindex.html, remove double-spacing of every line in HTML blocks, as this confuses the new markdown rendererBefore
After