From 13cec3d0fc257d0e65c9a1c06bfc71648722a506 Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Fri, 2 Feb 2024 13:05:54 -0500 Subject: Initial commit for cgit platform --- content/_pages/about.md | 19 +++++++++++++++++++ content/_pages/adding-pages.md | 21 +++++++++++++++++++++ content/_pages/generating-this-blog.md | 32 ++++++++++++++++++++++++++++++++ content/_pages/home-content.md | 21 +++++++++++++++++++++ content/_pages/requirements.md | 8 ++++++++ content/_pages/structure.md | 21 +++++++++++++++++++++ 6 files changed, 122 insertions(+) create mode 100644 content/_pages/about.md create mode 100644 content/_pages/adding-pages.md create mode 100644 content/_pages/generating-this-blog.md create mode 100644 content/_pages/home-content.md create mode 100644 content/_pages/requirements.md create mode 100644 content/_pages/structure.md (limited to 'content/_pages') diff --git a/content/_pages/about.md b/content/_pages/about.md new file mode 100644 index 0000000..f0846f9 --- /dev/null +++ b/content/_pages/about.md @@ -0,0 +1,19 @@ +# About PHPetite + +This entire website is a single HTML file. It was generated by [PHPetite](https://git.btxx.org/phpetite). + +If you notice any issues or want to help make this project even better, [check it out on cgit](https://git.btxx.org/phpetite). + +## Feature Wishlist + +☐ Implement a "watch" system for local development (auto-rebuilds) +☐ Detailed documentation for converting existing static sites to PHPetite +☐ More theme / styling options! +☐ Proper accessibility audit +☑ ~~Allow custom fonts to be set as Base64 strings~~ ([details here](#2021-02-27-converting-custom-fonts-to-base64-strings)) +☑ ~~Set images as inline Base64 strings~~ +☑ ~~Basic RSS feed~~ +☑ ~~Automatically add new pages to footer nav~~ +☑ ~~Compress inline CSS~~ + +*[HTML]: Hyper Text Markup Language \ No newline at end of file diff --git a/content/_pages/adding-pages.md b/content/_pages/adding-pages.md new file mode 100644 index 0000000..433ffe0 --- /dev/null +++ b/content/_pages/adding-pages.md @@ -0,0 +1,21 @@ +# 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 Caveats + +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: + +```.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: + +```.css +footer .footer-links { + display: none; +} +``` \ No newline at end of file diff --git a/content/_pages/generating-this-blog.md b/content/_pages/generating-this-blog.md new file mode 100644 index 0000000..6e79219 --- /dev/null +++ b/content/_pages/generating-this-blog.md @@ -0,0 +1,32 @@ +# Generating This Blog + +**Important**: Before building and uploading your single file blog, be sure to edit all the proper details found inside the `_phpetite/_config.php` file. This includes your domain, site title, author name, etc. + +Most users won't ever need to fiddle with the other files inside the `_phpetite` directory. + +--- + +Get [PHPetite](https://git.btxx.org/phpetite "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: + +```.shell +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. + +## Looking for more advanced options? + +- [Adding Custom Pages](#adding-pages) +- [Converting from Jekyll](#2021-02-07-converting-from-jekyll) + +*[HTML]: Hyper Text Markup Language +*[CSS]: Cascading Style Sheets +*[URL]: Uniform Resource Locator +*[PHP]: Personal Hypertext Processor \ No newline at end of file diff --git a/content/_pages/home-content.md b/content/_pages/home-content.md new file mode 100644 index 0000000..b5b8189 --- /dev/null +++ b/content/_pages/home-content.md @@ -0,0 +1,21 @@ +# A Single File Blog + +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 + +--- + +Feel free to look through the documentation found posted on this site or directly in the github repo. + +## Getting Started + +- [Requirements](#requirements) +- [Generating This Blog](#generating-this-blog) +- [Structuring Blog Posts](#structure) +- [Adding Custom Pages](#adding-pages) diff --git a/content/_pages/requirements.md b/content/_pages/requirements.md new file mode 100644 index 0000000..2abc89a --- /dev/null +++ b/content/_pages/requirements.md @@ -0,0 +1,8 @@ +# 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! \ No newline at end of file diff --git a/content/_pages/structure.md b/content/_pages/structure.md new file mode 100644 index 0000000..d89761f --- /dev/null +++ b/content/_pages/structure.md @@ -0,0 +1,21 @@ +# 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: + +```.markdown +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: + +```.markdown +# Bladerunner Rocks + +Bladerunner is amazing because blah blah blah... +``` + +will render out the `target` link as: + +```.markdown +example.com/#2048-01-01-bladerunner-rocks +``` -- cgit v1.2.3-54-g00ecf