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

doc: add instructions to build documentation #1645

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ export default defineConfig({
text: 'Developer',
collapsed: true,
items: [
{ text: 'Macros', link: 'manual/developer/macros'},
{ text: 'Tests', link: 'manual/developer/test'},
{ text: 'Documentation', link: 'manual/developer/documentation'},
]
}
]
Expand Down
27 changes: 27 additions & 0 deletions docs/src/manual/developer/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Documentation

The files for the documentation are located in the
`docs/src/manual/` directory.

## Adding files to the documentation

To add files to the documentation edit directly the file
`docs/src/.vitepress/config.mts`.

## Building the documentation

1. Run julia and execute (with Hecke developed in your current environment)
```julia-repl
julia> using Hecke

julia> Hecke.build_doc() # or Hecke.build_doc(;doctest = false) to speed things up
```

2. In the terminal, navigate to `docs/` and run
```bash
Hecke/docs> npm run docs:build
```
(This step takes place outside of julia.)

!!! note
To speed up the development process, step 1 can be repeated within the same julia session.
7 changes: 3 additions & 4 deletions src/Hecke.jl
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,10 @@
if format == :html
open_doc()
elseif format == :vitepress
println("""Run `mkdocs serve` inside `../Hecke/docs/` to view the documentation.

Use `format = :html` for a simplified version of the docs which does
not require `mkdocs`.
println("""Run `npm run docs:dev` inside `../Hecke/docs/` to view the documentation.

Check warning on line 790 in src/Hecke.jl

View check run for this annotation

Codecov / codecov/patch

src/Hecke.jl#L790

Added line #L790 was not covered by tests
""")
else
error("format :$(format) not recognized")

Check warning on line 793 in src/Hecke.jl

View check run for this annotation

Codecov / codecov/patch

src/Hecke.jl#L793

Added line #L793 was not covered by tests
end
end

Expand Down
Loading