Skip to content

Commit 583645b

Browse files
committed
more cleanup
1 parent 39ae362 commit 583645b

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ authors = ["Thibaut Lienart <[email protected]>"]
44
version = "0.10.3"
55

66
[deps]
7-
Franklin = "713c75ef-9fc9-4b05-94a9-213340da978e"
87
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
98

109
[compat]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The grid below keeps track of their name, license, the kind of navbar they have
2929
| `"minimal-mistakes"` | [Minimal mistakes](https://github.com/mmistakes/minimal-mistakes) | [MIT](https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE) | Side/Top | No |
3030
| `"celeste"` | [Celeste](https://github.com/nicoelayda/celeste) | [MIT](https://github.com/nicoelayda/celeste/blob/master/LICENSE) | Top | No |
3131
| `"bootstrap5"` | [Bootstrap5](https://getbootstrap.com/docs/5.3/getting-started/introduction/) | [MIT](https://github.com/twbs/bootstrap/blob/main/LICENSE) | Top | No |
32+
| `"academic"` | [Jon Barron](https://jonbarron.info/) | N/A | No | No |
3233

3334
## Modifying or adding a template
3435

src/templates/academic/utils.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function hfun_bar(vname)
1717
val = Meta.parse(vname[1])
1818
return round(sqrt(val), digits=2)
1919
end
20-
20+
2121
function hfun_m1fill(vname)
2222
var = vname[1]
2323
return pagevar("index", var)
@@ -154,7 +154,7 @@ end
154154
155155
Find and list all papers with all tags in `params`.
156156
"""
157-
function hfun_paperswithtags(params)::String
157+
@delay function hfun_paperswithtags(params)::String
158158
folder = "papers"
159159
checktags = params
160160

@@ -198,6 +198,9 @@ function hfun_paperswithtags(params)::String
198198
l = Franklin.unixify(html)
199199

200200
pvd = pagevar(path, :date)
201+
if isnothing(pvd)
202+
pvd = Date(Dates.unix2datetime(stat(path * ".md").ctime))
203+
end
201204

202205
# paper title
203206
write(io, """$t <date>($(Dates.format(pvd, "u yyyy")))</date><br>\n""")
@@ -212,8 +215,11 @@ function hfun_paperswithtags(params)::String
212215
write(io, "&ensp;/&ensp;")
213216
end
214217
# arXiv
215-
write(io, """<a href=$(pagevar(path, :arxiv))>arXiv</a>""")
216-
write(io, "&ensp;/&ensp;")
218+
arxiv = pagevar(path, :arxiv)
219+
if !isempty(arxiv)
220+
write(io, """<a href=$(arxiv)>arXiv</a>""")
221+
write(io, "&ensp;/&ensp;")
222+
end
217223
# code
218224
code = pagevar(path, :code)
219225
if !isnothing(code) && !isempty(code)
@@ -228,6 +234,9 @@ function hfun_paperswithtags(params)::String
228234
end
229235
# bibtex
230236
write(io, """<a href="/$(l[1:end-1])#bibtex">bibTeX</a>\n""")
237+
if i != length(paths)
238+
write(io, "<br>")
239+
end
231240
end
232241
write(io,"</p>")
233242
return String(take!(io))

0 commit comments

Comments
 (0)