Closed jugglinmike closed 7 years ago
We could simplify this still further by relocating the _resources
directory to _includes/resources
. This would allow us to use Jekyll's built-in {% include file }
tag and remove the render_partial
plugin altogether.
This is a more drastic change in that it involves renaming git submodules, so I'll hold off on that until I hear back from a maintainer.
That sounds like a good idea to me, but I don't recall if there are any substantial disadvantages. @gsnedders should probably also comment since he is changing some infrastructure here.
@jugglinmike I'm happy to merge this, as it does solve this for now.
What @jgraham hinted at is that the docs are going to move to essentially using GitHub Pages straight out of /docs
in the wpt repo, which means we're not going to have the includes in any way shape or form… it does somewhat sadly meant the only way around it is to escape the characters in the source which means they break when you view them on GitHub (as opposed to the rendered page). It doesn't seem worthwhile to move subresources for a short-term gain when they'll be gone entirely soon.
By interpreting partials as Liquid templates, the
render_partial
plugin strips content that happens to conform to that engine's syntax. Specifically, the referenced documentation describes a substitution syntax for Web Platform Test files which reserves the{{
and}}
strings as delimiters for variable interpolation.This plugin is only used to render content that is intended to stand alone (i.e. without variable expansion), making the use of a templating engine superfluous.
Remove the use of the rendering engine and emit the referenced text directly.
Here's a comparison of the generated output before and after application of the patch:
This change is