mirror of
https://git.mills.io/prologic/zs-starter-template.git
synced 2024-11-21 12:56:04 +03:00
Refactor
This commit is contained in:
parent
303eebf94b
commit
dab807f3e2
27
.zs/list
Executable file
27
.zs/list
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! $# = 1 ]; then
|
||||
printf >&2 "Usage: %s <path> [ext]\n" "$(basename "$0")"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
p="$1"
|
||||
t="${2:-md}"
|
||||
|
||||
if [ ! -d "$p" ]; then
|
||||
printf >&2 "error: path %s not found\n" "$p"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find "$p" -type f -name "*.$t" | while read -r file; do
|
||||
name="${file#"$p"}"
|
||||
name="${name#"/"}"
|
||||
name="${name%.*}"
|
||||
|
||||
title="$(zs vars "$file" title)"
|
||||
if [ -z "$title" ]; then
|
||||
title="$name"
|
||||
fi
|
||||
|
||||
echo "- [$title](${p}/${name}.html)"
|
||||
done
|
@ -15,5 +15,5 @@ if [ -n "$ZS_PRODUCTION" ]; then
|
||||
fi
|
||||
|
||||
for js in $JS; do
|
||||
printf "<script type=\"application/javascript\" src=\"/js/%s.%s\"></script>\n" "$js" "$ext"
|
||||
printf "<script type=\"application/javascript\" src=\"/assets/js/%s.%s\"></script>\n" "$js" "$ext"
|
||||
done
|
||||
|
@ -10,12 +10,12 @@
|
||||
<meta name="description" content="{{ description }}" />
|
||||
<meta name="keywords" content="{{ keywords }}" />
|
||||
|
||||
<link rel="stylesheet" href="/reveal.js/css/reset.css">
|
||||
<link rel="stylesheet" href="/reveal.js/css/reveal.css">
|
||||
<link rel="stylesheet" href="/reveal.js/css/theme/black.css">
|
||||
<link rel="stylesheet" href="/assets/reveal.js/css/reset.css">
|
||||
<link rel="stylesheet" href="/assets/reveal.js/css/reveal.css">
|
||||
<link rel="stylesheet" href="/assets/reveal.js/css/theme/black.css">
|
||||
|
||||
<!-- Theme used for syntax highlighted code -->
|
||||
<link rel="stylesheet" href="/reveal.js/plugin/highlight/monokai.css">
|
||||
<link rel="stylesheet" href="/assets/reveal.js/plugin/highlight/monokai.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -28,10 +28,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/reveal.js/js/reveal.js"></script>
|
||||
<script src="/reveal.js/plugin/notes/notes.js"></script>
|
||||
<script src="/reveal.js/plugin/markdown/markdown.js"></script>
|
||||
<script src="/reveal.js/plugin/highlight/highlight.js"></script>
|
||||
<script src="/assets/reveal.js/js/reveal.js"></script>
|
||||
<script src="/assets/reveal.js/plugin/notes/notes.js"></script>
|
||||
<script src="/assets/reveal.js/plugin/markdown/markdown.js"></script>
|
||||
<script src="/assets/reveal.js/plugin/highlight/highlight.js"></script>
|
||||
<script>
|
||||
// More info about initialization & config:
|
||||
// - https://revealjs.com/initialization/
|
||||
|
@ -10,5 +10,5 @@ if [ -n "$ZS_PRODUCTION" ]; then
|
||||
fi
|
||||
|
||||
for css in $CSS; do
|
||||
printf "<link rel=\"stylesheet\" href=\"/css/%s.%s\">\n" "$css" "$ext"
|
||||
printf "<link rel=\"stylesheet\" href=\"/assets/css/%s.%s\">\n" "$css" "$ext"
|
||||
done
|
||||
|
3
index.md
3
index.md
@ -76,8 +76,7 @@ With the [wikilink][wikilink] extension you can link to other pages more easily
|
||||
|
||||
### We can even do slides!
|
||||
|
||||
- [[SlideExample]]
|
||||
- [[TestSlides]]
|
||||
{{ list slides }}
|
||||
|
||||
## License
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user