mirror of
https://git.mills.io/prologic/zs-starter-template.git
synced 2024-11-21 21:06:03 +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
|
fi
|
||||||
|
|
||||||
for js in $JS; do
|
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
|
done
|
||||||
|
@ -6,16 +6,16 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
|
||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
<meta name="title" content="{{ title }}" />
|
<meta name="title" content="{{ title }}" />
|
||||||
<meta name="description" content="{{ description }}" />
|
<meta name="description" content="{{ description }}" />
|
||||||
<meta name="keywords" content="{{ keywords }}" />
|
<meta name="keywords" content="{{ keywords }}" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="/reveal.js/css/reset.css">
|
<link rel="stylesheet" href="/assets/reveal.js/css/reset.css">
|
||||||
<link rel="stylesheet" href="/reveal.js/css/reveal.css">
|
<link rel="stylesheet" href="/assets/reveal.js/css/reveal.css">
|
||||||
<link rel="stylesheet" href="/reveal.js/css/theme/black.css">
|
<link rel="stylesheet" href="/assets/reveal.js/css/theme/black.css">
|
||||||
|
|
||||||
<!-- Theme used for syntax highlighted code -->
|
<!-- 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>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -28,10 +28,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/reveal.js/js/reveal.js"></script>
|
<script src="/assets/reveal.js/js/reveal.js"></script>
|
||||||
<script src="/reveal.js/plugin/notes/notes.js"></script>
|
<script src="/assets/reveal.js/plugin/notes/notes.js"></script>
|
||||||
<script src="/reveal.js/plugin/markdown/markdown.js"></script>
|
<script src="/assets/reveal.js/plugin/markdown/markdown.js"></script>
|
||||||
<script src="/reveal.js/plugin/highlight/highlight.js"></script>
|
<script src="/assets/reveal.js/plugin/highlight/highlight.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// More info about initialization & config:
|
// More info about initialization & config:
|
||||||
// - https://revealjs.com/initialization/
|
// - https://revealjs.com/initialization/
|
||||||
|
@ -10,5 +10,5 @@ if [ -n "$ZS_PRODUCTION" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for css in $CSS; do
|
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
|
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!
|
### We can even do slides!
|
||||||
|
|
||||||
- [[SlideExample]]
|
{{ list slides }}
|
||||||
- [[TestSlides]]
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user