diff --git a/blog/content/about b/blog/content/about new file mode 120000 index 0000000..e7ec339 --- /dev/null +++ b/blog/content/about @@ -0,0 +1 @@ +../../meta/about/ \ No newline at end of file diff --git a/blog/content/about.md b/blog/content/about.md deleted file mode 120000 index b5f1e0a..0000000 --- a/blog/content/about.md +++ /dev/null @@ -1 +0,0 @@ -../../meta/about.md \ No newline at end of file diff --git a/meta/.default/config.yaml.json b/meta/.default/config.yaml.json deleted file mode 100644 index ab1587e..0000000 --- a/meta/.default/config.yaml.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "baseURL": "", - "languageCode": "en-us", - "title": "Site Title", - "theme": "anubis", - "paginate": 5, - "paginatePath": "posts/-/pages", - "enableRobotsTXT": true, - "disableLiveReload": true, - "minify": true, - "noHTTPCache": true, - "disableFastRender": true, - "rssLimit": 5, - "canonifyurls": true, - "relativeurls": false, - "params": { - "toc": true, - "author": "me", - "email": "", - "avatar": "", - "description": "", - "dateFormat": "2006-01-02", - "paginationSinglePost": false, - "style": "light", - "readMore": true, - "disableSummary": false, - "social": [ - { - "id": "email", - "name": "contact" - } - ] - }, - "menu": { - "main": [ - { - "identifier": "archive", - "name": "Archive", - "title": "Archive", - "url": "/posts/", - "weight": 0 - }, - { - "identifier": "about", - "name": "About", - "title": "About", - "url": "/about/", - "weight": 1 - } - ] - }, - "markup": { - "defaultMarkdownHandler": "goldmark", - "goldmark": { - "extensions": { - "linkify": true, - "strikethrough": true, - "table": true, - "taskList": true - }, - "parser": { - "autoHeadingID": true, - "autoHeadingIDType": "github" - }, - "renderer": { - "unsafe": true - } - }, - "highlight": { - "anchorLineNos": true, - "guessSyntax": true, - "lineNos": true, - "tabWidth": 3 - }, - "tableOfContents": { - "endLevel": 3, - "ordered": false, - "startLevel": 2 - } - }, - "permalinks": { - "posts": "/posts/:year-:month-:day-:filename" - } -} diff --git a/meta/.overrides/about.md.zip/.meta b/meta/.overrides/about.zip/.meta similarity index 57% rename from meta/.overrides/about.md.zip/.meta rename to meta/.overrides/about.zip/.meta index 8897ea1..ed4159d 100644 --- a/meta/.overrides/about.md.zip/.meta +++ b/meta/.overrides/about.zip/.meta @@ -1,9 +1,9 @@ { - "Path": "about.md.zip", - "Name": "about.md.zip", + "Path": "about.zip", + "Name": "about.zip", "Size": -1, "MimeType": "application/zip", - "ModTime": "2021-11-29T21:52:52.504Z", + "ModTime": "2021-11-29T22:08:25.082Z", "IsDir": false, "ID": "14F-QFbXLWuXm3ScC1nr4iEnRcwBLMBFLQfDWmDeLcKM" } diff --git a/meta/.overrides/about.md/index.md b/meta/.overrides/about.zip/about.html similarity index 87% rename from meta/.overrides/about.md/index.md rename to meta/.overrides/about.zip/about.html index d2e5974..b1f8688 100644 --- a/meta/.overrides/about.md/index.md +++ b/meta/.overrides/about.zip/about.html @@ -1 +1 @@ -

Welcome :)

\ No newline at end of file +

Welcome :)

\ No newline at end of file diff --git a/meta/.overrides/about.md.zip/index.md b/meta/.overrides/about/about.html similarity index 87% rename from meta/.overrides/about.md.zip/index.md rename to meta/.overrides/about/about.html index d2e5974..b1f8688 100644 --- a/meta/.overrides/about.md.zip/index.md +++ b/meta/.overrides/about/about.html @@ -1 +1 @@ -

Welcome :)

\ No newline at end of file +

Welcome :)

\ No newline at end of file diff --git a/meta/.overrides/config.yaml.json b/meta/.overrides/config.yaml.json deleted file mode 100644 index 2c6891f..0000000 --- a/meta/.overrides/config.yaml.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "title": "the title of my blog", - "theme": "anubis", - "params": { - "author": "bel", - "email": "bel@bel.bel", - "social": [ - { - "id": "email", - "name": "bel@bel.bel" - } - ] - } -} diff --git a/meta/about.md b/meta/about.md deleted file mode 100644 index e69de29..0000000 diff --git a/meta/about/index.md b/meta/about/index.md new file mode 100644 index 0000000..a847936 --- /dev/null +++ b/meta/about/index.md @@ -0,0 +1,7 @@ +--- +title: "about" +date: 2021-11-29T22:08:25.082Z +draft: false +tags: [] +--- +

Welcome :)

diff --git a/posts.sh b/posts.sh index 343ee6c..f35b625 100644 --- a/posts.sh +++ b/posts.sh @@ -164,7 +164,6 @@ meta() { cp "$extracted_file" "$(extracted "$1")" extracted_file="$(extracted "$1")" else - mv "$extracted_file" "$(dirname "$extracted_file")"/index.md cp -r "$extracted_dir" "$(extracted "$1")" fi local extracted="$(extracted "$1")" @@ -200,11 +199,18 @@ meta() { if [ -e "$must" ]; then rm -rf "$must" fi + log "import: merging $1" merge "$1" + log "must=$must" if [ -e "$must" ]; then return fi + log "must not created by merge, continuing" cp -r "${must%/*}/.overrides/${must##*/}" "$must" + local title="$(echo "$1" | jq -r .Name | sed 's/.zip$//')" + local u_date_iso="$(echo "$1" | jq -r .ModTime)" + log "extracting zip to post: title=$title, must=$must, date=$u_date_iso" + extracted_zip_to_post "$title" "$must" "$u_date_iso" } for b64_json in $(list); do @@ -218,6 +224,7 @@ meta() { pull "$json" log "$filename: extracting" extract "$json" + log "$filename: importing" import "$json" echo "$json" > "$(meta_file "$json")" done @@ -306,7 +313,7 @@ extracted_zip_to_post() { cat "$index_html" >> "$index_md" echo "" >> "$index_md" - rm "$index_html" "$extracted_zip"/*.html + rm -f "$index_html" "$extracted_zip"/*.html for ext in png jpg jpeg gif JPG; do find "$extracted_zip" -name "*.$ext"; done | while read -r line; do convert "$line" -ordered-dither o8x8,8,8,4 "$line.2"