Remove redundant bib titles.
Put titles in templates, not in source code.
This commit is contained in:
parent
93241045b4
commit
b560adefbc
17
site.hs
17
site.hs
|
@ -13,11 +13,10 @@ config = defaultConfiguration
|
||||||
{ deployCommand = "echo `pwd`; ./scripts/deploy.sh" }
|
{ deployCommand = "echo `pwd`; ./scripts/deploy.sh" }
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
bibHeaders :: [(String, String, [String])]
|
bibHeaders :: [(String, [String])]
|
||||||
bibHeaders = [ ("confs", "Conference Publications",
|
bibHeaders = [ ("draft" , [ "-c", "$type='UNPUBLISHED'" ] ) ,
|
||||||
["-c", "$type='INPROCEEDINGS'" ] )
|
("confs" , [ "-c", "$type='INPROCEEDINGS'" ] ) ,
|
||||||
, ("draft", "Drafts" ,
|
("journal", [ "-c", "$type='ARTICLE'" ] )
|
||||||
[ "-c", "$type='UNPUBLISHED'" ] )
|
|
||||||
]
|
]
|
||||||
|
|
||||||
bibSources :: [String]
|
bibSources :: [String]
|
||||||
|
@ -71,7 +70,7 @@ main = hakyllWith config $ do
|
||||||
route $ setExtension "css"
|
route $ setExtension "css"
|
||||||
compile $ compass
|
compile $ compass
|
||||||
|
|
||||||
forM_ bibHeaders $ \(nick, title, flags) ->
|
forM_ bibHeaders $ \(nick, flags) ->
|
||||||
create [fromCapture "bibs/*.html" nick] $ do
|
create [fromCapture "bibs/*.html" nick] $ do
|
||||||
route idRoute
|
route idRoute
|
||||||
compile $
|
compile $
|
||||||
|
@ -85,9 +84,7 @@ main = hakyllWith config $ do
|
||||||
(\(i:_) _ -> return $ "files/posters/" ++ i ++ "poster.pdf")
|
(\(i:_) _ -> return $ "files/posters/" ++ i ++ "poster.pdf")
|
||||||
]
|
]
|
||||||
biblioCtx = mconcat
|
biblioCtx = mconcat
|
||||||
[ field "bibtitle" (\_ -> return $ title)
|
[ field "bibitems" $ return . itemBody ] in do
|
||||||
, field "bibitems" $ return . itemBody
|
|
||||||
] in do
|
|
||||||
bibTpl <- loadBody "templates/bibitemtpl.html"
|
bibTpl <- loadBody "templates/bibitemtpl.html"
|
||||||
(bib2bib flags)
|
(bib2bib flags)
|
||||||
>>= bib2bibParse
|
>>= bib2bibParse
|
||||||
|
@ -99,7 +96,7 @@ main = hakyllWith config $ do
|
||||||
match "content/biblio.md" $ do
|
match "content/biblio.md" $ do
|
||||||
route $ setExtension "html"
|
route $ setExtension "html"
|
||||||
compile $ do
|
compile $ do
|
||||||
let makeBibCtx (nick, _, _) =
|
let makeBibCtx (nick, _) =
|
||||||
field nick (\_ -> loadBody $ fromFilePath ("bibs/" ++ nick ++ ".html"))
|
field nick (\_ -> loadBody $ fromFilePath ("bibs/" ++ nick ++ ".html"))
|
||||||
secDiv = defaultHakyllWriterOptions { writerSectionDivs = True }
|
secDiv = defaultHakyllWriterOptions { writerSectionDivs = True }
|
||||||
biblioCtx = mconcat $ map makeBibCtx bibHeaders in do
|
biblioCtx = mconcat $ map makeBibCtx bibHeaders in do
|
||||||
|
|
Loading…
Reference in New Issue