1. プログラミング
  2. Hugo

【独自テーマ用】マークダウンのサンプル集

Hugoで記事を作成する時のマークダウンサンプル。


#

h1 Heading

##

h2 Heading

###

h3 Heading

####

h4 Heading

#####

h5 Heading

水平線

---***で水平線



強調

太文字 + 赤のアンダーライン

**__の2つで文章の左右を挟むと太字+赤マーカーで強調

This is bold text

サンプル テキスト

太文字

*_が1つだと太字

※両サイドにスペースを入れないと動作しない時がある。

This is italic text

サンプル テキスト

打消し線

~~チルダ2個で打消し Strikethrough

引用

引用は、>を文章の最初に

Blockquotes can also be nested…

記事装飾用のショートコードのサンプル

{{}}の中にに< ショートコード名 >

終わりは/ショートコード名

マークダウンは処理されないので、HTMLで中身を記述する

Point

サンプル

well_dash

通常のテキスト
リンク
  • サンプル
  • well_b

    テキスト

    リスト

    番号無し

    文章の最初に +, -, or *を記載。

    • 通常のリスト
      • ネストする場合は、スペース2でインデント
        • ネストの中で更にインデントすることで第3階層
        • Facilisis in pretium nisl aliquet
        • Nulla volutpat aliquam velit
    • Very easy!

    番号有り

    数字とドット(.)ではじめる

    1. Lorem ipsum dolor sit amet
    2. Consectetur adipiscing elit
    3. Integer molestie lorem at massa

    コード

    Inline

    shift + ~で囲う

    sample

    Syntax highlighting

    3連アポストロフィーの後に言語で改行してコードを記入。

    3連アポストロフィーで囲む。

    var foo = function (bar) {
      return bar++;
    };
    
    console.log(foo(5));
    

    Tables

    ショーコードmdtableでレスポンシブに対応したテーブルに。

    Option Description
    data path to data files to supply the data that will be passed into templates.
    engine engine to be used for processing templates. Handlebars is the default.
    ext extension to be used for dest files.

    Right aligned columns

    Option Description
    data path to data files to supply the data that will be passed into templates.
    engine engine to be used for processing templates. Handlebars is the default.
    ext extension to be used for dest files.

    中央揃えは:---:

    [リンクのテキスト](http://exsample.com)

    link text

    URLそのままで下記のようにコンバートされる

    Autoconverted link https://github.com/nodeca/pica (enable linkify to see)

    Images

    ![代替テキスト](画像URL)で画像表示

    Minion

    画像にリンクを設定する

    [![代替テキスト](画像URL)](URL)で画像にリンクを設定

    画像表示部分を[ ]で囲い、(URL)をその後につける(ネストする) minion

    Plugins

    The killer feature of markdown-it is very effective support of syntax plugins.

    Footnotes

    (https://github.com/markdown-it/markdown-it-footnote)

    Footnote 1 link1.

    Footnote 2 link2.

    Inline footnote^[Text of inline footnote] definition.

    Duplicated footnote reference2.

    and multiple paragraphs.


    1. Footnote can have markup ↩︎

    2. Footnote text. ↩︎

    プログラミングの最新記事

    1. 一方向ハッシュ関数

    2. 暗号技術

    3. web3の流れに追いつこう

    4. WordPress開発環境

    5. 【Hugo】マークダウンファイルの中にHTMLコードを挿入する

    PAGE TOP