Scratch work for project showcase thingy
This commit is contained in:
parent
592c1681a7
commit
4d0f72fd4f
1
css/bootstrap-theme.min.css.map
Normal file
1
css/bootstrap-theme.min.css.map
Normal file
File diff suppressed because one or more lines are too long
1
css/bootstrap.min.css.map
Normal file
1
css/bootstrap.min.css.map
Normal file
File diff suppressed because one or more lines are too long
@ -3,7 +3,6 @@ title: "Recommender Systems, Part 1 (Collaborative Filtering)"
|
||||
author: Chris Hodapp
|
||||
date: May 6, 2018
|
||||
tags: machine_learning, technobabble, notebook, literate
|
||||
whatever: something
|
||||
---
|
||||
|
||||
This is an exported version of the Jupyter notebook available at my
|
||||
|
||||
22
site.hs
22
site.hs
@ -89,6 +89,13 @@ main = do
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtxTags
|
||||
>>= relativizeUrls
|
||||
|
||||
match "works/*" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ pandocMathCompiler
|
||||
>>= loadAndApplyTemplate "templates/post.html" postCtxTags
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtxTags
|
||||
>>= relativizeUrls
|
||||
|
||||
create ["archive.html"] $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
@ -120,6 +127,21 @@ main = do
|
||||
>>= loadAndApplyTemplate "templates/default.html" indexCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
create ["works.html"] $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
posts <- loadAll "works/*"
|
||||
let archiveCtx =
|
||||
listField "works" postCtxTags (return posts) `mappend`
|
||||
constField "title" "Something" `mappend`
|
||||
defaultContext
|
||||
makeItem ""
|
||||
>>= loadAndApplyTemplate "templates/works.html" archiveCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
|
||||
>>= relativizeUrls
|
||||
-- so it seems I have to have a match pattern on
|
||||
-- works/* for the above to actually work?
|
||||
|
||||
match "templates/*" $ compile templateCompiler
|
||||
|
||||
create ["atom.xml"] $ do
|
||||
|
||||
11
templates/post-grid.html
Normal file
11
templates/post-grid.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Begin Hakyll template, post-grid.html -->
|
||||
<div class="row">
|
||||
$for(works)$
|
||||
<div class="col-sm-4">
|
||||
<img src="$img$" class="img-responsive"/>
|
||||
<!-- N.B. use img-fluid for Bootstrap 4 -->
|
||||
<a href="$url$">$title$</a> - $date$
|
||||
</div>
|
||||
$endfor$
|
||||
</div>
|
||||
<!-- End Hakyll template, post-grid.html -->
|
||||
2
templates/works.html
Normal file
2
templates/works.html
Normal file
@ -0,0 +1,2 @@
|
||||
Experimental something something:
|
||||
$partial("templates/post-grid.html")$
|
||||
9
works/2010-01-01-test-old.md
Normal file
9
works/2010-01-01-test-old.md
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
title: "Old Crap"
|
||||
author: Chris Hodapp
|
||||
date: Jan 1, 2010
|
||||
tags: machine_learning, technobabble, notebook, literate
|
||||
img: images/2oegwp.jpg
|
||||
---
|
||||
|
||||
Something something other something.
|
||||
9
works/2019-10-27-test.md
Normal file
9
works/2019-10-27-test.md
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
title: "Foobar, Python, 2017"
|
||||
author: Chris Hodapp
|
||||
date: Oct 27, 2019
|
||||
tags: machine_learning, technobabble, notebook, literate
|
||||
img: images/2yrqph.jpg
|
||||
---
|
||||
|
||||
Something something something.
|
||||
Loading…
x
Reference in New Issue
Block a user