Add instructions to split.pl

This commit is contained in:
Ben Edgington
2022-06-14 10:51:22 +01:00
parent 16a785b86f
commit 109b2f2da1

View File

@@ -1,5 +1,21 @@
#!/usr/bin/perl
# Note: run this via "update.sh" rather than directly.
#
# Split the master markdown file into separate files for each page.
#
# - Creates a directory structure reflecting the path hierarchy of the
# pages.
# - Prepends Gatsby frontmatter to each file.
# - Rewrites links for image files so that the origial file can use
# one path and the split files another.
#
# Rules:
# - New pages can start at markdown heading levels 1, 2, or 3.
# - To start a new page, append " <!-- /path/to/page -->" to the heading.
# - The file containing the page will end up in "./md/pages/path/to/page.md"
# - For the page to be marked "hidden", append a "*" to the path.
use strict;
use warnings;
use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END);