Skip to content

Commit

Permalink
setup Documenter.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Evizero committed Aug 25, 2017
1 parent b786cfc commit 287fd8a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ git:
## (tests will run but not make your overall status red)
matrix:
allow_failures:
- julia: nightly
- julia: nightly

## uncomment and modify the following lines to manually install system packages
#addons:
Expand All @@ -31,5 +31,7 @@ matrix:
after_success:
# push coverage results to Coveralls
- julia -e 'cd(Pkg.dir("ReferenceTests")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
- julia -e 'Pkg.add("Documenter")'
- julia -e 'cd(Pkg.dir("ReferenceTests")); include(joinpath("docs", "make.jl"))'
# push coverage results to Codecov
# - julia -e 'cd(Pkg.dir("ReferenceTests")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build/
site/
20 changes: 19 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
using Documenter, ReferenceTests

makedocs()
makedocs(
modules = [ReferenceTests],
clean = false,
format = :html,
sitename = "ReferenceTests.jl",
authors = "Christof Stocker",
linkcheck = !("skiplinks" in ARGS),
pages = Any[
"Home" => "index.md"
],
html_prettyurls = !("local" in ARGS),
)

deploydocs(
repo = "github.com/Evizero/ReferenceTests.jl.git",
target = "build",
deps = nothing,
make = nothing,
)
11 changes: 9 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ common example of such would be a custom `Base.show` method.
# Examples
```jldoctest
julia> using ReferenceTests
julia> @io2str print(::IO, "Hello World")
"Hello World"
Expand Down Expand Up @@ -64,8 +66,13 @@ Make sure that `ex` is evaluated while `Base.have_color` is set
to `true`. The original value of `Base.have_color` will be
restored afterwards.
This macro is particularily useful for CI, where `julia` is
executed without the `--color=yes` argument by default.
This macro is particularily useful for CI, where it is not
unusual that `julia` is executed without the `--color=yes`
argument by default.
```julia
@withcolor print_with_color(:green, "foo")
```
"""
macro withcolor(expr)
:(withcolor(()->$(esc(expr))))
Expand Down

0 comments on commit 287fd8a

Please sign in to comment.