惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
T
The Exploit Database - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
O
OpenAI News
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
Forbes - Security
Forbes - Security
F
Fortinet All Blogs
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
S
Schneier on Security
雷峰网
雷峰网
I
Intezer
博客园_首页
罗磊的独立博客
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V2EX - 技术
V2EX - 技术
G
GRAHAM CLULEY
MyScale Blog
MyScale Blog
Recent Announcements
Recent Announcements
N
News and Events Feed by Topic
T
Troy Hunt's Blog
S
Security Affairs
S
Securelist
Attack and Defense Labs
Attack and Defense Labs
IT之家
IT之家
V
Visual Studio Blog
WordPress大学
WordPress大学
T
Tenable Blog
T
Threat Research - Cisco Blogs
小众软件
小众软件
A
About on SuperTechFans
Spread Privacy
Spread Privacy
T
Tor Project blog
V
V2EX
Help Net Security
Help Net Security
Cyberwarzone
Cyberwarzone
P
Proofpoint News Feed
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
L
LINUX DO - 热门话题
大猫的无限游戏
大猫的无限游戏

CloudCannon Blog

Building with AI: Git-based vs headless vs traditional CMS CloudCannon + Astro: performance meets powerful content management Introducing the Astro Component Starter Introducing Jetstream — built on the Astro Component Starter Why we switched to the system font stack Redesigning CloudCannon’s docs with Diátaxis, Lume, and Pagefind Make content editing more visual: upgraded Editable Regions How Configuration Mode makes building editing interfaces easy Your hosting just got an upgrade (and a price cut) Custom testing domains for professional branding Keep your content consistent with input validation Managing multilingual content in CloudCannon Simplify team publishing with conflict resolution and domain tools Open Beta: Publishing Conflict Resolution Getting started with CloudCannon and Astro: Bookshop, components, and live editing Welcome to the CloudCannon Community! Omnichannel delivery is just marketing spin from API-based CMS companies Getting started with CloudCannon and Astro: Snippets and Collections Managing digital assets in CloudCannon: a guide to smart asset storage Understanding CloudCannon's branching workflows and Projects: a complete guide What is a static website? CloudCannon’s 2024 wrapped Getting started with CloudCannon and Astro: WYSIWYG blogging Jamstack vs. WordPress: reasons to make the change The top five static site generators for 2025 (and when to use them!) Free Jekyll themes for 2025: ten great community options Eleventy (11ty) vs. Hugo How to set up WYSIWYG editing with MkDocs Material The rise of static-first websites: why major brands are making the switch Watching your Core Web Vitals on Jamstack Understanding the difference between static, dynamic, and hybrid websites Looking for an alternative to Netlify CMS or Decap CMS? Designing components for your website editors: a CloudCannon case study Does my website look big in this? Six tips to lower your page weight Content is sacred — so own your revision history The eternal balancing act: load time vs. delay time Streamlined Headless Mode, Unified Configuration, and live data editing What is a headless CMS? Looking for a TinaCMS or Tina Cloud alternative? The ultimate guide to Hugo Sections Coming soon: Live config editing and data reloading Faster publishing workflows out now! Why information architecture matters for your website Website UX vs SEO: picking your battles Easily manage your multilingual Astro site in CloudCannon How you can optimize publishing workflows for your content team How you can optimize your CMS for SEO success How you can optimize your Content Editor for long-form articles How you can optimize your Visual Editor for page building Secure, swift, and stable: static sites for the financial sector Enhanced flexibility for teams with Custom Permissions Building static sites that scale The Inaugural 11ty International Symposium on Making Web Sites Real Good How to manage hundreds of connected websites with a Git-based headless CMS How we’re building CloudCannon for accessibility CloudCannon’s new editing improvements are here! Open Beta | New ways to collaborate on editing your websites Top 11 free Eleventy themes for 2024 Top 10 free Astro themes to use in 2024 Why choose a Git-based headless CMS over a monolithic DXP in 2024? Learning web development: a self-guided roadmap Partner Site of the Month: Blüthner Piano Centre, by Winteractive CloudCannon’s 2023 wrapup Let’s create a microblog with visual editing using Bookshop and Eleventy Update and visualize your branches with CloudCannon Projects What is a Git-based CMS and why you should use one CloudCannon secures SOC 2 certification The complete guide to growing your web development agency Automatically optimize your images with Eleventy Image and CloudCannon Share components and syndicate content with Site Mounting Partner Site of the Month: Cru Uncorked, by Ed Meehan New web component for responsive HTML tables Wrapping up HugoConf 2023 Partner Site of the Month: Van Dillen Antieke Bouwmaterialen, by Fulldev How to become a freelance web developer: a comprehensive guide Q3 2023: CloudCannon features and improvements 22 ways to deliver more value to your web development clients Partner Site of the Month: DC Gay Flag Football League, by Ed Cupaioli A new way to configure your CloudCannon sites CloudCannon — the official CMS partner of Eleventy Full CloudCannon support for Nuxt static sites Partner Site of the Month: Stadium Bike, by Insight Creative, Inc. HugoConf 2023, brought to you by CloudCannon DAM Support for Cloudflare R2 and DigitalOcean Spaces Eleventy (11ty) vs. Gatsby in 2023 – which SSG is best for you? How CloudCannon’s live editing works with Astro and Bookshop Partner Site of the Month: Fiducian, by Croissant & Baguette Eleventy (11ty) vs. Astro How to customize CloudCannon’s Client Sharing interface Let anyone, anywhere, edit your CloudCannon sites Top 23 free Astro themes for building out-of-this-world static sites in 2023 How Jampack optimizes our Eleventy website and improves performance Astro vs. Next.js CloudCannon.com is now built with Eleventy! Out-of-this-world support for all Astro users Introducing the CloudCannon Partner Program Full CloudCannon support for Gatsby Top 10 Free SvelteKit Themes for Building Lighting-Fast Static Sites in 2023 Enhanced CloudCannon support for Next.js users Upcoming CloudCannon Interface improvements (Open Beta)
Editing Content with Hugo Shortcodes: Built-in and Custom Shortcode Support
2022-11-03 · via CloudCannon Blog

