Table of contents
TL;DR / Geek Summary:
- Cheat Sheet: Offline reference for Hugo Stack theme parameters and Markdown syntax.
- Shortcode Arsenal: Documentation for embedding Bilibili, YouTube, galleries, and encrypted blocks.
- CLI Helper: Includes Batch script commands for public folder encryption.
# Blog Commands Record
# Code Block Language Support
| Prefix | Language |
|---|---|
| A | ABAP, ABNF, ActionScript, ActionScript 3, Ada, AL, Angular2, ANTLR, ApacheConf, APL, AppleScript, ArangoDB AQL, Arduino, ArmAsm, AutoHotkey, AutoIt, Awk |
| B | Ballerina, Bash, Bash Session, Batchfile, BibTeX, Bicep, BlitzBasic, BNF, BQN, Brainfuck |
| C | C, C#, C++, Caddyfile, Caddyfile Directives, Cap’n Proto, Cassandra CQL, Ceylon, CFEngine3, cfstatement, ChaiScript, Chapel, Cheetah, Clojure, CMake, COBOL, CoffeeScript, Common Lisp, Coq, Crystal, CSS, Cython |
| D | D, Dart, Diff, Django/Jinja, dns, Docker, DTD, Dylan |
| E | EBNF, Elixir, Elm, EmacsLisp, Erlang |
| F | Factor, Fennel, Fish, Forth, Fortran, FortranFixed, FSharp |
| G | GAS, GDScript, Genshi, Genshi HTML, Genshi Text, Gherkin, GLSL, Gnuplot, Go, Go HTML Template, Go Text Template, GraphQL, Groff, Groovy |
| H | Handlebars, Haskell, Haxe, HCL, Hexdump, HLB, HLSL, HolyC, HTML, HTTP, Hy |
| I | Idris, Igor, INI, Io, ISCdhcpd |
| J | J, Java, JavaScript, JSON, Julia, Jungle |
| K | Kotlin |
| L | Lighttpd configuration file, LLVM, Lua |
| M | Makefile, Mako, markdown, Mason, Mathematica, Matlab, mcfunction, Meson, Metal, MiniZinc, MLIR, Modula-2, MonkeyC, MorrowindScript, Myghty, MySQL |
| N | NASM, Natural, Newspeak, Nginx configuration file, Nim, Nix |
| O | Objective-C, OCaml, Octave, Odin, OnesEnterprise, OpenEdge ABL, OpenSCAD, Org Mode |
| P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Plutus Core, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerQuery, PowerShell, Prolog, PromQL, properties, Protocol Buffer, PSL, Puppet, Python, Python 2 |
| Q | QBasic, QML |
| R | R, Racket, Ragel, Raku, react, ReasonML, reg, reStructuredText, Rexx, Ruby, Rust |
| S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Sed, Sieve, Smali, Smalltalk, Smarty, Snobol, Solidity, SourcePawn, SPARQL, SQL, SquidConf, Standard ML, stas, Stylus, Svelte, Swift, SYSTEMD, systemverilog |
| T | TableGen, Tal, TASM, Tcl, Tcsh, Termcap, Terminfo, Terraform, TeX, Thrift, TOML, TradingView, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData |
| V | V, V shell, Vala, VB.net, verilog, VHDL, VHS, VimL, vue |
| W | WDTE, WebGPU Shading Language, Whiley |
| X | XML, Xorg |
| Y | YAML, YANG |
| Z | Z80 Assembly, Zed, Zig |
# Theme-Related
FrontMatter Field Meanings
| |
# MarkDown Basics
| |
# Shortcodes
Stack comes with a set of shortcodes that you can use in your content.
This page only contains shortcodes specific to Stack. Hugo’s built-in shortcodes are documented here .
# Bilibili Video
Embed a Bilibili video.
| |
The Video_ID can be found in the video’s URL. For example, the video ID for https://www.bilibili.com/video/av12345678 is av12345678. Both AV and BV are supported.
The PART_NUMBER is optional. It can be used to specify the video part to play. For example, the part number for https://www.bilibili.com/video/av12345678?p=2 is 2.
# Tencent Video
Embed a Tencent Video .
| |
The Video_ID can be found in the video’s URL. For example, the video ID for https://v.qq.com/x/cover/hzgtnf6tbvfekfv/g0014r3khdw.html is g0014r3khdw.
# YouTube Video
Embed a YouTube video.
| |
The Video_ID can be found in the video’s URL.
# Generic Video File
Embed a video file.
| |
The VIDEO_URL can be a URL or a path relative to the static directory. For example, src="/video/my-video.mp4" will embed the video file located at static/video/my-video.mp4 in your site folder.
The autoplay attribute is optional. It can be used to specify whether the video should auto-play. The poster attribute is optional. It can be used to specify a poster image for the video.
# GitLab
Embed a GitLab snippet.
| |
The SNIPPET_ID can be found in the snippet’s URL. For example, the snippet ID for https://gitlab.com/-/snippets/1234567 is 1234567.
# Quote
| |
With the organization above, you can insert images into your content like this:
| |
# Insert Gallery
To insert an image gallery, you need to create a page bundle for the gallery. For example:
| |
| |
This will render two rows: the first row with two images, and the second row with one image.
# Gaussian Blur
Entering this directly in your article gives a Gaussian blur effect~
| |
# Blackout Effect
Entering this directly in your article gives a blackout effect: Hehehe, I’m hidden!
| |
# Gotchas / Pitfalls
Doing it this way ruins line breaks with the Enter key/Tab = =. You can use <br> at the end of the line to break lines.
| |
# Because it’s useless = = (Instant Answer)
Don’t hit me runs away)
Supports Mermaid JS and KaTeX math formulas.
# Google Ads
Already embedded into the cfg file.
# Hugo Post Encryption
# title: “This Is An Encrypted Post”
This content is visible to anyone.
The following content is protected.
| |
# Video API Test (MP4)
| |
# Highlight text (Mark)
This is highlighted text | |
# Abbreviation
Abbreviated text | |
# Center Text
Center text
| |
# Blockquote
Death is not the end of everything, forgetting is.
| |
# Details (Hidden)
Click me!
Sending deep blessings to the person reading this line! | |
# Notice
Warning! This notice looks so good, I couldn’t resist sharing it.
| |
This is the first notice. You can change notice-warning to notice-note, notice-info, or notice-tip to get three other differently styled notices.
# Music
| |
# NetEase Cloud Music
| |
# Keyboard Input
| |
Press CTRL + ALT + Delete to end the session.
# GitHub
| |
| Parameter | Explanation |
|---|---|
| name | Repository name |
| link | Link |
| description | Description |
| color | Color |
| language | Language |
# Simple Colored Notice
warning can be changed to info tip note
| |
# Blockquote 2
Ten miles of green hills stretch far, the tide is flat, the road bears sand. A few bird cries lament the passing years. It is a desolate time again, at the end of the world. White dew gathers the waning moon, a clear breeze scatters the morning glow. By the green weeping willow bank, I ask the lotus. Do you remember the house where we bought wine in the years past?
| |
# Center Quote Block
Ten miles of green hills stretch far, the tide is flat, the road bears sand
A few bird cries lament the passing years
It is a desolate time again, at the end of the world
White dew gathers the waning moon, a clear breeze scatters the morning glow
| |
# Gallery
| |
# Spotify
| |
# Timeline
{{< timeline date=“2023-09-10” title=“awa” description=“awa” tags=“awa” url=“awa” >}}
{{/< timeline date=“2023-09-10” title="" description="" tags="" url="" >/}}
# Chat
{{< chat position=“left” name=“John Doe” timestamp=“2023-09-12 14:30”>}} This is the message content on the left. {{< /chat >}}
{{< chat position=“right” name=“Alice” timestamp=“2023-09-12 14:45” >}} This is the message content on the right, testing a looooooooooooooooooong length. {{< /chat >}}
# Blog Encryption Command (jiami.bat)
This command is used to encrypt specific post content (used in conjunction with the hugo-encrypt shortcode).
Please make sure you have the related tools installed.
| |