Skip to content

Commit

Permalink
docs: ✏️ Change prettyurls and use LiveServer for docs
Browse files Browse the repository at this point in the history
According to more recent documentation, prettyurls should be set to true
and LiveServer.jl should be used.

✅ Closes: #54
  • Loading branch information
abelsiqueira committed May 17, 2024
1 parent 68a8016 commit 4749e90
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
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()`

0 comments on commit 4749e90

Please sign in to comment.