-
Notifications
You must be signed in to change notification settings - Fork 156
Convert to Eleventy. #836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to Eleventy. #836
Conversation
- Copy and ignore files as needed. - Comment out old `prettify.css` usage. - Move `learn.html` to `learn/index.html` and update links. This could break external links, but is aligned with the pattern of other files and dirs. Eleventy will put it in `learn/` by default either way without an override. - `specs/`, `primer/`, and `requirements/`: - Generate sub-dir listing data with JS. - Switch from PHP to LiquidJS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for work on this, Dave! Most of the space the minutes consume is due to audio captures of the early meetings, which we haven’t kept going in some time. Do logs indicate if they’re ever actually accessed? Maybe there’s a way to move those someplace else off of the main (or minutes) site.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At last!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall. Just some non-blocking recommendations.
eleventyConfig.ignores.add('presentations'); | ||
eleventyConfig.ignores.add('scripts'); | ||
eleventyConfig.ignores.add('spec/tools'); | ||
eleventyConfig.ignores.add('spec/LICENSE.md'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These ignores can be moved to .eleventyignore
to make this file more sane.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's wrong with having them here? At least for now. It's a bit confusing as is due to eleventy processing various things, having to pass through others, and ignore particular files. And for drafts, that's done computationally. I thought it made more sense to keep the details in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the single place to look. I mostly just like data in inert places whenever possible vs. buried among API calls.
Deploying json-ld-org with
|
Latest commit: |
a66b568
|
Status: | ✅ Deploy successful! |
Preview URL: | https://99ef1971.json-ld-org.pages.dev |
- Convert README from reStructuredText to Markdown. - The reStructuredText format still works, and was a fine choice back in 2010(!) but Markdown is more common for READMEs like this today.
- Add `404.html` for Cloudflare Pages.
Another issue with this conversion is how to handle all the
And while pondering these things, I'm wondering where this is headed.
|
@davidlehn per your concerns above, I think we can keep using 11ty separate from the hosting platform. Having 11ty in place makes working on (and redesigning) the site much simpler--where it's hosted can be a separate matter because 11ty generates static sites. Cloudflare hosting can easily get more complex/tangled (just like the build tool nightmare that is modern JavaScript vs. ye olde All that to say, how this is hosted is orthogonal to using 11ty. |
@davidlehn how close do you think this is to shippable? I know #840 is part of the consideration here too. Just curious how we can get this over the finish line. Since the WG is getting rechartered, it'd be super to get this in a space we can continue to improve, redesign, etc. Happy to help finish it off...just not sure where we're stuck. |
- Remove PHP proxy code. - Move proxy URL to /playground/proxy. - Use eleventy@3 alpha for `onRequset` dev server support. - Add Eleventy dev server `onRequest` proxy to local wrangler server proxy. Due to current limited API, emulate a basic playground request. - Reimplement proxy as a Cloudflare Pages Function. - Basic proxy designed for limited use and abuse. - Add various checks to limit useful scope. - Update README. - Ignore .wrangler.
To untangle this, I've added a
I don't think we should do this as it'd be a good deal of overhead to maintain/juggle both. Consequently, I've removed the Once #855 is merged into this PR, I think this one can be marked "ready for review", and we can get a preview URL on Cloudflare sporting all the things for further testing from everyone here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My earlier concerns were due to misinterpreting Markdown. They're resolved
This uses Cloudflare `wrangler` to serve the `_site/` folder with support for `_headers` and `_redirects` files.
Cloudflare already supports the `.jsonld` extension properly (along with any/all other registered file exstensions). Cloudflare also turns CORS on by defualt for all origins.
The `images/README.md` was already handled, so the only addition to the ignores list is the `images/Makefile`.
This one never did what it intended to, judging by the commit it was added during: 5828deb
Some handled slashes, some did not. These should match what was previously in place.
CSS and images were not loading previously.
Sadly, Cloudflare currently only does content negotiation for images. However, the Pages Functions Middleware option is more than sufficient to handle the mapping and loading based on simple Accept header values. NOTE: the current implementation *is not* robust and only handles single value Accept headers.
This commit uses code generated by a Google AI Overview result. They cite no sources and claim no license. However, it is exactly what I was looking for with that search.
Not sure we need to keep this around...but I suppose it could be handy all the same.
@davidlehn I think I've addressed most if not all of your concerns in #836 (comment) via #855, so I've marked this as ready for review. Please let me know what else it needs. Thanks! Functional preview available at https://99ef1971.json-ld-org.pages.dev/ |
Clicking back through the site, I realized we never answered this one:
https://99ef1971.json-ld-org.pages.dev/minutes/ (in the preview) is current 404. The simplest solution would be to setup a redirect from that URL to https://json-ld.github.io/minutes/ (where it's actually hosted). Alternatively, if we think the json-ld.org URLs are important, we could proxy those URLs through a Cloudflare Pages Function (though that likely comes with some bandwidth costs)--which should not incur additional costs (afaict from https://developers.cloudflare.com/workers/platform/pricing/). Or, similarly, we could push the files to a Cloudflare R2 public bucket (which supports large static file hosting similar to S3). However, that may eventually incur some cost or at minimum we'd have to be strategic in how we setup publishing the files to R2--so we don't ship all 1.8 GB every time a new change is made to the minutes... My current vote would be a simple redirect setup to keep thing uncomplicated. Thoughts @davidlehn @gkellogg? |
It's time. |
Status:
Issues:
minutes/
. It's gigantic and inappropriate to mix into a static site directly.Notes:
Testing:
npm install npm run serve # open http://localhost:8080/ (or whatever URL it gives you)