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

Draft mode that skips (potentially) expensive parts of the build process #1836

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

fredrikekre
Copy link
Member

When passing draft=true to makedocs a draft version of the
documentation is built. Draft mode skips potentially expensive parts of
the building process and can be useful to get faster feedback when
writing documentation. Draft mode currently skips @example, @repl,
@eval, and @setup blocks. Draft mode can be disabled (or enabled) on
a per-page basis by setting Draft = true in an @meta block.

@mortenpi
Copy link
Member

mortenpi commented Jun 2, 2022

This is awesome!

Could we add a test/examples build that runs with draft = true, so that the code paths would get hit?

When passing `draft=true` to `makedocs` a draft version of the
documentation is built. Draft mode skips potentially expensive parts of
the building process and can be useful to get faster feedback when
writing documentation. Draft mode currently skips doctests, `@example`,
`@repl`, `@eval`, and `@setup` blocks. Draft mode can be disabled (or
enabled) on a per-page basis by setting `Draft = true` in an `@meta`
block.
@fredrikekre
Copy link
Member Author

Added tests, and also disabled doctests in draft mode.

src/Documenter.jl Outdated Show resolved Hide resolved
Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com>
@fredrikekre fredrikekre merged commit 051bb4a into master Jun 3, 2022
@fredrikekre fredrikekre deleted the fe/draft branch June 3, 2022 11:01
fredrikekre added a commit that referenced this pull request Jun 3, 2022
…ess (#1836)

When passing `draft=true` to `makedocs` a draft version of the
documentation is built. Draft mode skips potentially expensive parts of
the building process and can be useful to get faster feedback when
writing documentation. Draft mode currently skips doctests, `at-example`,
`at-repl`, `at-eval`, and `at-setup` blocks. Draft mode can be disabled (or
enabled) on a per-page basis by setting `Draft = true` in an `at-meta`
block.

(cherry picked from commit 051bb4a)
fredrikekre added a commit that referenced this pull request Jun 5, 2022
…ess (#1836)

When passing `draft=true` to `makedocs` a draft version of the
documentation is built. Draft mode skips potentially expensive parts of
the building process and can be useful to get faster feedback when
writing documentation. Draft mode currently skips doctests, `at-example`,
`at-repl`, `at-eval`, and `at-setup` blocks. Draft mode can be disabled (or
enabled) on a per-page basis by setting `Draft = true` in an `at-meta`
block.

(cherry picked from commit 051bb4a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants