-
Notifications
You must be signed in to change notification settings - Fork 123
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
Exclude *.md files from being copied over on build #1010
Conversation
test/unit/Site.test.js
Outdated
expect(fs.existsSync(path.resolve('inner/_site/markbind/layouts/default/footer.md'))).toEqual(false); | ||
expect(fs.existsSync(path.resolve('inner/_site/markbind/layouts/default/head.md'))).toEqual(false); | ||
expect(fs.existsSync(path.resolve('inner/_site/markbind/layouts/default/header.md'))).toEqual(false); | ||
expect(fs.existsSync(path.resolve('inner/_site/markbind/layouts/default/navigation.md'))).toEqual(false); |
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 believe that these four lines can just be removed, since const expectedNumBuilt = 16;
should already provide some assurance that these files cannot exist.
src/Site.js
Outdated
fs.copyAsync(siteLayoutPath, layoutsDestPath) | ||
.then(resolve) | ||
.catch(reject); | ||
glob(`${siteLayoutPath}/**/*`, (err, res) => { |
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 actually already have walk-sync
which we use to walk through the files and directories. We can use that instead of using a brand new package.
Ready for review |
@yash-chowdhary will need you to resolve the conflicts first, apologies for the delay. |
Done 👍 |
* 'master' of https://github.com/MarkBind/markbind: Update tests Allow using 'none' footer attribute in frontmatter (MarkBind#1002) Support line numbers for code blocks (MarkBind#991) 2.11.0 Update test files due to changes in PR MarkBind#982 Update vue-strap version to v2.0.1-markbind.36 Make highlighting bold (MarkBind#1045) Support markdown for header attr in dropdown (MarkBind#1029) Add '_site' to the ignored folders in site.json (MarkBind#1046) Use path.join instead of string interpolation (MarkBind#1052) Implement box markdown header attributes parsing (MarkBind#1025) Make the position of top navbar fixed (MarkBind#982) Exclude *.md files from being copied over on build (MarkBind#1010) # Conflicts: # docs/css/main.css
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [x] Bug fix
Fixes #825
What is the rationale for this request?
Prevents
.md
files in the_markbind/layouts
directory from being copied over on building the_site
. Copies over the rest of the file types..md
do not need to be copied because they are supposed to be rendered by MarkBind.What changes did you make? (Give an overview)
Filtered out the
.md
files from the list of files to be copied.Provide some example code that this change will affect:
Testing instructions:
npm run test
Test sites have been updated to reflect
.md
files not being copied overProposed commit message: (wrap lines at 72 characters)
Exclude .md files from being copied over on build