Add tags
https://javran.github.io/posts/2014-03-01-add-tags-to-your-hakyll-blog.html
This commit is contained in:
parent
32b144db4e
commit
e4aab38353
18 changed files with 40 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
title: "Dyalog APL Problem Solving Competition 2020 — Phase I"
|
||||
subtitle: "Annotated Solutions"
|
||||
date: 2020-08-02
|
||||
tags: programming, apl
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: "Dyalog APL Problem Solving Competition 2020 — Phase II"
|
||||
subtitle: "Annotated Solutions"
|
||||
date: 2020-08-02
|
||||
tags: programming, apl
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Random matrices from the Ginibre ensemble"
|
||||
date: 2019-03-20
|
||||
tags: maths, linear algebra, statistics, julia, visualization
|
||||
---
|
||||
|
||||
** Ginibre ensemble and its properties
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Reading notes: Hierarchical Optimal Transport for Document Representation"
|
||||
date: 2020-04-05
|
||||
tags: paper, machine learning, optimal transport, nlp
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "ICLR 2020 Notes: Speakers and Workshops"
|
||||
date: 2020-05-05
|
||||
tags: conference, machine learning, reinforcement learning, nlp
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: Ising model simulation in APL
|
||||
date: 2018-03-05
|
||||
tags: ising simulation montecarlo apl
|
||||
tags: apl, statistics, visualization
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Ising model simulation
|
||||
author: Dimitri Lozeve
|
||||
date: 2018-02-05
|
||||
tags: ising visualization simulation montecarlo
|
||||
tags: statistics, visualization, clojure
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Learning some Lie theory for fun and profit "
|
||||
date: 2020-11-14
|
||||
tags: maths, linear algebra, dynamical systems
|
||||
toc: false
|
||||
---
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Generating and representing L-systems
|
||||
author: Dimitri Lozeve
|
||||
date: 2018-01-18
|
||||
tags: lsystems visualization algorithms haskell
|
||||
tags: visualization, haskell
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Online Analysis of Medical Time Series"
|
||||
date: 2020-11-17
|
||||
tags: paper, statistics, medical, time series
|
||||
toc: false
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Operations Research and Optimization: where to start?"
|
||||
date: 2020-05-27
|
||||
tags: maths, operations research, optimization, optimal transport
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Peano Axioms"
|
||||
date: 2019-03-18
|
||||
tags: maths, foundations
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Quaternions: what are they good for?"
|
||||
date: 2020-11-09
|
||||
tags: maths, dynamical systems
|
||||
toc: false
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Quick Notes on Reinforcement Learning"
|
||||
date: 2018-11-21
|
||||
tags: machine learning, reinforcement learning
|
||||
---
|
||||
|
||||
* Introduction
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: "Mindsay: Towards Self-Learning Chatbots"
|
||||
date: 2019-04-06
|
||||
tags: chatbots, nlp, machine learning, reinforcement learning
|
||||
---
|
||||
|
||||
Last week I made a presentation at the [[https://www.meetup.com/Paris-NLP/][Paris NLP Meetup]], on how we
|
||||
|
|
23
site.hs
23
site.hs
|
@ -42,6 +42,22 @@ main = hakyll $ do
|
|||
|
||||
match "csl/*" $ compile cslCompiler
|
||||
|
||||
tags <- buildTags "posts/*" (fromCapture "tags/*.html")
|
||||
|
||||
tagsRules tags $ \tag pattern -> do
|
||||
let title = "Posts tagged \"" ++ tag ++ "\""
|
||||
route idRoute
|
||||
compile $ do
|
||||
posts <- recentFirst =<< loadAll pattern
|
||||
let ctx = constField "title" title
|
||||
<> listField "posts" (postCtxWithTags tags) (return posts)
|
||||
<> defaultContext
|
||||
|
||||
makeItem ""
|
||||
>>= loadAndApplyTemplate "templates/tag.html" ctx
|
||||
>>= loadAndApplyTemplate "templates/default.html" ctx
|
||||
>>= relativizeUrls
|
||||
|
||||
match "posts/*" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ do
|
||||
|
@ -49,9 +65,9 @@ main = hakyll $ do
|
|||
toc <- getMetadataField underlying "toc"
|
||||
customPandocCompiler (toc == Just "yes" || toc == Just "true")
|
||||
>>= return . fmap demoteHeaders
|
||||
>>= loadAndApplyTemplate "templates/post.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
|
||||
>>= saveSnapshot "content"
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
|
||||
>>= relativizeUrls
|
||||
|
||||
match (fromList ["contact.org", "cv.org", "skills.org", "projects.org"]) $ do
|
||||
|
@ -114,6 +130,9 @@ postCtx =
|
|||
dateField "date" "%B %e, %Y" `mappend`
|
||||
defaultContext
|
||||
|
||||
postCtxWithTags :: Tags -> Context String
|
||||
postCtxWithTags tags = tagsField "tags" tags <> postCtx
|
||||
|
||||
feedCtx :: Context String
|
||||
feedCtx = postCtx <> bodyField "description"
|
||||
|
||||
|
|
|
@ -44,6 +44,9 @@
|
|||
<p class="byline">$author$</p>
|
||||
$endif$
|
||||
$endif$
|
||||
$if(tags)$
|
||||
<p class="byline">Tags: $tags$</p>
|
||||
$endif$
|
||||
$endif$
|
||||
</header>
|
||||
|
||||
|
|
1
templates/tag.html
Normal file
1
templates/tag.html
Normal file
|
@ -0,0 +1 @@
|
|||
$partial("templates/post-list.html")$
|
Loading…
Add table
Add a link
Reference in a new issue