Skip to content

Commit

Permalink
Add documentation with Documenter.jl (JuliaGeometry#68)
Browse files Browse the repository at this point in the history
* add docs

* update gitignore

* add docs in ci.yml

* update document badges in README

* Update docs/Project.toml

Co-authored-by: Seth Axen <[email protected]>

* Update docs/src/index.md

Co-authored-by: Seth Axen <[email protected]>

Co-authored-by: Seth Axen <[email protected]>
  • Loading branch information
hyrodium and sethaxen authored Feb 23, 2022
1 parent 766add4 commit 994fef8
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,19 @@ jobs:
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: julia --project=docs -e '
using Pkg;
Pkg.develop(PackageSpec(; path=pwd()));
Pkg.instantiate();'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/Manifest.toml
Manifest.toml
/test/coverage/Manifest.toml
docs/build
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Quaternions.jl
A Julia module with quaternion, octonion and dual-quaternion functionality

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaGeometry.github.io/Quaternions.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaGeometry.github.io/Quaternions.jl/dev)
[![Build Status](https://github.com/JuliaGeometry/Quaternions.jl/workflows/CI/badge.svg)](https://github.com/JuliaGeometry/Quaternions.jl/actions?query=workflow%3ACI+branch%3Amaster)
[![codecov](https://codecov.io/gh/JuliaGeometry/Quaternions.jl/branch/master/graph/badge.svg?token=dJBiR91dCD)](https://codecov.io/gh/JuliaGeometry/Quaternions.jl)

Expand Down
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
22 changes: 22 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Quaternions
using Documenter

DocMeta.setdocmeta!(Quaternions, :DocTestSetup, :(using Quaternions); recursive=true)

makedocs(;
modules=[Quaternions],
repo="https://github.com/JuliaGeometry/Quaternions.jl/blob/{commit}{path}#{line}",
sitename="Quaternions.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://JuliaGeometry.github.io/Quaternions.jl",
assets = ["assets/custom.css"],
),
pages=[
"Home" => "index.md",
],
)

deploydocs(;
repo="github.com/JuliaGeometry/Quaternions.jl",
)
25 changes: 25 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Quaternions.jl

A Julia package implementing [quaternions](https://en.wikipedia.org/wiki/Quaternion), [octonions](https://en.wikipedia.org/wiki/Octonion) and [dual-quaternions](https://en.wikipedia.org/wiki/Dual_quaternion)

!!! note "Documentation"
The documentation is still work in progress.
For more information, see also
* [README in the repository](https://github.com/JuliaGeometry/Quaternions.jl)
* [Tests in the repository](https://github.com/JuliaGeometry/Quaternions.jl/tree/master/test)
Feel free to [open pull requests](https://github.com/JuliaGeometry/Quaternions.jl/pulls) and improve this document!

## Installation
```
pkg> add Quaternions
```

## First example

```@repl
using Quaternions
q = quat(0.0, 0.0, 0.0, 1.0)
r = quat(0, 0, 1, 0)
q*r
q+r
```

0 comments on commit 994fef8

Please sign in to comment.