diff options
Diffstat (limited to 'generate.sh')
-rwxr-xr-x | generate.sh | 23 |
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 | ||
108 | breadcrumbs() { | ||
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> | ||
114 | EOF | ||
115 | } | ||
116 | |||
108 | n_logo() { | 117 | n_logo() { |
109 | cat << EOF | 118 | cat << EOF |
110 | <h1 class="heading">n</h1> | 119 | <h1 class="heading">n</h1> |
@@ -147,12 +156,14 @@ echo | |||
147 | echo "[+] INDEX" | 156 | echo "[+] INDEX" |
148 | echo "$(n_logo)" >> ./docs/index.html | 157 | echo "$(n_logo)" >> ./docs/index.html |
149 | 158 | ||
150 | cat << EOF | tee -a ./docs/posts/index.html ./docs/art/index.html > /dev/null | 159 | for 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) | ||
155 | EOF | 165 | EOF |
166 | done | ||
156 | 167 | ||
157 | cat << EOF >> ./docs/index.html | 168 | cat << EOF >> ./docs/index.html |
158 | <body> | 169 | <body> |
@@ -165,7 +176,7 @@ EOF | |||
165 | 176 | ||
166 | # posts | 177 | # posts |
167 | echo -ne " | 178 | echo -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 |