-
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
Improve the default site.json
settings generated during init
#525
Conversation
|
For the second point - would updating the patterns to |
EDIT: I goofed, the above mentioned patterns should work. |
Why are |
@acjh from what I understand, the requirement is that all .md and .mbd files should be rendered as HTML files i.e. they should be in |
@amad-person However, this would also render all files in the |
There's currently no way to exclude pages, and the current codebase doesn't explicitly exclude the It should be possible to correct the behaviour in |
I have updated to glob syntax to serve all files, please let me know if I need to make any changes! |
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.
We still need to exclude the files inside _markbind/
, by doing the following:
It should be possible to correct the behaviour in Site.prototype.collectAddressablePages
For excluding the files inside |
No, boilerplate files are a feature in MarkBind and that constant is used in other places. |
src/Site.js
Outdated
@@ -364,7 +365,7 @@ Site.prototype.collectAddressablePages = function () { | |||
globPages.concat(walkSync(this.rootPath, { | |||
directories: false, | |||
globs: [addressableGlob.glob], | |||
ignore: [BOILERPLATE_FOLDER_NAME], | |||
ignore: [BOILERPLATE_FOLDER_NAME, CONFIG_FOLDER_NAME], |
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.
Can remove BOILERPLATE_FOLDER_NAME
since it's a subdirectory of CONFIG_FOLDER_NAME
?
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.
Nice work. Please squash the commits! Thank you.
* serve all .mbd and .md files * ignore all .mbd files and the .git folder
d42faa9
to
090b19e
Compare
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [X] Enhancement to an existing feature
Fixes #507.
Fixes #563.
What is the rationale for this request?
As per #507, the default site.json generated during
markbind init
can be improved by serving all .md and .mbd files by default (and ignoring .mbd files and the .git directory). Hence users need to tweaksite.json
only when they require some additional setup, e.g. overriding a page title.What changes did you make? (Give an overview)
Updated the default
site.json
that is generated by themarkbind init
command as follows:*.md
and*.mbd
to the pages array so that all .md and .mbd files will be served by default.*.mbd
and.git/*
to the ignore array so that these files will be ignored while copying over to the generated site's directory.Provide some example code that this change will affect:
Default site.json generated by
markbind init
after this change:Is there anything you'd like reviewers to focus on?
N.A.
Testing instructions:
Run the test suite / build markbind locally and test.