Loading... ## Hugo 内置 ``` # gist {{< gist username project_name >}} {{< gist username project_name filename >}} // 若一个gist有多段代码,可以在后面加上filename # instagram /tweet {{< instagram/tweet post_id >}} # youtube {{< youtube video_id >}} // Positional {{< youtube id="video_id" autoplay="true" >}} // Named ``` ## 主题内置 ### fancybox [Fancybox](http://fancyapps.com/fancybox/3/) is a jQuery lightbox script for displaying images, videos and more. It is touch enabled, responsive and fully customizable. - Named `< fancybox path="path" file="file" caption="caption" gallery="gallery" >` - Positional `< fancybox "path" "file" "caption" "gallery" >` ### img-post Add an image which can be aligned center, left, or right. - Named `< img-post path="date" file="filename.jpg" alt="Alt Text" type="left" >` - Positional `< img-post "title" "filename.jpg" "Alt Text" "left" >` ### img-fit Insert multiple images with the ability to create a gallery if needed. ``` < img-fit "4u" "filename1.jpg" "Alt text 1" "4u" "filename2.jpg" "Alt text 2" "4u$" "filename3.jpg" "Alt text 3" "date" > ``` **注意**:由于`build`的时候会直接将`shortcodes`结果产生,所以**主题内置**内容均省略了必需的符号,使用符号见**Hugo 内置**的示例。 最后修改:2019 年 10 月 08 日 © 允许规范转载 赞 0 如果觉得我的文章对你有用,请随意赞赏
3 条评论
{{</* 语法 */>}}
这样即可不被当作 shotcodes 产出😬给你评论加上代码块了,可以显示*号了,不过现在没在用hugo了