clone url: git://git.m455.casa/pancake
Pandoc + Racket = pancake
An awful static website generator with an awful logo and an awful acronym.
This is a hobby project I built for myself as a tool to make blogging more enjoyable.
I take no responsibility for anything that pancake deletes.
Backup anything you don't want deleted.
Inline code
: Inline code signifies package names, filenames, or commandsCode block
: Code blocks signify file contentsThis section is for users who are familiar with git, a Unix-like command line environment, or scripting.
git clone https://git.m455.casa/m455/pancake.git
cd pancake
sudo make install-global
pancake
Note: To uninstall, run sudo make uninstall-global
pancake help
- Displays this help messagepancake initialize
- Generates the directories and files in your current directory, so pancake can operatepancake build
- Builds your website in the output/
directorypancake clean
- Deletes the contents of the output/
directory, except for any .git
directories found.pancake preview
- Starts a local HTTP server in your output/ directory to view your websitepancake's source code exists in a public git repository. This makes accessing the code convenient, because you don't need to sign in or register for an account to download it.
You can use
tools such as git
to download pancake's source code. You will need
the source code to install pancake.
git clone https://git.m455.casa/m455/pancake.git
Note: This will create a pancake
directory in your current directory.
You can either install pancake globally or locally on your system. A global installation allows all users on a machine to use pancake, while a local installation only allows one user to use pancake.
See the options below for installing pancake:
This option will install pancake into /usr/local/bin/
.
This section assumes you have downloaded pancake.
cd pancake
sudo make install-global
This option will install pancake into ~/.local/bin/
.
This section assumes you have downloaded pancake.
cd pancake
sudo make install-local
If you wish to have pancake exist elsewhere on your system, you can
also build a single-file executable. Building a single-file executable
allows you to place the executable in convenient places on your
system, such as a directory on your $PATH
.
This section assumes you have downloaded pancake.
Warning: You will have to manually uninstall custom installations
cd pancake
make install-custom location=~/path/to/custom/location
Example: In step 2., you could run make install-custom location=~/bin/
Depending on your installation method, you can uninstall a global or local installation of pancake.
See the options below for uninstalling pancake:
This option will remove the pancake executable file from /usr/local/bin/
.
This section assumes you have downloaded pancake.
cd pancake
sudo make uninstall-global
This option will remove the pancake executable file from ~/.local/bin/
.
This section assumes you have downloaded pancake.
cd pancake
sudo make uninstall-local
pancake can generate HTML files from a set of Markdown files in specific directories, repair missing directories or files, and preview your website before deploying it.
Pancake provides a small help message, for further inquiries, refer to this README.md
.
pancake help
Before using pancake, you need to 'initialize' pancake in a directory of your choice. 'initialize' just means that pancake will create the required directories and files it needs before running.
pancake initialize
Note: This command will generate directories and files in your current directory.
When pancake 'builds', it will:
pages/
directory, and place them in output/
posts/
directory, and place them in output/posts/
pdfs/
to output/pdfs/
images/
to output/images/
css/
to output/css/
misc/
to output/misc/
pancake build
pancake can create a temporary HTTP server, so you can preview your website before it goes public.
pancake preview
pancake can 'clean' your output/
directory. This means pancake will
delete all contents of your output/
directory, except for any .git
directories it finds.
pancake clean
pancake initializes several directories at first. This section will discuss the significance of each of the following directories, and how to use them:
This directory contains CSS files created by the user. CSS files in
this directory will automatically be applied to all HTML files that
are generated inside the output/
and output/posts
directories.
Note: HTML files in the output/misc
directory are not affected
by CSS files in the css/
directory.
When you run pancake build
, pancake copies the CSS files in
pdfs/
to output/pdfs/
. pandoc adds a link to each of these CSS
files in headers of each HTML file inside of the output/
and
output/posts
directories.
This directory contains image files added by the user. When
referencing an image from images/
in a Markdown file, always prefix
it with /images/
.
Example: /images/selfie.png
When you run pancake build
, pancake copies the image files in
images/
to output/images/
.
The misc/
directory is for storing any kind of file publicly. When
referencing a file from misc/
in a Markdown file, always prefix it
with /misc/
.
Example: /misc/my-text-file.txt
This directory is for storing one-off files, such as an HTML file with
its own styles, or a plain text file, or even a temporary file you
want to share with a friend. I currently use the misc/
directory to
store my PGP key, which is then reference on my contact.html
page,
from where people can download it.
When you run pancake build
, pancake copies the files in the
misc/
to output/misc/
.
This directory contains PDF files added by the user. When referencing
a PDF file from pdfs/
in a Markdown file, always prefix it with
/pdfs/
.
Example: /pdfs/white-paper.png
When you run pancake build
, pancake copies the PDF files in
pdfs/
to output/pdfs/
.
This directory contains files for later use. Pancake ignores any files inside of this directory.
The output/
directory is where your website is generated. You
shouldn't edit anything in the output/
directory, because the
directories or files will be replaced each time you run pancake
build
.
The pages/
directory contains Markdown files that will be accessible
from the root directory of your website after being generated.
Example: yourwebsite.com/a-page-file.html
This directory is intended for pages that are accessible from the nav
links inside of the layout/nav.md
file, but you can use it however
you want.
When you run pancake build
, the Markdown files in pages/
will be
converted to HTML files and copied to output/
.
The posts/
directory contains Markdown files that will be accessible
from the posts/
directory inside of the root directory of your
website after being generated.
Example: yourwebsite.com/posts/2020-blog-post.html
When you run pancake build
, the Markdown files in posts/
will be
converted to HTML files and copied to output/posts/
.
This directory contains the building blocks of each web page. The
layout/head.md
file should be edited to add the title, an optional
subtitle, and optional keywords related to the topics existing on your
website.
The value after title:
is mandatory, and should remain in single
quotes if you plan on having a colon in your title. If you plan on
having single quotes in your title, you have to escape them with a
\
.
Example: title: 'Sherry\'s blog'
The value after subtitle:
is optional, and follows the same rules as
the title:
value, but you can leave it blank if you don't want a
subtitle:
value, or you can delete the subtitle:
line.
Example: subtitle: 'They/them'
Note: I originally added the subtitle:
value, so I could include
my pronouns on my homepage, but you can change it to other values.
The value after keywords:
is optional, and should remain in
brackets, if it is not blank. Inside of the brackets, you should
include keywords related to topics mentioned on your website. These
keywords should be separated by commas.
Example: keywords: [programming, documentation, personal homepages]
The default contents of the nav.md
file imply that it is used for a
navigation bar, but this could be anything you want, or it could be
blank if you don't want anything.
The default ::: {#main}
sections off the rest of the website that is
stitched below it, during a pancake build
, causing the main
content to exist inside of a #main
id for styling purposes.
The default contents of the footer.md
file contain a message saying
your website was created by pancake, but this is not mandatory. You
can change the footer to anything you want.