aboutsummaryrefslogtreecommitdiff
path: root/generate.sh
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-02-23 09:04:53 +0000
committerAkshay <[email protected]>2021-02-23 09:04:53 +0000
commitcdde1d9a54ce7f86503956e445dbbaf8540e9b96 (patch)
tree28879e777a0c28cbee9201003523ceb83b5ff1e7 /generate.sh
parentc517871fc2c01128eec660718a5432c9f68c23bd (diff)
add breadcrumbs to all pages
Diffstat (limited to 'generate.sh')
-rwxr-xr-xgenerate.sh23
1 files changed, 17 insertions, 6 deletions
diff --git a/generate.sh b/generate.sh
index ec8921f..cd35442 100755
--- a/generate.sh
+++ b/generate.sh
@@ -105,6 +105,15 @@ intro() {
105 " 105 "
106} 106}
107 107
108breadcrumbs() {
109 # 1 - path
110 cat << EOF
111 <a href="/" class="post-end-link">Home</a>
112 <span>/</span>
113 <a class="post-end-link">$1</a>
114EOF
115}
116
108n_logo() { 117n_logo() {
109 cat << EOF 118 cat << EOF
110 <h1 class="heading">n</h1> 119 <h1 class="heading">n</h1>
@@ -147,12 +156,14 @@ echo
147echo "[+] INDEX" 156echo "[+] INDEX"
148echo "$(n_logo)" >> ./docs/index.html 157echo "$(n_logo)" >> ./docs/index.html
149 158
150cat << EOF | tee -a ./docs/posts/index.html ./docs/art/index.html > /dev/null 159for p in Posts Art; do
151<body> 160 cat << EOF | tee -a ./docs/${p,,}/index.html > /dev/null
152 <div class="posts"> 161 <body>
153 <div class="post"> 162 <div class="posts">
154 <a href="/" class="post-end-link">⟵ Back</a> 163 <div class="post">
164 $(breadcrumbs $p)
155EOF 165EOF
166done
156 167
157cat << EOF >> ./docs/index.html 168cat << EOF >> ./docs/index.html
158 <body> 169 <body>
@@ -165,7 +176,7 @@ EOF
165 176
166# posts 177# posts
167echo -ne " 178echo -ne "
168 <h1>Blog</h1> 179 <h1>Posts</h1>
169 <div class=\"separator\"></div> 180 <div class=\"separator\"></div>
170 <table> 181 <table>
171 " >> ./docs/posts/index.html 182 " >> ./docs/posts/index.html