summaryrefslogtreecommitdiff
path: root/.local/bin/sshf
blob: 44766bc84342baaee19727762ff87155c85c9016 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

# Get the _header.html and _footer.html required for ssg from an already defined html.
main() {
	in_file="${1:-$HOME/dox/www/luevano.xyz/luevano/index.html}"
	out_folder="${2:-$HOME/dow/www/blog/src}"

	sed '/<\/header/q' $in_file > $out_folder/_header.html
	sed -i "s/<title>Luévano/<title>Luévano's Blog/g" $out_folder/_header.html
	# Not proud of this, lol.
	tac $in_file | sed '/<footer/q' | tac > $out_folder/_footer.html
}

main "$@"