Skip to content
Snippets Groups Projects
Verified Commit bd1a351c authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

add command to update all pages

parent 865424f2
Branches
No related tags found
No related merge requests found
......@@ -93,3 +93,13 @@ export def generate-index [hashes: list<string>] {
...($actual ++ ($hashes | each { $"<li><a href=\"html/($in).html\"><code>($in)</code></a></li> <!-- index -->" }) | uniq)
] | each { $" ($in)" } | str join "\n") | save --force index.html
}
export def update-pages [] {
let cpu = $in.cpu
let figures = $in.figures | flatten figures | update out { path parse | get stem } | rename --column { out: hash }
for f in $figures {
generate-page $cpu $f
}
generate-index $figures.hash
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment