- PHP 93.5%
- Twig 6.5%
|
Alex
eea5c98fa8
Only one value will exist for a given key, so use $stmt->fetch instead of fetchAll |
||
|---|---|---|
| database/sqlite | Add license functionality | |
| languages | Basic blog post reading | |
| public | Add license functionality | |
| scripts | Create a script to create users | |
| src | Improve SqliteCacheStore | |
| templates | Add license functionality | |
| .env.example | Add an Atom feed | |
| .gitignore | Basic code | |
| .woodpecker.yaml-unused | Disable CI | |
| composer.json | Install laminas/laminas-feed | |
| composer.lock | Update dependencies | |
| LICENSE | Añadir licencia | |
| psalm.xml | Create a script to create users | |
| README.md | Fix | |
YellowComet/Blog
This is my custom blog software.
This is still experimental software in active development! Use at your own risk
Currently not used for my blog due to still being in development, but it will be.
How to install
- Make sure you have at least PHP 8.3 with the PDO extension and the SQLite PDO driver, as well as Composer for downloading dependencies.
- Clone or download an archive of this repository.
- Run
composer install --no-dev - Copy .env.example at the root of the repository to .env and modify as needed.
- Run SQL from
database/to create the needed tables. - Point your webserver to the
publicdirectory and make sure all requests are routed to index.php there (See the Slim framework's guide on webservers for examples). - Run
scripts/newUser.phpto create an user and API key for you to use when making posts.
API clients
This blog does not have a web-based editor. Instead, it exposes an API endpoint, /api/post, where you can submit posts.
See src/Controller/ApiController.php and src/Middleware/ApiAuthenticationMiddleware.php for more.
I have a small Python script you can use as a client at YellowComet/blog-client, but it's pretty easy to write your own client.
The code
This is a PHP web app based on the Slim framework. It was developed using the Kate code editor and uses Psalm for static analysis. It uses Bulma for CSS.
Dependencies
See composer.json for the direct dependencies and composer.lock for all dependencies and their licenses. Directly, this program uses Slim, the Twig template engine, PHPMailer and phpdotenv, as well as psalm and PHPUnit as dev dependencies.
License
This program is licensed under the European Union Public License 1.2, see LICENSE for the license and Wikipedia for an overview of it. Dependencies of this program have their own licenses.