Comments (1)
After changing layouts/_default/single.html
as:
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index eaba5cf..dea0b27 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -5,10 +5,10 @@
<div class="article-container">
{{- partial "article-header.html" . -}}
<article class="article markdown-body" {{- if $justify -}}style="text-align: justify;" {{- end -}}>
- {{- with .Params.cover -}}<p><img class="cover" src="{{- . | safeURL -}}" alt></p>{{- end -}}
+ {{- with .Params.cover -}}<p><img class="cover" src="{{- . | relURL -}}" alt></p>{{- end -}}
{{- .Content -}}
</article>
-
+
{{- partial "article-labels.html" . -}}
{{- partial "article-share.html" . -}}
{{- partial "article-license.html" . -}}
This now renders cover images with the following syntax in the font matter:
+++
...
cover = "/img/<file>.png"
+++
or
---
...
cover: "/img/<file>.png"
---
Where /img
resides in static/img/...
from hugo-notepadium.
Related Issues (20)
- List pages in content/
- Blank blockquote appears after adding script HOT 5
- Font in highlight shortcode has different font-family than line numbers
- ERROR 2020/12/24 08:49:27 Failed to get JSON resource "https://vimeo.com/api/oembed.json?url=https://vimeo.com/48912912": Get "https://vimeo.com/api/oembed.json?url=https://vimeo.com/48912912": x509: certificate has expired or is not yet valid: current time 2020-12-24T08:49:27Z is after 2019-08-06T12:00:00Z
- How to add more icon fonts? HOT 2
- languageCode for "zh-cn" don't show Chinese HOT 4
- How can I show language type and line numbers in code blocks? HOT 4
- Show Categories HOT 1
- Suggestion: "Notepadium search support with fuse.js"
- `<li>` margins don't look natural HOT 1
- Clickable images don't work as expected, how do I modify it?
- Extra space after markdown URL
- Feature request: Talkyard comments
- Tabs in TOML file? HOT 1
- note-list.html has a "lower" on line 22 HOT 1
- Bug: Error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations HOT 8
- Share enable is not working
- Pages are displayed incorrectly. HOT 3
- How to add "to top"? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-notepadium.