12.31.21
just in time for the new year, because the internet has its own blogging software! still trying to think of a clever name.
it's the crystallization of what i have wanted in a blog:
- server-side: i'm not at scale and the code isn't complex, so there's no real upside to pure static-gen software.
- markdown support and rendering: the code looks for a specified directory, pulls any
*.md
pages, and renders them as HTML. i have implemented some very crude control over the way the code lists files and for now markdown files have to be named using aYYYY.MM.DD.md
format, but doing so will result in new posts appearing at the top in descending order. - simple - this was the biggest reason for this project: taking the things i love about Mecha CMS and getting rid of the sprawling source code. don't get me wrong! Mecha is a great piece of software, but the author has implemented a lot of extras that cover all sorts of use cases that i have no need for.
the result is a project that allows you to run a markdown-powered lightweight blog built around the use and portability that the markdown file format allows. the goal will be to keep is as barebones-simple as i can, and for now this means you can get started with 5 files and a directory for markdown pages.
the first file, index.php
, is a simple php script that stitches all the following together:
- the
header.html
that styles the page, - the Parsedown markup library,
- all markdown files located in
post/*.md
, displayed in order from new to old - the
footer.html
page, which for now simply closes the HTML tags.
TODO:
- view single posts
- allow support for YAML frontmatter, to expand on the ways the parser sorts and handles posts
- refine the markdown parsing to handle more exotic markup such as footnotes1 / granular header formatting.
-
this is foot note ↩
12.28.21
if you can read this, i've succeeded! nothing too fancy, everything is more or less powered by parsedown. things i would like to try to implement on top:
- support for footnotes1
- granular header control - right now all
# header
,## header
, and### header
lines are formatted as<h2>
-
footnote test ↩
11.20.21
revisited the idea of 'because the internet' and have decided that a good way to keep procrastinating would be by deciding that i need to roll my own build system.
the skeleton will be basic: using include
to stitch a header and footer onto a single file. simple enough, but the real challenge will be implementing a markdown parser - allowing me to keep a single blog.md
page!