Compare commits
8 Commits
04648315a8
...
86bbcfd935
Author | SHA1 | Date | |
---|---|---|---|
86bbcfd935 | |||
707ee001f6 | |||
593e575589 | |||
4a558e5414 | |||
c193f1d5c9 | |||
bd816e74fb | |||
ff7d5f8e60 | |||
d235149057 |
MakefileREADME.mdphpsg.sh
src/blog
2016-05-18-hello-world.cfg.php2016-05-18-hello-world.html.php2016-05-19-ethical-giving.cfg.php2016-05-19-ethical-giving.html.php2016-05-23-the-television-is-cancer.cfg.php2016-05-23-the-television-is-cancer.html.php2016-05-25-small-talk.cfg.php2016-05-25-small-talk.html.php2016-05-26-the-new-era-of-script-kiddies.cfg.php2016-05-26-the-new-era-of-script-kiddies.html.php2016-06-05-resources-for-learning-x86_64-assembly.cfg.php2016-06-05-resources-for-learning-x86_64-assembly.html.php2016-06-06-why-i-hate-the-web.cfg.php2016-06-06-why-i-hate-the-web.html.php2016-07-04-game-website-app-creators.cfg.php2016-07-04-game-website-app-creators.html.php2016-07-05-why-i-am-a-gpl-advocate.cfg.php2016-07-05-why-i-am-a-gpl-advocate.html.php2016-07-18-my-favorite-firefox-addons.cfg.php2016-07-18-my-favorite-firefox-addons.html.php2016-07-22-new-website-design.cfg.php2016-07-22-new-website-design.html.php2016-07-25-my-favorite-vim-plugins.cfg.php2016-07-25-my-favorite-vim-plugins.html.php2016-07-31-my-first-superficial-impressions-of-freebsd.cfg.php2016-07-31-my-first-superficial-impressions-of-freebsd.html.php2016-08-13-strict-compilers.cfg.php2016-08-13-strict-compilers.html.php2016-08-17-tox.cfg.php2016-08-17-tox.html.php2016-08-20-my-loathing-of-apple.cfg.php2016-08-20-my-loathing-of-apple.html.php2016-08-25-what-is-lacking-in-education?.cfg.php2016-08-25-what-is-lacking-in-education?.html.php2016-09-02-the-https-hype.cfg.php2016-09-02-the-https-hype.html.php2016-09-30-educational-software.cfg.php2016-09-30-educational-software.html.php2016-10-06-adobe-flash-needs-to-die.cfg.php2016-10-06-adobe-flash-needs-to-die.html.php2016-10-08-why-i-use-cc-by-nd.cfg.php2016-10-08-why-i-use-cc-by-nd.html.php2016-10-27-avoiding-youtube-non-free-javascript.cfg.php2016-10-27-avoiding-youtube-non-free-javascript.html.php2016-11-15-studying-for-my-c++-exam.cfg.php2016-11-15-studying-for-my-c++-exam.html.php2016-11-22-for-tabs.cfg.php2016-11-22-for-tabs.html.php2016-11-28-the-importance-of-libre-games.cfg.php2016-11-28-the-importance-of-libre-games.html.php2016-11-29-non-free-firmware.cfg.php2016-11-29-non-free-firmware.html.php2016-12-05-why-i-use-cli.cfg.php2016-12-05-why-i-use-cli.html.php2016-12-19-my-preference-for-c.cfg.php2016-12-19-my-preference-for-c.html.php2016-12-22-we-i3-now.cfg.php2016-12-22-we-i3-now.html.php2016-12-24-books.cfg.php2016-12-24-books.html.php2016-12-25-merry-grav-mass.cfg.php2016-12-25-merry-grav-mass.html.php2017-01-07-getting-esperanto-diacritics-on-gnu-linux.cfg.php2017-01-07-getting-esperanto-diacritics-on-gnu-linux.html.php2017-01-13-parabola-gnu-linux-libre.cfg.php2017-01-13-parabola-gnu-linux-libre.html.php2017-01-14-the-onion-router.cfg.php2017-01-14-the-onion-router.html.php2017-01-26-esperanto.cfg.php2017-01-26-esperanto.html.php2017-01-30-developers-as-an-audience.cfg.php2017-01-30-developers-as-an-audience.html.php2017-02-20-parabola-with-lvm-on-luks.cfg.php2017-02-20-parabola-with-lvm-on-luks.html.php2017-02-21-encrypted-backup-drive.cfg.php2017-02-21-encrypted-backup-drive.html.php2017-03-05-change-of-heart-on-https.cfg.php2017-03-05-change-of-heart-on-https.html.php2017-03-25-reasons-not-to-use-the-gpl.cfg.php2017-03-25-reasons-not-to-use-the-gpl.html.php2017-04-08-the-unused-potential-of-bitmessage.cfg.php2017-04-08-the-unused-potential-of-bitmessage.html.php2017-04-18-a-library-copyleft-license-combination.cfg.php2017-04-18-a-library-copyleft-license-combination.html.php2017-04-20-judgement.cfg.php2017-04-20-judgement.html.php2017-05-02-patch-files.cfg.php2017-05-02-patch-files.html.php2017-05-12-from-parabola-to-arch.cfg.php2017-05-12-from-parabola-to-arch.html.php2017-05-13-your-computer-your-computing.cfg.php2017-05-13-your-computer-your-computing.html.php2017-05-14-the-beauty-of-silence.cfg.php2017-05-14-the-beauty-of-silence.html.php2017-05-29-summer-album.cfg.php2017-05-29-summer-album.html.php2017-06-21-humour.cfg.php
27
Makefile
27
Makefile
@ -1,27 +0,0 @@
|
||||
OUTPUT_DIR=./output
|
||||
WEB_ROOT=/var/www/themusicinnoise.net/main
|
||||
|
||||
.PHONY: all pages blog clean install
|
||||
|
||||
all: pages blog
|
||||
cp -r static/* $(OUTPUT_DIR)
|
||||
|
||||
pages:
|
||||
mkdir -p $(OUTPUT_DIR)
|
||||
find pages -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait -o $(OUTPUT_DIR)/
|
||||
|
||||
blog:
|
||||
mkdir -p $(OUTPUT_DIR)/blog
|
||||
cat templates/page/header.html blog/templates/index.html/header-part.html > blog/templates/index.html/header.html
|
||||
sed -i -e 's/\$${title}/Blog/' blog/templates/index.html/header.html
|
||||
cat blog/templates/index.html/footer-part.html templates/page/footer.html > blog/templates/index.html/footer.html
|
||||
find blog/posts -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait -o $(OUTPUT_DIR)/blog/ -t blog/templates/
|
||||
|
||||
clean:
|
||||
rm -rf $(OUTPUT_DIR)
|
||||
rm -f blog/templates/index.html/header.html
|
||||
rm -f blog/templates/index.html/footer.html
|
||||
|
||||
install: all
|
||||
mkdir -p $(WEB_ROOT)
|
||||
cp -r $(OUTPUT_DIR)/* $(WEB_ROOT)/
|
13
README.md
Normal file
13
README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# The Music in Noise (Source Code)
|
||||
|
||||
This is the source code for my personal website, [The Music in
|
||||
Noise](https://themusicinnoise.net/).
|
||||
|
||||
## Licensing
|
||||
|
||||
All documents generated by the website are licensed [CC-BY-ND 4.0
|
||||
International](https://creativecommons.org/licenses/by-nd/4.0/deed.en). The
|
||||
source code itself is All Rights Reserved unless otherwise specified (e.g. the
|
||||
build script). The main reason I publish this is so people can see __how__ I
|
||||
make my website and (if they are so inspired) copy the model, __not the
|
||||
content__.
|
62
phpsg.sh
Executable file
62
phpsg.sh
Executable file
@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2025 Nicolás Ortega Froysa <nicolas@ortegas.org> All rights reserved.
|
||||
# Author: Nicolás Ortega Froysa <nicolas@ortegas.org>
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied
|
||||
# warranty. In no event will the authors be held liable for any damages
|
||||
# arising from the use of this software.
|
||||
#
|
||||
# Permission is granted to anyone to use this software for any purpose,
|
||||
# including commercial applications, and to alter it and redistribute it
|
||||
# freely, subject to the following restrictions:
|
||||
#
|
||||
# 1. The origin of this software must not be misrepresented; you must not
|
||||
# claim that you wrote the original software. If you use this software
|
||||
# in a product, an acknowledgment in the product documentation would be
|
||||
# appreciated but is not required.
|
||||
#
|
||||
# 2. Altered source versions must be plainly marked as such, and must not be
|
||||
# misrepresented as being the original software.
|
||||
#
|
||||
# 3. This notice may not be removed or altered from any source
|
||||
# distribution.
|
||||
|
||||
SOURCE_DIR="src"
|
||||
OUTPUT_DIR="output"
|
||||
|
||||
for dir in $(find $SOURCE_DIR -mindepth 1 -type d)
|
||||
do
|
||||
OUT_DIR="${OUTPUT_DIR}/${dir:${#SOURCE_DIR}}"
|
||||
if ! [ -d "$OUT_DIR" ]
|
||||
then
|
||||
mkdir -p "${OUTPUT_DIR}/${dir:${#SOURCE_DIR}}"
|
||||
fi
|
||||
done
|
||||
|
||||
for file in $(find $SOURCE_DIR -type f)
|
||||
do
|
||||
if [[ $file = *.cfg.php ]]
|
||||
then
|
||||
continue
|
||||
elif [[ $file = *.html.php ]] || [[ $file = *.xml.php ]]
|
||||
then
|
||||
DEST_FILE="${OUTPUT_DIR}/${file:${#SOURCE_DIR}:-4}"
|
||||
if ! [ "$file" -nt "$DEST_FILE" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
echo -n "Generating $DEST_FILE ... "
|
||||
php "$file" > "$DEST_FILE"
|
||||
echo "done"
|
||||
else
|
||||
DEST_FILE="${OUTPUT_DIR}/${file:${#SOURCE_DIR}}"
|
||||
if ! [ "$file" -nt "$DEST_FILE" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
echo -n "Copying target $DEST_FILE ... "
|
||||
cp "$file" "$DEST_FILE"
|
||||
echo "done"
|
||||
fi
|
||||
done
|
0
pages/blog/2016-06-06-why-i-hate-the-web.html.php → src/blog/2016-06-06-why-i-hate-the-web.html.php
0
pages/blog/2016-06-06-why-i-hate-the-web.html.php → src/blog/2016-06-06-why-i-hate-the-web.html.php
0
pages/blog/2016-07-22-new-website-design.html.php → src/blog/2016-07-22-new-website-design.html.php
0
pages/blog/2016-07-22-new-website-design.html.php → src/blog/2016-07-22-new-website-design.html.php
0
pages/blog/2016-10-08-why-i-use-cc-by-nd.html.php → src/blog/2016-10-08-why-i-use-cc-by-nd.html.php
0
pages/blog/2016-10-08-why-i-use-cc-by-nd.html.php → src/blog/2016-10-08-why-i-use-cc-by-nd.html.php
0
pages/blog/2016-12-19-my-preference-for-c.cfg.php → src/blog/2016-12-19-my-preference-for-c.cfg.php
0
pages/blog/2016-12-19-my-preference-for-c.cfg.php → src/blog/2016-12-19-my-preference-for-c.cfg.php
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user