Init working on an about me page.

This commit is contained in:
Dhananjay Balan 2024-02-11 06:27:20 +01:00
parent 95185ac9ba
commit 77faa109ee
4 changed files with 28 additions and 2 deletions

11
.envrc
View File

@ -1 +1,10 @@
use flake use_flake() {
watch_file flake.nix
watch_file site.hs
watch_file blogng.cabal
watch_file flake.lock
mkdir -p "$(direnv_layout_dir)"
eval "$(nix print-dev-env --profile "$(direnv_layout_dir)/flake-profile" "$@")"
}
use_flake

7
pages/about.md Normal file
View File

@ -0,0 +1,7 @@
# Document Title
Hello world
```
when in rome
```

10
site.hs
View File

@ -52,6 +52,12 @@ main = hakyllWith config $ do
>>= loadAndApplyTemplate "templates/default.html" (postCtxWTags tags) >>= loadAndApplyTemplate "templates/default.html" (postCtxWTags tags)
>>= relativizeUrls >>= relativizeUrls
match "pages/*" $ do
route pageRoute
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/pages.html" defaultContext
>>= relativizeUrls
match "index.html" $ do match "index.html" $ do
route idRoute route idRoute
compile $ do compile $ do
@ -117,6 +123,10 @@ postCtx =
dateField "date" "%B %e, %Y" `mappend` dateField "date" "%B %e, %Y" `mappend`
defaultContext defaultContext
-- static page routes
pageRoute :: Routes
pageRoute = customRoute $ (\p -> (takeFileName (toFilePath p)) -<.> ".html")
-- octopress compatible routes -- octopress compatible routes
octopressRoute :: Routes octopressRoute :: Routes
octopressRoute = customRoute $ octoMangaling octopressRoute = customRoute $ octoMangaling

View File

@ -13,7 +13,7 @@
<header> <header>
<div class="header"> <div class="header">
<div id="title"><a href="/">BINARY STROLLS</a></div> <div id="title"><a href="/">BINARY STROLLS</a></div>
<div id="nav"><a href="/archive.html">Archive</a><a href="https://dbalan.in">About</a></div> <div id="nav"><a href="/archive.html">Archive</a><a href="/about.html">About</a></div>
</div> </div>
</header> </header>
<section> <section>