diff --git a/portfolio/site.hs b/portfolio/site.hs
index 6e6b851..4842378 100644
--- a/portfolio/site.hs
+++ b/portfolio/site.hs
@@ -25,7 +25,7 @@ main = hakyll $ do
match (fromList ["about.rst", "contact.markdown"]) $ do
route $ setExtension "html"
compile $ pandocCompiler
- >>= loadAndApplyTemplate "templates/default.html" defaultContext
+ >>= loadAndApplyTemplate "templates/default.html" staticPageContext
>>= relativizeUrls
match "posts/*" $ do
@@ -57,6 +57,7 @@ main = hakyll $ do
listField "posts" postCtx (return posts) `mappend`
constField "title" "Archives" `mappend`
constField "language" "en" `mappend`
+ langDict "en" <>
defaultContext
makeItem ""
@@ -73,6 +74,7 @@ main = hakyll $ do
constField "title" "Plamo" `mappend`
constField "logosub" "Plamo enthousiast" `mappend`
constField "language" "en" `mappend`
+ langDict "en" <>
defaultContext
makeItem ""
@@ -116,9 +118,16 @@ main = hakyll $ do
--------------------------------------------------------------------------------
+staticPageContext :: Context String
+staticPageContext =
+ langDict "en" <>
+ defaultContext
+
postCtx :: Context String
postCtx =
dateField "date" "%e %B %Y" `mappend`
+ constField "language" "en" `mappend`
+ langDict "en" <>
defaultContext
isUpcoming :: UTCTime -> Item a -> Compiler Bool
@@ -135,16 +144,28 @@ langDict :: String -> Context a
langDict "nl" =
constField "welcome" "Welkom" <>
constField "switcher" "Taal" <>
+ constField "title-japan" "Japan" <>
+ constField "title-plamo" "Plamo" <>
+ constField "title-radio" "Radio" <>
+ constField "title-software" "Software" <>
mempty
langDict "jp" =
constField "welcome" "ようこそ" <>
constField "switcher" "言語" <>
+ constField "title-japan" "日本" <>
+ constField "title-plamo" "プラモ" <>
+ constField "title-radio" "ラジオ" <>
+ constField "title-software" "ソフトウェア" <>
mempty
langDict "en" =
constField "welcome" "Welcome" <>
constField "switcher" "Language" <>
+ constField "title-japan" "Japan" <>
+ constField "title-plamo" "Plamo" <>
+ constField "title-radio" "Radio" <>
+ constField "title-software" "Software" <>
mempty
langDict _ = mempty
diff --git a/portfolio/templates/index.html b/portfolio/templates/index.html
index 9f54f4b..9856dce 100644
--- a/portfolio/templates/index.html
+++ b/portfolio/templates/index.html
@@ -17,7 +17,7 @@
Japan
+$title-japan$
Plamo
+$title-plamo$
Radio
+$title-radio$
Software
+$title-software$