Skip to content

Commit 66607a6

Browse files
Sam Morrisonfredrikekre
authored andcommitted
Add docs with Documenter. (#35)
1 parent 1fcd546 commit 66607a6

File tree

7 files changed

+48
-2
lines changed

7 files changed

+48
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
*.jl.cov
22
*.jl.*.cov
33
*.jl.mem
4+
/docs/build/
5+
/docs/Manifest.toml

.travis.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ os:
77
julia:
88
- 0.6
99
- 0.7
10+
- 1.0
1011
- nightly
1112

1213
# # Uncomment the following lines to allow failures on nightly julia
@@ -23,5 +24,16 @@ notifications:
2324
# - julia -e 'Pkg.clone(pwd()); Pkg.build("Example"); Pkg.test("Example"; coverage=true)';
2425

2526
after_success:
26-
- julia -e 'cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())';
27-
# - julia -e 'cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())';
27+
- julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())';
28+
# - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())';
29+
30+
jobs:
31+
include:
32+
- stage: "Documentation"
33+
julia: 1.0
34+
os: linux
35+
script:
36+
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate();
37+
Pkg.develop(PackageSpec(path=pwd()))'
38+
- julia --project=docs/ docs/make.jl
39+
after_success: skip

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Example Julia package repo.
22

33
[![Example](http://pkg.julialang.org/badges/Example_0.6.svg)](http://pkg.julialang.org/?pkg=Example)
44
[![Example](http://pkg.julialang.org/badges/Example_0.7.svg)](http://pkg.julialang.org/?pkg=Example)
5+
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaLang.github.io/Example.jl/stable)
6+
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaLang.github.io/Example.jl/dev)
57

68
Linux and macOS: [![Build Status](https://travis-ci.org/JuliaLang/Example.jl.svg?branch=master)](https://travis-ci.org/JuliaLang/Example.jl)
79

docs/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "~0.20"

docs/make.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using Documenter, Example
2+
3+
makedocs(modules = [Example], sitename = "Example.jl")
4+
5+
deploydocs(
6+
repo = "github.com/JuliaLang/Example.jl.git",
7+
)

docs/src/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Example
2+
3+
Example Julia package repo.
4+
5+
```@autodocs
6+
Modules = [Example]
7+
```

src/Example.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
module Example
22
export hello, domath
33

4+
"""
5+
hello(who::String)
6+
7+
Return "Hello, `who`".
8+
"""
49
hello(who::String) = "Hello, $who"
10+
11+
"""
12+
domath(x::Number)
13+
14+
Return `x + 5`.
15+
"""
516
domath(x::Number) = x + 5
617

718
end

0 commit comments

Comments
 (0)