diff --git a/copier.yml b/copier.yml index 3f626e1a..bf084f69 100644 --- a/copier.yml +++ b/copier.yml @@ -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 diff --git a/docs/make.jl b/docs/make.jl index 00045403..1e877cf4 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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"], ), diff --git a/template/docs/Project.toml.jinja b/template/docs/Project.toml.jinja index f7f5ec45..68da6cc0 100644 --- a/template/docs/Project.toml.jinja +++ b/template/docs/Project.toml.jinja @@ -4,6 +4,7 @@ # [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" {{ PackageName }} = "{{ PackageUUID }}" [compat] diff --git a/template/docs/make.jl.jinja b/template/docs/make.jl.jinja index 1902e454..b8a29bc5 100644 --- a/template/docs/make.jl.jinja +++ b/template/docs/make.jl.jinja @@ -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"], ), diff --git a/template/docs/src/90-developer.md.jinja b/template/docs/src/90-developer.md.jinja index d774dbc3..c2a5a652 100644 --- a/template/docs/src/90-developer.md.jinja +++ b/template/docs/src/90-developer.md.jinja @@ -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()`