Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions content/en/publications/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# {{- range .Pages }}
# <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
# {{- end }}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/Interlisp/Interlisp.github.io
go 1.20

require (
github.com/google/docsy v0.10.0 // indirect
github.com/google/docsy v0.12.0 // indirect
github.com/google/docsy/dependencies v0.7.2 // indirect
)
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.9.1 h1:+jqges1YCd+yHeuZ1BUvD8V8mEGVtPxULg5j/vaJ984=
github.com/google/docsy v0.9.1/go.mod h1:saOqKEUOn07Bc0orM/JdIF3VkOanHta9LU5Y53bwN2U=
github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg=
github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE=
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.12.0 h1:CddZKL39YyJzawr8GTVaakvcUTCJRAAYdz7W0qfZ2P4=
github.com/google/docsy v0.12.0/go.mod h1:1bioDqA493neyFesaTvQ9reV0V2vYy+xUAnlnz7+miM=
github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI=
github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
40 changes: 40 additions & 0 deletions layouts/publications/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{ define "main" }}
<br><br><br>
<h1>Publications</h1>
{{- $pages := .Pages.ByParam "date" }}
<ul>
{{ range $pages }}
<li>
{{- $rawTitle := or .Params.title .Title -}}
{{- $rendered := replaceRE "^<p>(.*)</p>$" "$1" $rawTitle -}}
{{- $rendered = $rawTitle | markdownify -}}
<span><strong>{{ $rendered }}</strong></span><br>

{{- warnf "Parameters $s " .Params }}
{{- $d := cond (ne .Params.date nil) (time .Params.date) .Date -}}
<time datetime="{{ $d.Format "2006-01-02" }}">{{ $d.Format "2006-01-02" }}</time><br>

{{ with .Params.abstract }}
{{- $plain := . | markdownify | plainify | replaceRE `\s+` " " -}}
{{- $words := split $plain " " -}}
{{- $previewWords := cond (gt (len $words) 24) (first 24 $words) $words -}}
{{- $preview := delimit $previewWords " " -}}
<div>{{ $preview }}{{ if gt (len $words) 24 }}…{{ end }}</div>
<br>
{{ end }}

{{- $authors := .Params.authors -}}
{{- warnf "authors: $s" $authors }}
{{- if $authors -}}
{{- if reflect.IsSlice $authors -}}
{{ delimit $authors ", " " and " }}<br>
{{- else -}}
{{ $authors }}<br>
{{- end -}}
{{- end -}}
<a href="{{ .RelPermalink }}">Read more</a>
<br><br>
</li>
{{ end }}
</ul>
{{ end }}