Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been fiddling with the idea for a while now. In many cases, I need to have different representations of the same page. There are ways (namely headers) but those have limitations. They does not use the same pipeline as page content (so, no plugins).
Here comes what I called Alternative Representations. It's one or more other markdown files next to the usual one. Its use cases are:
Here's an super-simple illustration of the last use case. I need a two-columns page (or page module). Additionnally, I want to use the image-captions plugins. Here's what I get if I use a header:
Now, using the alternative representation:
Content pipeline (including plugins) processes the alternative MD file, caption is displayed.
My folder looks like this:
In my
left-column
template, I now use this:As of now, implementation might have unexpected results in some cases (namely multi-language sites) and I may need some guidance there.