This is source of my personal website.
Find a file
2024-10-22 12:26:08 +02:00
app First commit 2024-10-22 12:26:08 +02:00
bin First commit 2024-10-22 12:26:08 +02:00
cache First commit 2024-10-22 12:26:08 +02:00
datas First commit 2024-10-22 12:26:08 +02:00
public First commit 2024-10-22 12:26:08 +02:00
template First commit 2024-10-22 12:26:08 +02:00
.gitignore First commit 2024-10-22 12:26:08 +02:00
composer.json First commit 2024-10-22 12:26:08 +02:00
composer.lock First commit 2024-10-22 12:26:08 +02:00
LICENSE First commit 2024-10-22 12:26:08 +02:00
README.md First commit 2024-10-22 12:26:08 +02:00

Knah Tsaeb personal website

Presentation

This is the source code of my personal website. Feel free to use and adapt it.

Features

  • Libre
  • Light (software and generated site)
  • Fast
  • Half static (first print is build, other are static)
  • No database
  • Flat file
  • Markdown
  • Can include external RSS/ATOM feed or API json response
  • Simple
  • Can adapt
  • Easy install
  • Easy backup

Installation

Docker

TODO

Classic way

  • Requires php (8 or higher) and php-xml extension.
  • Place all the files in a directory on your server.
  • Run composer install.
  • Configure your web server to serve /public/ directory.
  • Use cron job */5 * * * * php -f /var/www/ThisApp/bin/cron.php that's check for new content or update feed all 5 mins.
  • That's all.

Usage

All files are store in /datas/ folder. You are two distinct folder :

  • /pages/ for page
  • /posts/ for post

Thanks captain obvious.

You can edit directly file via SSH and a CLI editor like VIM or Nano. Alternatively, you can edit file locally and upload with FTP to your web server.

Pages folder is not hierarchical just create file in /page/My page.md.

Posts folder use chronological ordering like /posts/YYYY/MM/DD - Post title.md.

If you want, is totaly optional, in your post you can add lead.

Example :

---

My super lead text !

---

Rest of your post.

Options / configs

You can create /datas/config.json for define your option.

{
    "siteName": "My super page",
    "author": "Me !!!",
    "useCache": true,
    "postPerPage": 12,
    "numberOfLastItem": 5,
    "debug": true,
    "fetching": {},
    "navLinks": {}
}
Option Type Default Description
siteName string My super page Site name
author string Me !!! Your name
useCache bool true Enable or disable cache
postPerPage int 12 Number of posts in /posts page
numberOfLastItem int 5 Number of items feed
debug bool false Enable or disable some action for debugin
fetching array null List of feed or API (Key = serviceName, value = url)
navLinks array null List of nav entry (Key = linkName, value = url)

Notes

If you change/update config, all cache are cleaning.

Ideas

Original Idea by SebSauvage in french.

If you have NextCloud installed on your server, you can use it to manage your markdown file. It's very convenient for uploading your markdown file, renaming them, moving them, and organizing them into folders.

In the NextCloud settings: Settings > Administration > External Storage:

Option Description
Folder Name The name of the folder as it will appear in NextCloud.
External Storage Choose Local
Authentication None
Configuration Enter the path of your /datas folder

Don't forget to disable encrypt for this folder.

More info about external storage in Nextcloud admin documentation.

The same idea can be use with another sync tool of course.

License and ressources

This software is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE v3 (https://gnu.org/licenses/agpl-3.0.txt).

Icons :

CSS :

Dependencies :