A blog system based on plain-files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.6 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. # Python Flask Blog
  2. This is a simple blog based on Pythons Flask framework.
  3. The basic design is based on LukeSmithXYZs blog.
  4. However I dislike using a script for adding entries and just want to add entries via plain text files.
  5. ## Features/To-Dos
  6. - [x] Plain text support for blog entries
  7. - [x] HTML files (.html)
  8. - [x] Markdown Files (.md)
  9. - [x] Infinite-scroll blog page
  10. - [x] Archive page
  11. - [x] Months as headings
  12. - [x] Links to scrolling blog page
  13. - [x] Links to standalone article
  14. - [x] Standalone article page
  15. - [x] Links to scrolling blog page
  16. - [x] RSS feed
  17. - [x] Better navigation
  18. - [x] Header
  19. - [x] Footer
  20. - [x] Switchable CSS
  21. - [x] CSS dark-theme
  22. - [x] CSS light-theme
  23. - [x] Config file
  24. - [x] Docker installation
  25. - [ ] Enable variables/environment variables
  26. ## Usage
  27. ### Create entries
  28. Blog entries are managed by plain html files in the `templates/entry/` directory.
  29. The first line of each document is reserved as the title of the document.
  30. You have to specify the filetype by extension.
  31. ## Deployment
  32. ### PIP/Python
  33. - `git clone https://github.com/tiyn/tiyny-blog`
  34. - `cd flaskblog/src`
  35. - edit the `config.py` file according to your needs
  36. - `pip3install -r requirements.txt` - install depenencies
  37. - run `python app.py`
  38. - blog is available on port 5000
  39. ### Docker
  40. Make sure you copy an example `config.py` and edit it before running the container.
  41. The `config.py` can be found in the `src` folder.
  42. #### Volumes
  43. Set the following volumes with the -v tag.
  44. | Volume-Name | Container mount | Description |
  45. |-------------|---------------------------|--------------------------------------------------------------|
  46. | config-file | /blog/src/config.py | Config file |
  47. | entries | /blog/src/templates/entry | Directory for blog entries |
  48. | css | /blog/src/static/css | (optional) Directory for css files |
  49. | html | /blog/src/templates | (optional) Directory for templates (entry-volume not needed) |
  50. #### Ports
  51. Set the following ports with the -p tag.
  52. | Container-Port | Recommended outside port | Protocol | Description |
  53. |----------------|--------------------------|----------|-------------|
  54. | 5000 | 80 | TCP | HTTP port |
  55. #### Example run-command
  56. `docker run --name blog --restart unless-stopped -v ./config.py:/blog/src/config.py -v entries:/blog/src/templates/entry -p 80:5000 -d tiynger/tiyny-blog`