parent
fb7068fddb
commit
dffbad640f
6 changed files with 30 additions and 18 deletions
|
@ -1,6 +0,0 @@
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: docker
|
|
||||||
steps:
|
|
||||||
- run: echo Hello, Runner !
|
|
|
@ -35,7 +35,7 @@ jobs:
|
||||||
echo "Script"
|
echo "Script"
|
||||||
for file in ${ALL_CHANGED_FILES}; do
|
for file in ${ALL_CHANGED_FILES}; do
|
||||||
echo "Script"
|
echo "Script"
|
||||||
./web.sh "$file"
|
./web.sh convert "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
2
dist/.gitignore
vendored
2
dist/.gitignore
vendored
|
@ -1,2 +1,2 @@
|
||||||
|
*.html
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
# Doc
|
# Documentation
|
||||||
|
|
||||||
|
* [Accueil](index.md)
|
||||||
|
|
||||||
|
|
7
scripts/links-to-html.lua
Normal file
7
scripts/links-to-html.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
-- https://stackoverflow.com/questions/40993488/convert-markdown-links-to-html-with-pandoc
|
||||||
|
--
|
||||||
|
-- links-to-html.lua
|
||||||
|
function Link(el)
|
||||||
|
el.target = string.gsub(el.target, "%.md", ".html")
|
||||||
|
return el
|
||||||
|
end
|
|
@ -1,13 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
file=$1
|
convert()
|
||||||
filename=$(basename -- "$file")
|
{
|
||||||
extension="${filename##*.}"
|
file=$1
|
||||||
filename="${filename%.*}"
|
filename=$(basename -- "$file")
|
||||||
|
extension="${filename##*.}"
|
||||||
|
filename="${filename%.*}"
|
||||||
|
|
||||||
|
if [[ -f ../pages/$filename.md ]]
|
||||||
|
then
|
||||||
|
echo "making $filename.html"
|
||||||
|
pandoc -s ../pages/$filename.md -t html > ../dist/$filename.html --lua-filter=links-to-html.lua
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
convert) shift 1; convert "$@";;
|
||||||
|
*) echo "?" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
if [[ -f ../pages/$filename.md ]]
|
|
||||||
then
|
|
||||||
echo "making $filename.html"
|
|
||||||
pandoc -s ../pages/$filename.md -t html > ../dist/$filename.html
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in a new issue