Skip to content
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

keep auto-generated content in docs out of VCS #3713

Closed
boneskull opened this issue Feb 4, 2019 · 0 comments
Closed

keep auto-generated content in docs out of VCS #3713

boneskull opened this issue Feb 4, 2019 · 0 comments
Labels
area: documentation anything involving docs or mochajs.org status: accepting prs Mocha can use your help with this one!

Comments

@boneskull
Copy link
Member

Our documentation has automatically generated sections. The content in these sections is part of the doc build and should not be in VCS.

<!-- AUTO-GENERATED-CONTENT:START (toc:maxdepth=2&bullets=-) -->
(stuff)
<!-- AUTO-GENERATED-CONTENT:END -->

Should not be modified when running npm start docs.

Instead, the build should be run against a transient copy of the file. That means:

  1. Copy docs/index.md to a temp location
  2. Run the preprocess script against the temp copy
  3. Ensure Eleventy generates documentation from the temp copy
  4. Remove the temp copy

Take care not to deploy the temp copy itself; Eleventy should deploy HTML only, and no markdown.

(This also applies to tutorials found in the API docs, which are in incoming pull request #3655; don't worry about these for now.)

@boneskull boneskull added status: accepting prs Mocha can use your help with this one! area: documentation anything involving docs or mochajs.org labels Feb 4, 2019
wanseob added a commit to wanseob/mocha that referenced this issue Feb 16, 2019
- Remove auto-generated contents from docs/index.md
- Make docs/index.md keep excluding auto-generated contents
    1. At the pre-processing stage, copy docs/index.md to
    docs/index.md.tmp
    2. Trap exit signals and recover docs/index.md with
    docs/index.md.tmp after the script execution
- Add docs/index.md.tmp to the .gitignore list
wanseob added a commit to wanseob/mocha that referenced this issue Feb 16, 2019
* Remove auto-generated contents from docs/index.md
* Make documents from temporally copied file docs/index.md.tmp
* Add docs/index.md.tmp to the .gitignore list
boneskull pushed a commit to wanseob/mocha that referenced this issue Feb 27, 2019
* Remove auto-generated contents from docs/index.md
* Make documents from temporally copied file docs/index.md.tmp
* Add docs/index.md.tmp to the .gitignore list
craigtaub pushed a commit that referenced this issue May 21, 2020
* do not commit generated content to VCS

This removes `markdown-magic` and replaces its functionality with the built-in data capabilities of 11ty.

The TOC, `--help` output, and source files are now all done via global data scripts in `docs/_data`.

When building documentation, we will no longer get changes to e.g., `docs/index.md` because of the automatically generated content.

* add inclusive language plugin to eleventy

Usage of the words as defined in options will result in a warning, and will not break the build.

Also: Eleventy should ignore the historical changelogs in `docs/changelogs`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org status: accepting prs Mocha can use your help with this one!
Projects
None yet
Development

No branches or pull requests

1 participant