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

docs: ✏️ Change prettyurls and use LiveServer for docs #94

Merged
merged 1 commit into from
May 17, 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
1 change: 1 addition & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PackageUUID:
type: str
help: UUID v4 (Generate this with uuidgen or in Julia with `using UUIDs; uuid4()`)
validator: "{% if PackageUUID | length == 0 %}Can't be empty{% endif %}"
default: "{{ 999999999999999999999999999999999 | ans_random | to_uuid }}"

PackageOwner:
type: str
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ makedocs(;
repo = "https://github.com/abelsiqueira/COPIERTemplate.jl/blob/{commit}{path}#{line}",
sitename = "COPIERTemplate.jl",
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", "false") == "true",
prettyurls = true,
canonical = "https://abelsiqueira.github.io/COPIERTemplate.jl",
assets = ["assets/style.css"],
),
Expand Down
1 change: 1 addition & 0 deletions template/docs/Project.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
{{ PackageName }} = "{{ PackageUUID }}"

[compat]
Expand Down
2 changes: 1 addition & 1 deletion template/docs/make.jl.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ makedocs(;
repo = "https://github.com/{{ PackageOwner }}/{{ PackageName }}.jl/blob/{commit}{path}#{line}",
sitename = "{{ PackageName }}.jl",
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", "false") == "true",
prettyurls = true,
canonical = "https://{{ PackageOwner }}.github.io/{{ PackageName }}.jl",
assets = ["assets/style.css"],
),
Expand Down
13 changes: 13 additions & 0 deletions template/docs/src/90-developer.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,16 @@ If this is the first time you work with this repository, follow the instructions
```

- Then you can open a pull request and work with the reviewer to address any issues.

## Building and viewing the documentation locally

Following the latest suggestions, we recommend using `LiveServer` to build the documentation.
Here is how you do it:

1. Run `julia --project=docs` to open Julia in the environment of the docs.
1. If this is the first time building the docs
1. Press `]` to enter `pkg` mode
1. Run `pkg> dev .` to use the development version of your package
1. Press backspace to leave `pkg` mode
1. Run `julia> using LiveServer`
1. Run `julia> servedocs()`
Loading