Comments (5)
Having trouble replicating this. Your example:
{{% alert icon="๐
" context="success" %}}
Markdown
{{% /alert %}}
renders as below for me (Chrome/FireFox on Windows/MacOS):
Do you see any warnings, errors, 404's in Chrome's dev tools? Is the alert code nested inside another Shortcode?
from lotusdocs.
@colinwilson It looks like that the markdown alert is not assigned a css class, but HTML alerts are assigned one.
This is the example for the markdown alert
And this is the HTML alert output:
This shortcode is not used within a shortcode. It is placed right underneath the heading. I was checking the network tab in the Chrome developer tools, but I cannot see any errors. I am using Hugo 117 to build my site. I am not sure if it could be related to the Hugo version?
from lotusdocs.
Ah, Apologies!
This is due to a lack of documentation on my part!
The <!-- raw HTML omitted -->
in your screenshot indicates a missing (required) parameter in your hugo.toml
config.
Set unsafe = true
under [markup.goldmark.renderer]
in your hugo.toml
config like below:
[markup.goldmark.renderer]
unsafe = true
- Without the
unsafe = true
setting, raw HTML in a Goldmark-flavored Markdown source file will be replaced with<!-- raw HTML omitted -->
in the markdownifiedโ destination file. This was introduced in Hugo v0.60.0 when Goldmark became the default library used for Markdown in Hugo. The markdown (%
) alert shortcode won't render properly without this setting.
I'll document this ASAP and update the example hugo.toml
in the repo.
from lotusdocs.
ah awesome! this worked like a charm. Thank you so much! :)
from lotusdocs.
You're welcome. ๐
I'll close this once I've updated the docs and repo to reflect the config requirements for the theme.
from lotusdocs.
Related Issues (20)
- AVIF images not working HOT 3
- No copy codeblock for non-prism highlighting HOT 4
- themeColor in hugo.toml doesn't affect homepage HOT 1
- PrismJS highlight color no applied with shell HOT 2
- How can i edit the landing page? HOT 2
- /robots.txt is missing HOT 1
- Landing page issues HOT 4
- Mermaid diagram rendering broken HOT 5
- Cant edit landing page HOT 14
- invalid go version '1.21.5': must match format 1.23 HOT 1
- Prism theme does not show correct CSS when baseURL/publishDir are not set to /
- Unable to Build from Quickstart Page (March 1st, 2024) HOT 2
- Shortcode tables don't show up within tabs HOT 2
- editPage parameter not working
- CJK language search does not work in flexsearch
- Disabling landing page
- Prism inside Tabs Issue
- The page does not support inserting images HOT 1
- Images do not work HOT 1
- Failed to extract shortcode: shortcode "alert" has no .Inner, yet a closing tag was provided HOT 7
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 lotusdocs.