From c8cffe93d18048c4521f15da605b1903db916182 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Sun, 28 Aug 2022 04:06:44 +0300 Subject: [PATCH 1/2] Enable markdown formatting in subsections. Specifically, support links in section subtitles. --- layouts/index.html | 4 ++-- static/css/style.css | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 9178e6f..5e8be2b 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -16,7 +16,7 @@ {{ $subtitle := "" }} {{ if .Params.section_settings.subtitle }} -{{ $subtitle = .Params.section_settings.subtitle }} +{{ $subtitle = .Params.section_settings.subtitle | markdownify }} {{ end }} {{ if or $title (eq $content_type "about")}} @@ -46,4 +46,4 @@
{{ $subtitle }}
{{end}} -{{end}} \ No newline at end of file +{{end}} diff --git a/static/css/style.css b/static/css/style.css index 8af3b80..6be15dd 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -21,6 +21,11 @@ h2 code { padding: 2px; } +h6 a { + padding-left: 5px; + padding-right: 5px; +} + #TableOfContents ul { margin: auto; padding-left: 2%; @@ -270,4 +275,4 @@ h2 code { .read_more { margin-top: 1%; -} \ No newline at end of file +} From d3fc289d1397f5c02d8ee75ecfd076d64c4e1b5e Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Sun, 28 Aug 2022 04:23:51 +0300 Subject: [PATCH 2/2] Demo: show working link in subtitle. --- exampleSite/content/home/publications.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/home/publications.md b/exampleSite/content/home/publications.md index 20d45fc..aa49dd8 100644 --- a/exampleSite/content/home/publications.md +++ b/exampleSite/content/home/publications.md @@ -8,7 +8,10 @@ content_type: 'publications' section_settings: show_section: true title: 'Recent Publications' - subtitle: 'Custom Subtitle: see my google scholar for the latest list' + subtitle: | + + Custom Subtitle: see my [google scholar](https://scholar.google.com/) + for the latest list --- -home/publications.md \ No newline at end of file +home/publications.md