Skip to content

scmu/plfp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lanyon for Hakyll

This theme is a port of Lanyon theme originated by Mark Otto (mdo) for Haskell-based static site generator Hakyll originally written by Jasper Van der Jeugt.

The pagination code is a modified version of the code by Mike Limansky.

The dynamic sidebar activation is explained in my blog post.

The current version does not support tags, related posts, and syntax highlight but it will be updated soon.

Previews

Preview Preview

You can find an example website: my blog.

The original website in Jekyll: Lanyon.

Building the site with stack

Assuming that you have stack installed (install instruction),

$ git clone https://github.com/hahey/lanyon-hakyll.git
$ cd lanyon-hakyll
$ stack build
$ stack exec site clean
$ stack exec site build
$ stack exec site watch

Then you can access the site at http://localhost:8000 using your browser.

Customization

Meta information

You can change the following website information in the file site.hs.

For the RSS feed:

feedConfig = FeedConfiguration
    { feedTitle       = "lanyon-hakyll: Lanyon Theme on Hakyll"
    , feedDescription = "A Fork of Lanyon based on Poole"
    , feedAuthorName  = "Heuna Kim"
    , feedAuthorEmail = "[email protected]"
    , feedRoot        = "https://github.com/hahey/lanyon-hakyll"
    }

For other informations:

siteCtx :: Context String
siteCtx =
    baseCtx `mappend`
    constField "site_description" "Lanyon Theme on Hakyll" `mappend`
    constField "site-url" "https://github.com/hahey/lanyon-hakyll" `mappend`
    constField "tagline" "A Fork of Lanyon based on Poole" `mappend`
    constField "site-title" "lanyon-hakyll" `mappend`
    constField "copy-year" "2020" `mappend`
    constField "github-repo" "https://github.com/hahey/lanyon-hakyll" `mappend`
    defaultContext
baseCtx =
    constField "baseurl" "http://localhost:8000"

You can keep the baseurl field for debugging purposes or viewing the site on your local computer but when you publish it, you will need to change it to the domain address of your website.

Pages and posts

All your files in the pages folder will be compiled, listed in the sidebar in an alphabetical order and displayed upon clicking them. All your markdown files in the posts folder will be compiled, displayed in the home/index page with the pagination and also listed in the archive page.

Color setting

As in the original theme, add your favorite color theme to the <body> element in the templates/default.html file, for example:

<body class="theme-base-0d">

For the available color theme classes, please look at the repository of Lanyon.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published