A simple blogging platform with Haskell and Scotty
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.

README.md 2.2KB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. Hablog
  2. ======
  3. [![Hackage](https://img.shields.io/hackage/v/hablog.svg)](http://hackage.haskell.org/package/hablog)
  4. A simple blog platform with tags. Made with Haskell and Scotty.
  5. Hablog will read posts written in Markdown from the `_posts` folder.
  6. License
  7. =======
  8. Hablog is licensed under MIT license. This means the Haskell source files in the src directory.
  9. Highlight.js related content is not a part of Hablog and is not licensed by it.
  10. Installation
  11. ============
  12. ```sh
  13. git clone https://github.com/soupi/hablog
  14. cd hablog
  15. stack build
  16. ```
  17. Running
  18. =======
  19. ```
  20. hablog --title <TITLE> --theme <THEME> --domain <DOMAIN> <COMMAND> [--port <PORT> --tls-cert <TLS_CERT> --tls-port <TLS_PORT>]
  21. ```
  22. - `<TITLE>` is the title you want in the HTML headers;
  23. - `<THEME>` is `light` or `dark`, depending on the theme you want, to create your own themes look at the examples in [/static/css](https://github.com/soupi/hablog/tree/master/static/css);
  24. - `<DOMAIN>` is the domain you're running the blog on;
  25. - `<COMMAND>` is `http`, `https`, or `both`;
  26. - `<PORT>` is the `http` port (not required if `COMMAND` is `https`);
  27. - `<TLS_CERT>` is the `https` certificate (not required if `COMMAND` is `http`);
  28. - `<TLS_PORT>` is the `https` port (not required if `COMMAND` is `http`).
  29. How to write a new post?
  30. ========================
  31. 1. All posts must go under the `/_posts/` directory
  32. 1. All pages must go under the `/_pages/` directory
  33. 3. The content of the post/page must correspond to a specific structure
  34. ## A Post's Structure
  35. ```markdown
  36. title: <the title of the post>
  37. route: <route to the post>
  38. authors: <the author of the post, seperated, by, commas>
  39. date: yyyy-mm-dd
  40. tags: <tags for the post, separated, by, commas>
  41. ---
  42. <The rest of the post in Markdown format>
  43. ```
  44. ## A Page's Structure
  45. ```markdown
  46. title: <the title of the page>
  47. route: <route to the page>
  48. ---
  49. <The rest of the page in Markdown format>
  50. ```
  51. ## Preview
  52. If you want twitter/other previews to work as well, add the following definition at the header of a post or page. Not that `image` without `image-alt` won't work.
  53. - `summary` - For a summary of the post/page
  54. - `image` - A link to an image
  55. - `image-alt` - Alternative description for an image