-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from cecoeco/main
added docs
- Loading branch information
Showing
10 changed files
with
416 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% import "partials/language.html" as lang with context %} | ||
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-component="source"> | ||
<div class="md-source__icon md-icon"> | ||
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %} | ||
{% include ".icons/" ~ icon ~ ".svg" %} | ||
</div> | ||
<div class="md-source__repository"> | ||
{{ config.repo_name }} | ||
</div> | ||
</a> | ||
{% if config.theme.twitter_url %} | ||
<a href="{{ config.theme.twitter_url }}" title="Go to Twitter" class="md-source"> | ||
<div class="md-source__icon md-icon"> | ||
{% include ".icons/fontawesome/brands/twitter.svg" %} | ||
</div> | ||
<div class="md-source__repository"> | ||
{{ config.theme.twitter_name }} | ||
</div> | ||
</a> | ||
{% endif %} | ||
{% if config.theme.sponsor_url %} | ||
<a href="{{ config.theme.sponsor_url }}" title="Go to Sponsor" class="md-source"> | ||
<div class="md-source__icon md-icon"> | ||
{% include ".icons/fontawesome/regular/heart.svg" %} | ||
</div> | ||
<div class="md-source__repository"> | ||
{{ config.theme.sponsor_name }} | ||
</div> | ||
</a> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
using Documenter, DocumenterMarkdown | ||
using Literate | ||
|
||
get_example_path(p) = joinpath(@__DIR__, ".", "examples", p) | ||
OUTPUT = joinpath(@__DIR__, "src", "examples", "generated") | ||
|
||
folders = readdir(joinpath(@__DIR__, ".", "examples")) | ||
|
||
function getfiles() | ||
srcsfiles = [] | ||
for f in folders | ||
names = readdir(joinpath(@__DIR__, ".", "examples", f)) | ||
fpaths = "$(f)/" .* names | ||
srcsfiles = vcat(srcsfiles, fpaths...) | ||
end | ||
return srcsfiles | ||
end | ||
|
||
srcsfiles = getfiles() | ||
|
||
for (d, paths) in (("tutorial", srcsfiles),) | ||
for p in paths | ||
Literate.markdown(get_example_path(p), joinpath(OUTPUT, dirname(p)); | ||
documenter=true) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,54 @@ | ||
using Documenter, DocumenterMarkdown | ||
using HTTR | ||
|
||
include("genfiles.jl") | ||
|
||
DocTestMeta = quote | ||
using HTTR | ||
end | ||
|
||
DocMeta.setdocmeta!(HTTR, :DocTestSetup, DocTestMeta; recursive=true) | ||
|
||
makedocs( | ||
modules=[HTTR], | ||
clean=true, | ||
doctest=false, | ||
#format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), | ||
sitename="HTTR.jl", | ||
authors="Karandeep Singh et al.", | ||
strict=[ | ||
:doctest, | ||
:linkcheck, | ||
:parse_error, | ||
:example_block, | ||
# Other available options are | ||
# :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block, | ||
# :footnote, :meta_block, :missing_docs, :setup_block | ||
], | ||
checkdocs=:all, | ||
format=Markdown(), | ||
draft=false, | ||
build=joinpath(@__DIR__, "docs") | ||
) | ||
|
||
deploydocs( | ||
devurl="latest", | ||
repo="https://github.com/TidierOrg/HTTR.jl", | ||
push_preview=true, | ||
deps=Deps.pip( | ||
"mkdocs", | ||
"pygments", | ||
"python-markdown-math", | ||
"mkdocs-material", | ||
"pymdown-extensions", | ||
"mkdocstrings", | ||
"mknotebooks", | ||
"pytkdocs_tweaks", | ||
"mkdocs_include_exclude_files", | ||
"jinja2", | ||
"mkdocs-video" | ||
), | ||
make=() -> run(`mkdocs build`), | ||
target="site", | ||
devbranch="main" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,114 @@ | ||
|
||
theme: | ||
name: material | ||
logo: assets/logo.png | ||
features: | ||
- content.code.copy | ||
# - announce.dismiss | ||
- content.code.annotate | ||
# - content.tabs.link | ||
#- content.tooltips | ||
# - header.autohide | ||
# - navigation.expand | ||
#- navigation.indexes | ||
# - navigation.instant | ||
# - navigation.prune | ||
#- navigation.sections | ||
#- navigation.tabs | ||
# - navigation.tabs.sticky | ||
- navigation.top | ||
- navigation.footer | ||
#- navigation.tracking | ||
- search.highlight | ||
- search.share | ||
- search.suggest | ||
- toc.follow | ||
#- toc.integrate # Table of contents is integrated on the left; does not appear separately on the right. | ||
- header.autohide # header disappears as you scroll | ||
palette: | ||
|
||
# Light mode | ||
- media: "(prefers-color-scheme: light)" | ||
scheme: default | ||
primary: crimson | ||
accent: cyan | ||
toggle: | ||
icon: material/weather-sunny | ||
name: Switch to dark mode | ||
|
||
# Dark mode | ||
- media: "(prefers-color-scheme: dark)" | ||
scheme: slate | ||
primary: crimson | ||
accent: cyan | ||
toggle: | ||
icon: material/weather-night | ||
name: Switch to light mode | ||
font: | ||
text: Lato | ||
icon: | ||
repo: fontawesome/brands/github # GitHub logo in top right | ||
#logo: "material/gridoff" # Equinox logo in top left | ||
# favicon: "_static/icon_transparent.svg" | ||
custom_dir: "_overrides" # Overriding part of the HTML | ||
|
||
# These additions are my own custom ones, having overridden a partial. | ||
#twitter_name: "" | ||
#twitter_url: "" | ||
site_name: HTTR.jl | ||
site_description: HTTR.jl | ||
site_author: Lazaro Alonso and Karandeep Singh | ||
site_url: "" | ||
|
||
repo_url: https://github.com/TidierOrg/HTTR.jl | ||
repo_name: HTTR.jl | ||
edit_uri: "" # No edit button, as some of our pages are in /docs and some in /examples via symlink, so it's impossible for them all to be accurate | ||
|
||
strict: true # Don't allow warnings during the build process | ||
extra_javascript: | ||
# The below three make MathJax work, see https://squidfunk.github.io/mkdocs-material/reference/mathjax/ | ||
- _static/mathjax.js | ||
- https://polyfill.io/v3/polyfill.min.js?features=es6 | ||
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js | ||
|
||
extra: | ||
social: | ||
- icon: fontawesome/brands/github | ||
link: https://github.com/kdpsingh | ||
- icon: fontawesome/brands/twitter | ||
link: https://twitter.com/kdpsinghlab | ||
|
||
extra_css: | ||
- stylesheets/custom.css | ||
- assets/Documenter.css | ||
|
||
markdown_extensions: | ||
- tables | ||
- admonition | ||
- toc: | ||
permalink: "¤" # Adds a clickable permalink to each section heading | ||
toc_depth: 4 | ||
- pymdownx.arithmatex: # Render LaTeX via MathJax | ||
generic: true | ||
- pymdownx.details # Allowing hidden expandable regions denoted by ??? | ||
- pymdownx.highlight | ||
- pymdownx.inlinehilite | ||
- pymdownx.snippets | ||
- pymdownx.superfences # Seems to enable syntax highlighting when used with the Material theme. | ||
- pymdownx.tasklist: | ||
custom_checkbox: true | ||
- def_list | ||
- pymdownx.tabbed: | ||
alternate_style: true | ||
- attr_list | ||
- md_in_html | ||
plugins: | ||
- search # default search plugin; needs manually re-enabling when using any other plugins | ||
- autorefs # Cross-links to headings | ||
- include_exclude_files: | ||
exclude: | ||
- "_overrides" | ||
# - mknotebooks # Jupyter notebooks | ||
#- mkdocs-video | ||
nav: | ||
- "Home": "index.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
window.MathJax = { | ||
tex: { | ||
inlineMath: [["\\(", "\\)"]], | ||
displayMath: [["\\[", "\\]"]], | ||
processEscapes: true, | ||
processEnvironments: true | ||
}, | ||
options: { | ||
ignoreHtmlClass: ".*|", | ||
processHtmlClass: "arithmatex" | ||
} | ||
}; | ||
|
||
document$.subscribe(() => { | ||
MathJax.typesetPromise() | ||
}) |
Oops, something went wrong.