Skip to content

Meowcolm024/meowcolm024.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homepage

This theme is based on no style, please!, and heavily modified for Hakyll.

Setup

Project built using Cabal 3.10.3 and GHC 9.4.8

# build site
$ cabal run site build

Features

  1. Syntax highlighting via Prism.js
  2. Section hyperlink (check this article)
  3. Tags support (check this article)
  4. Dark mode support with toggle button (mostly usable)
  5. Use Noto Sans Mono font from Google Fonts
  6. A simple eDSL to configure the index page (or use your own)

Notes

  • content/Index.hs: the (default) index page of the site
  • content/*.md: other (non-post) pages of the site (like about, contact etc)
  • posts/yyyy-mm-dd-*.md: all your posts here (prefixed with dates)
  • images/favicon.ico: the favicon of the site

Homepage customization

To customize homepage contents, modify the content/Index.hs file (checkout the file for example). Note: you probably need to rebuild the site after modifying Index.hs.

  • To change the title, modify title :: String.
  • To modify the contents, modify content :: Content (). You can find a simple eDSL guide below:
    • section :: String -> Maybe String -> Content () -> Content () Creates an entry with a title, optionally an URL, and some contents in the section
    • posts :: String -> Content () Creates an entry of post list with a title
    • none :: Content () Empty content
    • html :: Html -> Content () Raw html contents (checkout blaze-html)
    • txt :: Text -> Content () Text contents (no fancy markups)
    • markdown :: Text -> Content () Markdown contents

If you don't want to use the eDSL, you can always create your own index page (e.g. content/index.html), and set index = File "index.html".

Q: Why an eDSL?

A: Building an eDSL is just fun OwO (or I need to write a bunch of code to handle yaml, and it could be less flexible)

License

Licensed under MIT.