How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in...
Transcript of How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in...
![Page 1: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/1.jpg)
How I generate my homepage
Wouter Swierstra
1
![Page 2: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/2.jpg)
2
![Page 3: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/3.jpg)
Design constraints
• I don’t want to write HTML;
• I regularly add slides and publications, but not much else;
• I want to avoid data duplication.
• I don’t want to rely on unstable libraries.
• I have a small brain.
3
![Page 4: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/4.jpg)
Existing solutions,an incomplete list
• Pandoc;
• Hakyll;
• yesod/snap/happstack...;
• blogination/bamboo/orchid/...
• piki/moe/html/blaze;
4
![Page 5: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/5.jpg)
What I use
• I use a combination of homebrew scripts and custom data types;
• Blaze HTML combinator library;
• Static CSS and HTML template;
• Separate pages for index, publications, talks, teaching, etc.
5
![Page 6: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/6.jpg)
Example code
6
![Page 7: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/7.jpg)
Example
7
![Page 8: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/8.jpg)
Formatting publications
8
![Page 9: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/9.jpg)
Code reuse
9
![Page 10: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/10.jpg)
More code reuse
10
![Page 11: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/11.jpg)
Main
11
![Page 12: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/12.jpg)
Duplication?
• Bibtex and HTML are close, but they’re not quite the same.
• LaTeX accents vs HTML codes;
• \noopsort{van Noort};
• ...
• I want my publications in reverse chronological order, uniformly formatted.
12
![Page 13: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/13.jpg)
What’s missing?
• Better Bibtex2html.
• What about slides?
• Is it worth migrating to a fancier library?
13
![Page 14: How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in html toHtmI (a attr link Text) theLinks dt foldl acc theTitleLink ( Publs. otherFormats](https://reader035.fdocuments.us/reader035/viewer/2022071020/5fd47b25e19c98451068116c/html5/thumbnails/14.jpg)
What’s missing?
Nothing. If it’s not broke, don’t fix it.
14