-
Notifications
You must be signed in to change notification settings - Fork 133
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
Clarify the requirements of layouts #1308
Comments
Further requirements: layouts are not independent of the page content
layout generation should be completely independent to achieve all of the above:
|
@damithc @marvinchin any idea if these were intentional design choices? (specifically the second comment and the use of |
It's common to take the path of least resistance during the first implementation of a feature as the first version doesn't need to support all bells and whistles. Could be the case here too. @crphang any thoughts? |
any thoughts on the feature reductions though? namely anything that makes use of:
|
Sorry missed the ping 😅 I believe certain layouts such as footer, header, pagenav were designed to be simple at that point since it takes up fixed portion of the page. Expressive layouts on the other hand was designed to support all functionalities that a normal page could since it takes up the core portion of a markbind generated page. |
Could you elaborate more? For reducing features, there might be a risk of backward compatibility. If that is necessary, might have to release it as part of a major version update and consider the product as a whole. |
yes definitely, I'm not sure if these are actually intended (hence risk of backward compatibility) or accidental (no risk) though
e.g.
then
this looks useful, but can be done via |
actually, if I recall there was a comment about migrating entirely to expressive layouts, deprecating headers/site-navs/footers. still we need to sort out the desired behaviour, should:
Although the second seems convenient, my preference is to keep this independent of the page, because it can become difficult to predict / keep track of the expected behaviour for an author Indexing headings with the page seems redundant and causes a lot of repeated search results |
@ang-zeyu I'll leave you make the decision, after considering @crphang's inputs, if any. |
@ang-zeyu I'm not too sure how expressive layouts can support site-nav and page-nav without making I don't have strong opinions on the other suggestions 👍 |
something like this https://www.11ty.dev/docs/layouts/ but without the non so we would also still have is that an acceptable level of bulkiness? 😮 |
may be nice to include this in v3.0 as a breaking change to layouts since it can dramatically simplify things. (but more migration work needed) @damithc @crphang any thoughts? Options:
|
I'm OK if usability costs are outweighed by other gains. You can use CS2103 site as a benchmark as that's the most complicated MarkBind site we have (also used in 5 other modules). |
It should be more user-friendly eitherway, since the current system requires keeping track of multiple layout files. (imo)
you'll also be able to use |
Any opinions on option 2 / 3 though? 😮 2 would be
3 could be
|
For option 2, what would be the baseline |
hmm good point, just realised it would be a little difficult to insert to go with option 2 since we have baked in essential assets (octicons, highlightJs, ...) vs something like https://www.11ty.dev/docs/layouts/ which dosen't {{ headFileTopContent }}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="{{ markBindVersion }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title }}</title>
// essentials
<link rel="stylesheet" href="{{ asset.bootstrap }}">
<link rel="stylesheet" href="{{ asset.bootstrapVueCss }}">
<link rel="stylesheet" href="{{ asset.fontAwesome }}">
<link rel="stylesheet" href="{{ asset.glyphicons }}">
<link rel="stylesheet" href="{{ asset.octicons }}">
<link rel="stylesheet" href="{{ asset.highlight }}">
{%- if not dev -%}<link rel="stylesheet" href="{{ asset.markBindCss }}">{%- endif -%}
<script src="{{ asset.polyfillJs }}"></script>
<script src="{{ asset.vue }}"></script>
<script src="{{ asset.markBindJs }}"></script>
<script src="{{ asset.jQuery }}"></script>
{%- if asset.pluginLinks -%}
{%- for link in asset.pluginLinks -%}
{{ link }}
{%- endfor -%}
{%- endif -%}
{%- if faviconUrl -%} <link rel="icon" href="{{ faviconUrl }}"> {%- endif -%}
// till here
<link rel="stylesheet" href="{{ asset.layoutStyle }}">
{{- headFileBottomContent -}} should we go with (3) then? There's the issue of custom scripts (inserted after our own scripts after the For that we could include some sort of |
Sure, can give option 3 a try. You might gain further insights as you implement/test it. |
Currently, layouts (header, footer, page (expressive) layouts, navigation) cannot:
<panel src="...">
&<include>
) (with the exception of expressive layouts)<variable>
/<import>
correctly (variables are not erased, imports do not work with live reload)preRender
is not executed for layouts)Is this by design?
If not, a very large refactor may be due to fix the processing order
The text was updated successfully, but these errors were encountered: