Compare commits
2 Commits
b674c4094b
...
0451d0e45b
| Author | SHA1 | Date | |
|---|---|---|---|
| 0451d0e45b | |||
| 1023fff7ff |
@@ -1,5 +1,5 @@
|
|||||||
baseURL = "https://shockrah.xyz"
|
baseURL = "https://shockrah.xyz"
|
||||||
languageCode = "en-us"
|
locale = "en-us"
|
||||||
title = "Shockrah's Blog"
|
title = "Shockrah's Blog"
|
||||||
description = "Place to post stuff"
|
description = "Place to post stuff"
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
baseURL = "https://shockrah.neocities.org"
|
|
||||||
languageCode = "en-us"
|
|
||||||
title = "Shockrah's Blog"
|
|
||||||
description = "Place to post stuff"
|
|
||||||
|
|
||||||
theme = "shockrah.xyz"
|
|
||||||
|
|
||||||
enableEmoji = true
|
|
||||||
|
|
||||||
[markup.goldmark.renderer]
|
|
||||||
unsafe = true
|
|
||||||
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
baseURL = "https://shockrah.gitlab.io/shockrah-city"
|
|
||||||
languageCode = "en-us"
|
|
||||||
title = "Shockrah's Blog"
|
|
||||||
description = "Place to post stuff"
|
|
||||||
|
|
||||||
theme = "shockrah.xyz"
|
|
||||||
|
|
||||||
enableEmoji = true
|
|
||||||
|
|
||||||
[markup.goldmark.renderer]
|
|
||||||
unsafe = true
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import hashlib
|
|
||||||
|
|
||||||
with open('public/tags/index.xml') as file:
|
|
||||||
data = hashlib.sha1(file.read().encode('utf-8'))
|
|
||||||
|
|
||||||
remote = '99d66a9e171feaf11be88b831bc69c55d85c1b4b'
|
|
||||||
print(remote == data.hexdigest())
|
|
||||||
18
scripts/new-post.py
Normal file
18
scripts/new-post.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
from subprocess import check_call
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
if len(sys.argv) == 1:
|
||||||
|
print('No title given!')
|
||||||
|
sys.exit(1)
|
||||||
|
title = ' '.join(sys.argv[1:])
|
||||||
|
filename = title.lower().replace(' ', '-') + '.md'
|
||||||
|
|
||||||
|
# Creating the new base post
|
||||||
|
target = Path(f'content/posts/{filename}')
|
||||||
|
if target.is_file():
|
||||||
|
print(f'File \'{target}\' already present, nothing to do')
|
||||||
|
else:
|
||||||
|
check_call(f'hugo new {target}'.split())
|
||||||
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
[[ "$1" = "" ]] && echo No filename given for new post\! && exit 1
|
|
||||||
|
|
||||||
name="$(basename -s .md $1)"
|
|
||||||
|
|
||||||
echo Creating new post content/posts/$name.md with metadata:
|
|
||||||
cat << EOF | tee content/posts/"$name.md"
|
|
||||||
---
|
|
||||||
title: $(basename -s .md "$file")
|
|
||||||
date: $(date '+%F')
|
|
||||||
draft: false
|
|
||||||
description:
|
|
||||||
category: article
|
|
||||||
image:
|
|
||||||
---
|
|
||||||
EOF
|
|
||||||
Reference in New Issue
Block a user