You asked for it. We’ve done it. CloudCannon is the first CMS with full support and full integration for built-in and custom Hugo shortcodes — in our Visual, Content, and Source Editors. That’s a pretty big claim! What do we mean by this? Let’s take a look.

What are shortcodes? Direct link to this section

Hugo uses shortcodes — code snippets in content files — to get around the limitations of Markdown, while keeping the simplicity and ease of Markdown’s syntax. Shortcodes let developers consolidate templating into small, reusable snippets that can be embedded directly inside Markdown content.

Hugo ships with a set of predefined shortcodes, which we’ve integrated and configured for immediate use in CloudCannon’s Visual and Content Editors.

How to use Hugo’s built-in shortcodes in CloudCannon Direct link to this section

When you and your team members are working in CloudCannon’s Content Editor or Visual Editor, which provide two different WYSIWYG interfaces for Markdown content, you’ll be able to add a shortcode by simply clicking the ‘Snippet’ button at the top right of the editing pane. (More on Snippets later — we’ll be expanding this functionality across other SSGs in the coming weeks.)

WYSIWYG editor

From here you can select your Hugo shortcode.

Shortcode list

Within the shortcode interface itself, you’ll see all the available options to change the shortcode’s parameters.

Tweet example

This integration means that content editors and marketers will be able to create new shortcodes and edit existing shortcodes via an intuitive interface, without ever needing to work in source files.

If you’re a developer working locally, or via CloudCannon’s Source Editor view, simply call the shortcode in your Markdown content as you normally would — {{< shortcodename parameters >}} — and CloudCannon will include it in your Hugo build.

Here’s an example of how the gist shortcode looks in an example Markdown file:

## Heading text

Here's my Markdown content, with an example of the gist shortcode below.

{{< gist spf13 7896402 "img.html" >}}

The above shortcode, {{&lt; gist spf13 7896402 "img.html" &gt;}}, will embed the referenced code sample on your page.

You and your editors will now be able to see this gist shortcode, edit its parameters, or remove it via the Content Editor and Visual Editor views, where it appears as a component within the Markdown section of your page.

Configure your custom Hugo shortcodes in CloudCannon Direct link to this section

If you’ve been using Hugo for a while, you’re likely to have built up a library of your own custom shortcodes, stored in layouts/shortcodes/. If you’re working locally or within CloudCannon’s Source Editor, you can use them immediately.

To ensure that others can use or edit custom shortcodes from CloudCannon’s Content Editor or Visual Editor, you’ll need to add to your global CloudCannon configuration file. If you’re familiar with the logic behind configuring inputs within CloudCannon, this will be a relatively straightforward process. For more details, view our documentation on editing content with custom Hugo shortcodes.

Shortcodes for everyone Direct link to this section

By fully integrating both Hugo’s built-in shortcodes and your own custom Hugo shortcodes into CloudCannon’s intuitive Markdown editing views, CloudCannon help to surface one of Hugo’s core features for users with any level of technical ability.

We’ve always been focused on enhancing the editing experience for our users, and by integrating Hugo’s shortcodes fully into our Content Editor and Visual Editor we’re giving all our users a more efficient means of using templated content, and more control over their Hugo websites.

What’s next? Direct link to this section

We’ve been working on this feature for some time, because it’s important to our users. Over the coming months we’ll start to reveal more of the bigger picture for our Snippets feature, which will include full support and integration for shortcode equivalents in other static site generators (like Liquid tags in Jekyll and Eleventy), as well as full MDX support.

Our goal is to build the best Git-based CMS for your whole team, no matter which SSG you’re using. We’d love to hear what you think about our shortcode integration for your Hugo sites, and which features are still on your wishlist.

As always, feel free to reach out to our dev team in support with any questions or comments!