~bt/phpetite

A single file, static blog generated from PHP
Fix incorrect website directory in the build file
Remove all mention of Github PHPetite project and rebuild demo website
Include proper MIT license

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~bt/phpetite
read/write
git@git.sr.ht:~bt/phpetite

You can also use your local clone with git send-email.

#PHPetite

PHPetite (/p/h/pəˈtēt/) is a single file, static blog generated from PHP. Based off the very minimal and awesome portable-php.

#Key Features

  • Entire blog is rendered in a single HTML file
  • Inline, compressed CSS
  • All images converted into base64 encoding
  • Minimal requirements / no heavy build tools

#Core Principles

The basic idea behind PHPetite is to keep the concept and workflow as simple as possible. Therefore, this project will try it's best to avoid bloat and feature creep. More elaborate and feature-rich blogging platforms should be used if your needs are not met with PHPetite.

#Requirements

  1. PHP 7.3 or higher
  2. If using Linux, you will require the following packages in order to convert your images to base64 encoding:
    • PHP XML -> sudo apt-get install php-xml
    • PHP mbstring -> sudo apt-get install php-mbstring

That's really it!

#General Usage

You can find most basic explanations and details on working with the project at phpetite.bt.ht if you prefer.

#Generating the Blog

Get PHPetite in order to convert a collection of Markdown files into a single HTML file with inline CSS.

  1. Make proper edits to the /_phpetite/_config.php file
  2. Write posts in /content
  3. (Optional) include any images under the /content/img/ directory
  4. From the command-line run:
make

This will generate both the single file HTML page, along with an atom.xml file for the use of an optional RSS feed.

These two files are output into the _site directory.


#Structuring Blog Posts

Blog posts should be placed into the /content directory and be named based only on their post date. See an example here:

2048-01-01.md

PHPetite will create a target by appending the page title inside the article to the file's date name. So a markdown file with the following content:

# Bladerunner Rocks

Bladerunner is amazing because blah blah blah...

will render out the target link as:

example.com/#2048-01-01-bladerunner-rocks

#Adding Custom Pages

To add your own custom pages, simply create a Markdown file under the content/_pages directory. PHPetite will take it from there!

#Some Cavets

Any page you create will be automatically added to the footer navigation section. If you wish to hide individual pages from showing in the footer, do so via CSS:

footer a.slug-name-of-your-page {
    display: none;
}

If you want to remove the footer navigation altogether, add the following to your style.css file:

footer .footer-links {
    display: none;
}

#TODOs

See the official, on-going feature list here: https://phpetite.bt.ht/#about