-
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
Add page layouts functionality #439
Conversation
Themes are better reserved for styling, e.g. #386. How about "layout"? |
Sure, layout is fine |
d9587b0
to
7c4f63f
Compare
Also right now the tests only includes overriding the layout in <frontmatter>
layout: layoutA
head: head.md
</frontmatter> |
This might result in several levels of The design can get quite complicated, but I think it is a feature certainty worth exploring in the future. |
Updated with fixes (+ additional test) Sure, we can worry about that later |
d6438ac
to
d38b4c9
Compare
Updated to resolve merge conflict |
d38b4c9
to
750baae
Compare
@@ -12,8 +12,9 @@ | |||
<link rel="stylesheet" href="..\markbind\css\bootstrap-glyphicons.min.css" > | |||
<link rel="stylesheet" href="..\markbind\css\github.min.css"> | |||
<link rel="stylesheet" href="..\markbind\css\markbind.css"> | |||
<link rel="stylesheet" href="_markbind\layouts\default\styles.css"> |
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 think it would be better to put these inside the markbind
folder (no underscroll at the front) rather than inside the _markbind
folder, because the _markbind
folder has a connotation that it contains working files, rather than files for actual deployment.
Same thing for the JavaScript files.
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.
Sure, moved it to the assets folder.
Also added path to ignore so they don't get copied to the _markbind folder
ffd8213
to
b3b4329
Compare
docs/userGuide/contentAuthoring.md
Outdated
- `scripts.js` : Contains custom javascript | ||
|
||
These files will be automatically appended to a page upon generation, allowing you to quickly apply styles to a batch of pages at once. |
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.
Seems to be repeating the same thing as The default layout is automatically applied to every single page.
below?
Or do you mean it is generated when doing a markbind init
?
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 meant to advertise the use case, like the purpose of templates is to quickly apply stuff to a batch of files.
I moved the sentence up so it's a little clearer.
Necessary changes made! |
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [X] New feature
Fixes #389
What is the rationale for this request?
Users may want to add the same footer/head to a group of files at once without having to specify it in each file's
frontMatter
individually.What changes did you make? (Give an overview)
Follow up from this solution: #389 (comment)
This PR adds support for MarkBind themes (changed from 'templates' because that name was used by nunjucks).
A theme consists of 5 files,
navigation.md
,head.md
,footer.md
,styles.css
,scripts.js
. Themes are stored in the_markbind/themes
folder, laid out like this:Users can apply themes to a set of pages either through the
site.json
or thefrontMatter
:All files in the folder will be applied.
Is there anything you'd like reviewers to focus on?
The following use cases aren't supported:
default
theme overwrites all 5 files, so you can't have saydefault/head.md
andmyTheme/footer.md
at the same time.js
andcss
overwrite the default, or should it apply both?