Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hasufell/hasufell.github.io
https://github.com/hasufell/hasufell.github.io
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hasufell/hasufell.github.io
- Owner: hasufell
- License: mit
- Created: 2021-10-22T15:10:09.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-13T16:03:06.000Z (6 months ago)
- Last Synced: 2024-05-14T09:39:32.781Z (6 months ago)
- Language: CSS
- Homepage: https://hasufell.github.io/
- Size: 722 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Lanyon for Hakyll
This theme is a port of [Lanyon theme](https://github.com/poole/lanyon) originated by Mark Otto (mdo)
for Haskell-based static site generator [Hakyll](https://jaspervdj.be/hakyll/) originally written by Jasper Van der Jeugt.Few Remarks:
- The code for displaying related post is a modified version based on [the blog post by Matthew Fitzsimmons](https://www.fitzsimmons.io/posts/tricks-with-tags-in-hakyll).
The original version of Lanyon displays only related posts not tags and the port is following the same.
- The pagination code is a modified version of [the code by Mike Limansky](https://github.com/limansky/limansky_me/blob/master/src/site.hs).
- The dynamic sidebar activation is explained in my [blog post](https://heuna-kim.net/posts/2020-11-19-Hakyll-Sidebar-Activation.html).
- Syntax highlighting is slightly different from the original Lanyon; this repository is using the standard syntax highlighting for Hakyll conforming with `Pandoc` compiler.### Previews
![Preview](https://github.com/hahey/lanyon-hakyll/blob/main/previews/index-sidebar.png?raw=true)
![Preview](https://github.com/hahey/lanyon-hakyll/blob/main/previews/index.png?raw-true)You can find an example website: [my blog](https://heuna-kim.net).
The original website in Jekyll: [Lanyon](https://lanyon.getpoole.com/).
### Building the site with stack
Assuming that you have `stack` installed ([install instruction](https://docs.haskellstack.org/en/stable/install_and_upgrade/)),
```
$ 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 `` element in the `templates/default.html` file, for example:
``````
For the available color theme classes, please look at [the repository of Lanyon](https://github.com/poole/lanyon#themes).