How I generate my homepage - wiki.haskell.orgDutc… · let linkText toHtmI ( ++ show format ) in...

14
How I generate my homepage Wouter Swierstra 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

What’s missing?

Nothing. If it’s not broke, don’t fix it.

14