Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages #262

Merged
merged 3 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion defaults/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ code-block-font-size: \scriptsize

titlepage: true
linkReferences: true
bibliography: bibliography.bib
link-citations: true

# These table of contents settings only affect the PDF.
Expand Down
2 changes: 2 additions & 0 deletions docs/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ pdf-footer: ""
# Avoid adding a blank page before each chapter.
disable-cleardoublepage: true

bibliography: bibliography.bib

titlepage-top: >
\begin{tabular}{l}
Rik Huijzer\\
Expand Down
6 changes: 4 additions & 2 deletions src/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,14 @@ Return the url prefix when `is_ci() == true`.

# Example
```jldoctest
julia> cd(pkgdir(Books)) do
julia> docs_dir = joinpath(pkgdir(Books), "docs");

julia> cd(docs_dir) do
Books.ci_url_prefix("default")
end
""

julia> cd(joinpath(pkgdir(Books), "docs")) do
julia> cd(docs_dir) do
Books.ci_url_prefix("test")
end
"/Example.jl"
Expand Down
12 changes: 11 additions & 1 deletion src/defaults.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,17 @@ end

function user_config(project::AbstractString)
path = "config.toml"
isfile(path) ? project_info(path, project) : nothing
if isfile(path)
return project_info(path, project)
else
default_config_path = joinpath(Books.DEFAULTS_DIR, "config.toml")
absolute_config_path = joinpath(pwd(), "config.toml")
msg = """
No file found at $absolute_config_path.
(See $default_config_path for an example configuration.)
"""
@warn msg
end
end

"""
Expand Down