From 15f8ac86325dcb4e37cdfd38121a8a0380d68624 Mon Sep 17 00:00:00 2001 From: Caio Lente <7017340+clente@users.noreply.github.com> Date: Mon, 16 Oct 2023 23:45:47 -0300 Subject: Suggest render: false in adition to link: url --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 85c662c..7cfc801 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,10 @@ already implemented: - Static content: you can create empty blog entries that act as links to static files by including `link: "{url}"` in a post's [front - matter](https://gohugo.io/content-management/front-matter/). + matter](https://gohugo.io/content-management/front-matter/). You can also add + `render: false` to your [build + options](https://gohugo.io/content-management/build-options/#readout) to avoid + rendering a blank post. - Single-use CSS (EXPERIMENTAL): you can add some styles to a single page by writing the CSS you need in `assets/{custom_css}.css` and then including `style: "{custom_css}.css"` in the [front -- cgit v1.2.3 From 7f9bae2d9d6436e3f90b2d9d8d21de896b34716b Mon Sep 17 00:00:00 2001 From: Caio Lente <7017340+clente@users.noreply.github.com> Date: Thu, 4 Jan 2024 23:24:51 -0300 Subject: New absfigure shortcode --- README.md | 2 ++ layouts/shortcodes/absfigure.html | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 layouts/shortcodes/absfigure.html (limited to 'README.md') diff --git a/README.md b/README.md index 0636c04..2704d2a 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,8 @@ already implemented: - Reply by email: if you supply an email address, the theme creates a "Reply to this post by email" button at the end of every post (see Kev Quirk's [original implementation](https://kevquirk.com/adding-the-post-title-to-my-reply-by-email-button)). +- `absfigure` shortcode: a shortcut to use the `figure` shortcode that also + converts relative URLs into absolute URLs by using the `absURL` function. - Single-use CSS (EXPERIMENTAL): you can add some styles to a single page by writing the CSS you need in `assets/{custom_css}.css` and then including `style: "{custom_css}.css"` in the [front diff --git a/layouts/shortcodes/absfigure.html b/layouts/shortcodes/absfigure.html new file mode 100644 index 0000000..ad60c6c --- /dev/null +++ b/layouts/shortcodes/absfigure.html @@ -0,0 +1,29 @@ + + {{- if .Get "link" -}} + + {{- end -}} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} +

{{ . }}

+ {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + \ No newline at end of file -- cgit v1.2.3 From 58693036cfc0f9307c5ed9fdb381266cbbb57cae Mon Sep 17 00:00:00 2001 From: Caio Lente <7017340+clente@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:39:01 -0300 Subject: Typo on docs --- README.md | 2 +- exampleSite/config.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2704d2a..730302d 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ enableRobotsTXT = true # (EXPERIMENTAL) This theme is capable of dynamically generating social cards # for posts that don't have `images` defined in their front matter; By setting # `generateSocialCard` to false, you can prevent this behavior. For more - # information see layouts/partials/seo_tags.html + # information see layouts/partials/social_card.html generateSocialCard = true # Social media. Delete any item you aren't using to make sure it won't show up diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6fe641f..3c8b0d0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -66,7 +66,7 @@ enableRobotsTXT = true # (EXPERIMENTAL) This theme is capable of dynamically generating social cards # for posts that don't have `images` defined in their front matter; By setting # `generateSocialCard` to false, you can prevent this behavior. For more - # information see layouts/partials/seo_tags.html + # information see layouts/partials/social_card.html generateSocialCard = true # Social media. Delete any item you aren't using to make sure it won't show up -- cgit v1.2.3