diff options
-rwxr-xr-x | scripts/build_content.sh | 10 | ||||
-rwxr-xr-x | scripts/build_fonts.sh | 26 | ||||
-rwxr-xr-x | scripts/build_sass.sh | 10 | ||||
-rwxr-xr-x | scripts/watch_content.sh | 8 | ||||
-rwxr-xr-x | scripts/watch_filters.sh | 8 | ||||
-rwxr-xr-x | scripts/watch_metadata.sh | 8 | ||||
-rwxr-xr-x | scripts/watch_sass.sh | 8 | ||||
-rwxr-xr-x | scripts/watch_templates.sh | 8 | ||||
-rw-r--r-- | site.defaults.conf | 8 | ||||
-rw-r--r-- | templates/base.html | 13 | ||||
-rw-r--r-- | templates/feed.xml | 1 | ||||
-rw-r--r-- | templates/list.html | 4 | ||||
-rw-r--r-- | templates/page.html | 1 | ||||
-rw-r--r-- | templates/partials/categoriesByCount.html (renamed from templates/categoriesByCount.html) | 0 | ||||
-rw-r--r-- | templates/partials/categoriesById.html (renamed from templates/categoriesById.html) | 0 | ||||
-rw-r--r-- | templates/partials/pageHeader.html (renamed from templates/pageHeader.html) | 0 | ||||
-rw-r--r-- | templates/partials/pageHeaderSm.html (renamed from templates/pageHeaderSm.html) | 0 | ||||
-rw-r--r-- | templates/partials/pagelistByYear.html (renamed from templates/pagelistByYear.html) | 0 |
18 files changed, 83 insertions, 30 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh index 78857b5..e57cfed 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh | |||
@@ -1,12 +1,10 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | SITE="https://volpeon.ink/" | 3 | source "site.defaults.conf" |
4 | 4 | ||
5 | CONTENT_DIR="content/" | 5 | if [ -f "site.conf" ]; then |
6 | FILTERS_DIR="filters/" | 6 | source "site.conf" |
7 | METADATA_DIR="metadata/" | 7 | fi |
8 | TEMPLATES_DIR="templates/" | ||
9 | OUTPUT_DIR="output/" | ||
10 | 8 | ||
11 | get_filters() { | 9 | get_filters() { |
12 | filters_args="" | 10 | filters_args="" |
diff --git a/scripts/build_fonts.sh b/scripts/build_fonts.sh index bd168df..292cef2 100755 --- a/scripts/build_fonts.sh +++ b/scripts/build_fonts.sh | |||
@@ -1,17 +1,23 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | echo -e "\033[0;32m[MINIFY ]\033[0m assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" | 3 | source "site.defaults.conf" |
4 | 4 | ||
5 | pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ | 5 | if [ -f "site.conf" ]; then |
6 | --text-file='assets/fonts/glyphs.txt' \ | 6 | source "site.conf" |
7 | fi | ||
8 | |||
9 | echo -e "\033[0;32m[MINIFY ]\033[0m ${ASSETS_DIR}fonts/iosevka-term-ss09-regular.ttf -> ${OUTPUT_DIR}iosevka-term-ss09-regular.woff2" | ||
10 | |||
11 | pyftsubset ${ASSETS_DIR}fonts/iosevka-term-ss09-regular.ttf \ | ||
12 | --text-file="${ASSETS_DIR}fonts/glyphs.txt" \ | ||
7 | --layout-features+=ss09,dlig \ | 13 | --layout-features+=ss09,dlig \ |
8 | --flavor='woff2' \ | 14 | --flavor="woff2" \ |
9 | --output-file='output/iosevka-term-ss09-regular.woff2' | 15 | --output-file="${OUTPUT_DIR}iosevka-term-ss09-regular.woff2" |
10 | 16 | ||
11 | echo -e "\033[0;32m[MINIFY ]\033[0m assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" | 17 | echo -e "\033[0;32m[MINIFY ]\033[0m ${ASSETS_DIR}fonts/iosevka-term-ss09-bold.ttf -> ${OUTPUT_DIR}iosevka-term-ss09-bold.woff2" |
12 | 18 | ||
13 | pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \ | 19 | pyftsubset ${ASSETS_DIR}fonts/iosevka-term-ss09-bold.ttf \ |
14 | --text-file='assets/fonts/glyphs.txt' \ | 20 | --text-file="${ASSETS_DIR}fonts/glyphs.txt" \ |
15 | --layout-features+=ss09,dlig \ | 21 | --layout-features+=ss09,dlig \ |
16 | --flavor='woff2' \ | 22 | --flavor="woff2" \ |
17 | --output-file='output/iosevka-term-ss09-bold.woff2' | 23 | --output-file="${OUTPUT_DIR}iosevka-term-ss09-bold.woff2" |
diff --git a/scripts/build_sass.sh b/scripts/build_sass.sh index df1c0a9..5bb24d4 100755 --- a/scripts/build_sass.sh +++ b/scripts/build_sass.sh | |||
@@ -1,4 +1,10 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | echo -e "\033[0;32m[COMPILE ]\033[0m assets/css/style.scss -> output/style.css" | 3 | source "site.defaults.conf" |
4 | sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css | 4 | |
5 | if [ -f "site.conf" ]; then | ||
6 | source "site.conf" | ||
7 | fi | ||
8 | |||
9 | echo -e "\033[0;32m[COMPILE ]\033[0m ${ASSETS_DIR}css/style.scss -> ${OUTPUT_DIR}style.css" | ||
10 | sassc ${ASSETS_DIR}css/style.scss | node_modules/.bin/csso > "${OUTPUT_DIR}style.css" | ||
diff --git a/scripts/watch_content.sh b/scripts/watch_content.sh index f0d1b42..92719d3 100755 --- a/scripts/watch_content.sh +++ b/scripts/watch_content.sh | |||
@@ -1,6 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | inotifywait -qrme close_write,delete,move --format "%w%f" content \ | 3 | source "site.defaults.conf" |
4 | |||
5 | if [ -f "site.conf" ]; then | ||
6 | source "site.conf" | ||
7 | fi | ||
8 | |||
9 | inotifywait -qrme close_write,delete,move --format "%w%f" "${CONTENT_DIR%/}" \ | ||
4 | | while read file | 10 | | while read file |
5 | do | 11 | do |
6 | if [ -f "$file" ]; then | 12 | if [ -f "$file" ]; then |
diff --git a/scripts/watch_filters.sh b/scripts/watch_filters.sh index 9bb3b44..21fb686 100755 --- a/scripts/watch_filters.sh +++ b/scripts/watch_filters.sh | |||
@@ -1,6 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | inotifywait -qrme close_write,delete,move --format "%w%f" filters \ | 3 | source "site.defaults.conf" |
4 | |||
5 | if [ -f "site.conf" ]; then | ||
6 | source "site.conf" | ||
7 | fi | ||
8 | |||
9 | inotifywait -qrme close_write,delete,move --format "%w%f" "${FILTERS_DIR%/}" \ | ||
4 | | while read file | 10 | | while read file |
5 | do | 11 | do |
6 | scripts/build_content.sh "all_md" | 12 | scripts/build_content.sh "all_md" |
diff --git a/scripts/watch_metadata.sh b/scripts/watch_metadata.sh index 780177e..cc02ea7 100755 --- a/scripts/watch_metadata.sh +++ b/scripts/watch_metadata.sh | |||
@@ -1,6 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | inotifywait -qrme close_write,delete,move --format "%w%f" metadata \ | 3 | source "site.defaults.conf" |
4 | |||
5 | if [ -f "site.conf" ]; then | ||
6 | source "site.conf" | ||
7 | fi | ||
8 | |||
9 | inotifywait -qrme close_write,delete,move --format "%w%f" "${METADATA_DIR%/}" \ | ||
4 | | while read file | 10 | | while read file |
5 | do | 11 | do |
6 | scripts/build_content.sh "all_md" | 12 | scripts/build_content.sh "all_md" |
diff --git a/scripts/watch_sass.sh b/scripts/watch_sass.sh index d451135..11c210a 100755 --- a/scripts/watch_sass.sh +++ b/scripts/watch_sass.sh | |||
@@ -1,6 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | inotifywait -qrme close_write,delete,move --format "%w%f" assets \ | 3 | source "site.defaults.conf" |
4 | |||
5 | if [ -f "site.conf" ]; then | ||
6 | source "site.conf" | ||
7 | fi | ||
8 | |||
9 | inotifywait -qrme close_write,delete,move --format "%w%f" "${ASSETS_DIR}css" \ | ||
4 | | while read file | 10 | | while read file |
5 | do | 11 | do |
6 | scripts/build_sass.sh | 12 | scripts/build_sass.sh |
diff --git a/scripts/watch_templates.sh b/scripts/watch_templates.sh index 9b464d4..b6149e7 100755 --- a/scripts/watch_templates.sh +++ b/scripts/watch_templates.sh | |||
@@ -1,6 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | inotifywait -qrme close_write,delete,move --format "%w%f" templates \ | 3 | source "site.defaults.conf" |
4 | |||
5 | if [ -f "site.conf" ]; then | ||
6 | source "site.conf" | ||
7 | fi | ||
8 | |||
9 | inotifywait -qrme close_write,delete,move --format "%w%f" "${TEMPLATES_DIR%/}" \ | ||
4 | | while read file | 10 | | while read file |
5 | do | 11 | do |
6 | scripts/build_content.sh "all_md" | 12 | scripts/build_content.sh "all_md" |
diff --git a/site.defaults.conf b/site.defaults.conf new file mode 100644 index 0000000..1c44c50 --- /dev/null +++ b/site.defaults.conf | |||
@@ -0,0 +1,8 @@ | |||
1 | SITE="https://volpeon.ink/" | ||
2 | |||
3 | CONTENT_DIR="content/" | ||
4 | ASSETS_DIR="assets/" | ||
5 | FILTERS_DIR="filters/" | ||
6 | METADATA_DIR="metadata/" | ||
7 | TEMPLATES_DIR="templates/" | ||
8 | OUTPUT_DIR="output/" | ||
diff --git a/templates/base.html b/templates/base.html index 48d7c72..76dd0ba 100644 --- a/templates/base.html +++ b/templates/base.html | |||
@@ -45,22 +45,21 @@ | |||
45 | <div class="c-page__content"> | 45 | <div class="c-page__content"> |
46 | $if(is_home)$ | 46 | $if(is_home)$ |
47 | <header class="c-page-header u-hidden@sm-down" role="presentation"> | 47 | <header class="c-page-header u-hidden@sm-down" role="presentation"> |
48 | ${pageHeader()} | 48 | ${partials/pageHeader()} |
49 | </header> | 49 | </header> |
50 | $endif$ | 50 | $endif$ |
51 | 51 | ||
52 | $body$ | 52 | $if(pages)$ |
53 | 53 | ${list()} | |
54 | $if(section.is_blog)$ | 54 | $else$ |
55 | ${categoriesById()} | 55 | ${page()} |
56 | ${pagelistByYear()} | ||
57 | $endif$ | 56 | $endif$ |
58 | </div> | 57 | </div> |
59 | </main> | 58 | </main> |
60 | 59 | ||
61 | $if(is_home)$ | 60 | $if(is_home)$ |
62 | <template id="header-sm"> | 61 | <template id="header-sm"> |
63 | ${pageHeaderSm()} | 62 | ${partials/pageHeaderSm()} |
64 | </template> | 63 | </template> |
65 | 64 | ||
66 | <script> | 65 | <script> |
diff --git a/templates/feed.xml b/templates/feed.xml index f1439eb..d760b04 100644 --- a/templates/feed.xml +++ b/templates/feed.xml | |||
@@ -42,6 +42,7 @@ | |||
42 | <link href="$it.url.full$"/> | 42 | <link href="$it.url.full$"/> |
43 | <published>$it.date.rfc3339$</published> | 43 | <published>$it.date.rfc3339$</published> |
44 | <updated>$it.date.rfc3339$</updated> | 44 | <updated>$it.date.rfc3339$</updated> |
45 | $-- <content>$it.plain$</content> | ||
45 | </entry> | 46 | </entry> |
46 | $endif$ | 47 | $endif$ |
47 | $endfor$ | 48 | $endfor$ |
diff --git a/templates/list.html b/templates/list.html new file mode 100644 index 0000000..3522754 --- /dev/null +++ b/templates/list.html | |||
@@ -0,0 +1,4 @@ | |||
1 | $body$ | ||
2 | |||
3 | ${partials/categoriesById()} | ||
4 | ${partials/pagelistByYear()} | ||
diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..36d66c2 --- /dev/null +++ b/templates/page.html | |||
@@ -0,0 +1 @@ | |||
$body$ | |||
diff --git a/templates/categoriesByCount.html b/templates/partials/categoriesByCount.html index 871e3db..871e3db 100644 --- a/templates/categoriesByCount.html +++ b/templates/partials/categoriesByCount.html | |||
diff --git a/templates/categoriesById.html b/templates/partials/categoriesById.html index 1f4f433..1f4f433 100644 --- a/templates/categoriesById.html +++ b/templates/partials/categoriesById.html | |||
diff --git a/templates/pageHeader.html b/templates/partials/pageHeader.html index b44f394..b44f394 100644 --- a/templates/pageHeader.html +++ b/templates/partials/pageHeader.html | |||
diff --git a/templates/pageHeaderSm.html b/templates/partials/pageHeaderSm.html index 4db186c..4db186c 100644 --- a/templates/pageHeaderSm.html +++ b/templates/partials/pageHeaderSm.html | |||
diff --git a/templates/pagelistByYear.html b/templates/partials/pagelistByYear.html index ff55f0f..ff55f0f 100644 --- a/templates/pagelistByYear.html +++ b/templates/partials/pagelistByYear.html | |||