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
fix broken template processing in jsdoc output #4381
Conversation
because the files generated by jsdoc were output to `docs/_site`, they were not processed as liquid templates, which meant the custom reporter tutorial was broken. to fix this, we needed to: 1. change the output directory of jsdoc to `docs/api` (just somewhere else) 2. add this to `.gitignore`, obviously 3. tell eleventy to _ignore_ `.gitignore` (just rely on its `.eleventyignore` file) 4. tell eleventy to pass-through all assets underneath `docs/api` (css, images, etc) 5. update the file-loading 11ty data script to output a raw file 6. update the tutorial to use a fenced code block (jsdoc markdown plugin seems to strip html?) and tell Prettier to ignore the liquid template directive also: - removed link to google group - prettier-related reformats - tweak data script to use `fs.promises`
Ref: needs mochajs/mocha-docdash#6 |
That update to docdash fixes the URLs. 11ty wants to rename all of the files from The change in docdash should be a major bump since it throws front matter into all of the |
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
I have some "experimental" changes to the workflow here which:
I'll open a PR for that stuff after this one lands |
This isn't urgent, so I can wait a bit longer to merge. cc @mochajs/core |
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 one.
I always found docs/api
vs docs/_site/api
annoying. Didnt even realise https://mochajs.org/api/tutorial-custom-reporter.html existed.
because the files generated by jsdoc were output to `docs/_site`, they were not processed as liquid templates, which meant the custom reporter tutorial was broken. to fix this, we needed to: 1. change the output directory of jsdoc to `docs/api` (just somewhere else) 2. add this to `.gitignore`, obviously 3. tell eleventy to _ignore_ `.gitignore` (just rely on its `.eleventyignore` file) 4. tell eleventy to pass-through all assets underneath `docs/api` (css, images, etc) 5. update the file-loading 11ty data script to output a raw file 6. update the tutorial to use a fenced code block (jsdoc markdown plugin seems to strip html?) and tell Prettier to ignore the liquid template directive also: - removed link to google group - prettier-related reformats - tweak data script to use `fs.promises` * update @mocha/docdash Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
because the files generated by jsdoc were output to
docs/_site
, they were not processed as liquid templates, which meant the custom reporter tutorial was broken (the included "simple reporter" fixture file was not loaded, and the raw template tag was output instead).to fix this, we needed to:
docs/api
(just somewhere else).gitignore
, obviously.gitignore
(just rely on its.eleventyignore
file)docs/api
(css, images, etc)also:
fs.promises
(I lost like 30m on the
.gitignore
thing. that's surprising behavior on 11ty's part, IMO)