diff --git a/portfolio/templates/plamo.html b/portfolio/en/plamo.html similarity index 73% rename from portfolio/templates/plamo.html rename to portfolio/en/plamo.html index 0642940..899b992 100644 --- a/portfolio/templates/plamo.html +++ b/portfolio/en/plamo.html @@ -1,4 +1,10 @@ +--- +title: Plamo +logosub: Plamoa +language: "en" +--- +
The word "Plamo" is a portmonteau of the words "plastic" and "modelling". It involves building and painting models and figures from historic, science-fiction and fantasy themes.
Here you can find my collection and notes on this hobby.
-$partial("templates/model-kits.html")$ +$partial("templates/model-kits.html")$ \ No newline at end of file diff --git a/portfolio/jp/plamo.html b/portfolio/jp/plamo.html new file mode 100644 index 0000000..07d6e79 --- /dev/null +++ b/portfolio/jp/plamo.html @@ -0,0 +1,9 @@ +--- +title: プラモ +logosub: プラモ +language: "jp" +--- + +JAPANESE
+ +$partial("templates/model-kits.html")$ \ No newline at end of file diff --git a/portfolio/nl/plamo.html b/portfolio/nl/plamo.html new file mode 100644 index 0000000..5ccff8a --- /dev/null +++ b/portfolio/nl/plamo.html @@ -0,0 +1,10 @@ +--- +title: Plamo +logosub: Plamo +language: "nl" +--- + +"Plamo" is een porte-manteauwoord van de woorden "plastic" en "modelleren". Het is een hobby waarbij plastic modellen gebouwd en geschilderd worden. Het kunnen historische modellen zijn, maar ook science-fiction of fantasie modellen.
+Hier kun je mijn collectie en notities vinden van deze hobby.
+ +$partial("templates/model-kits.html")$ \ No newline at end of file diff --git a/portfolio/site.hs b/portfolio/site.hs index b592266..e0d28d6 100644 --- a/portfolio/site.hs +++ b/portfolio/site.hs @@ -65,28 +65,32 @@ main = hakyll $ do >>= loadAndApplyTemplate "templates/default.html" archiveCtx >>= relativizeUrls - create ["plamo.html"] $ do + match (fromList + [ "nl/plamo.html" + , "jp/plamo.html" + , "en/plamo.html" + ]) $ do route idRoute compile $ do + ident <- getUnderlying + language <- getMetadataField' ident "language" kits <- recentFirst =<< loadAll "pages/en/plamo/**" + let plamoCtx = - listField "kits" postCtx (return kits) `mappend` - constField "title" "Plamo" `mappend` - constField "logosub" "Plamo enthousiast" `mappend` - constField "language" "en" `mappend` - langDict "en" <> + listField "kits" postCtx (return kits) <> + langDict language <> defaultContext - makeItem "" - >>= loadAndApplyTemplate "templates/plamo.html" plamoCtx + getResourceBody + >>= applyAsTemplate plamoCtx >>= loadAndApplyTemplate "templates/default.html" plamoCtx >>= relativizeUrls match (fromList [ "index.html" - , "en/index.html" , "nl/index.html" , "jp/index.html" + , "en/index.html" ]) $ do route idRoute compile $ do @@ -95,6 +99,7 @@ main = hakyll $ do ident <- getUnderlying language <- getMetadataField' ident "language" + -- Seven days from today. let cutoff = addUTCTime (7 * 24 * 60 * 60) now events <- diff --git a/portfolio/templates/index.html b/portfolio/templates/index.html index f9f7220..c3b6a4a 100644 --- a/portfolio/templates/index.html +++ b/portfolio/templates/index.html @@ -10,7 +10,7 @@