geekswimmers / geekswimmers

A web application designed to assist curious swimmers on achieving their goals.
https://www.hildeberto.com/geekswimmers/
GNU Affero General Public License v3.0
1 stars 2 forks source link

Load articles from files instead of a database table #31

Closed htmfilho closed 4 months ago

htmfilho commented 4 months ago

After implementing articles by reading the content from the database, I noticed that it is pretty hard to edit the content after published. It would be better to read it from markdown files instead, published together with the code.

  1. Create the folder web/content/articles
  2. Create a new markdown file and move just the content from the database to this file
  3. Reduce the size of the content column to store just a path to this file
  4. Load the file to render the content