Task 1
Solve task 1
Documenter.jl
File-structure overview
Example/
├── Project.toml
├── README.md
├── LICENSE.md
├── src
│ ├── Example.jl
│ └── utilities.jl
└── docs
├── Project.toml
├── src
│ ├── assets
│ │ ├── favicon.ico
│ │ └── logo.svg
│ ├── index.md
│ └── showcase.md
└── make.jl
The make.jl
file
using Documenter, Example
makedocs(
= "Example.jl",
sitename = [Example],
modules = Any[
pages "Home" => "index.md",
"Showcase" => "showcase.md",
], )
How to generate
julia --project=docs/ docs/make.jl
, or]activate docs/; include("docs/make.jl")
, orLiveServer.jl
+deploydocs()
How to write
# Normal Markdown is great
Also write lots of text
```@example Main
a = 1
```
More text!
```@example Main
b = a
```
```@example NewScope
a = 3 # a new a appears!
```
Bonus: Literate.jl
Using Literate.jl
one does not need to write .md
files - but rather can use .jl
files that are translated to .md
files.
# # This is markdown headline
# This is normal markdown code
1 ==1
# Be careful in forloops with comments, Literate
## this is a comment
Task 2
Solve task 2
PkgTemplate.jl
--temp
]activate
]add PkgTemplatesusing PkgTemplates
= Template(user="yourGithubUser",
tpl ="./PkgTemplate", # the new package will appear in this folder
dir=[GitHubActions(;extra_versions=["nightly"]),Documenter{GitHubActions}()])
pluginstpl("MyStatisticsPackage") # created in ./PkgTemplate/MyStatisticsPackage/Project.toml
This will create the Project+Git, but also setup github-actions / ContinuousIntegration with tests and docs.
You still need to go to github.com (or use gh repo create
with the gh-command line interface) and create an not-initialized / empty repository with the same name (but .jl added), and run
://github.com/behinger/MyStatisticsPackage.jl
git remote add origin https-u origin main git push
Finally, to activate documentation being deployed, you need to go to your Github-Repo, go to Settings, Pages and select the gh_page branch to be deployed.
Tip
You can also run the PkgTemplate interactively using
Template(interactive=true)("MyPkg")
Which will ask you a hundred million questions ;-)
Task 3
Solve task 3