HugoのAcademicテーマにおけるMarkdown記法

目次

詳しくは以下を参照

1.見出し

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

2.強調

Italics with _underscores_.

Bold with **asterisks**.

Combined emphasis with **asterisks and _underscores_**.

Strikethrough with ~~two tildes~~.

Italics with underscores.

Bold with asterisks.

Combined emphasis with asterisks and underscores.

Strikethrough with two tildes.

3.文字の色を変える

MarkdownではHTMLやCSSの多くの記法が使える。

Red colored text
{style="color: red"}

Red colored text

4.引用符

> これは引用

これは引用

5. ハイライト引用

これは {{ < hl > }}ハイライト引用{{ < /hl > }}
{と<、>と}の間の空白は消す

これは ハイライト引用

6.折りたたみ

<details>
<summary>サンプル</summary>

(上に空行が必要)

サンプル
</details>
サンプル

(上に空行が必要)

サンプル

7.コードの挿入

7.1.コードスパン

文中ではバッククォート`またはチルダ~で囲む。

サンプル:`print("Hello world")`。

サンプル:print("Hello world")

7.2.コードブロック

バッククォートまたはチルダ3個で囲む。 言語ごとのシンタックスハイライトも指定できる。

```python
a = int(input())
print("Hello World")
```
a = int(input())
print("Hello World")

8.リスト

8.1.番号付きリスト

  1. 文頭に「数字.」を入れると番号付きリストになる
  2. 「数字.」の後には スペースが必要
1. サンプル1
1. サンプル2
  1. サンプル1
  2. サンプル2

8.2.順序なしリスト

  • 文頭に「*」「+」「-」のいずれかを入れると順序なしリストになる
  • 「*」「+」「-」の後には スペースが必要
- サンプル1
  - サンプル1.1
      -サンプル1.1.1
        - サンプル1.1.1.1
* サンプル2
  • サンプル1
    • サンプル1.1
      • サンプル1.1.1
        • サンプル1.1.1.1
  • サンプル2

8.3.説明リスト

HTMLの<dl>をそのまま使う。

<dl>
  <dt>Hugo</dt>
  <dd>静的サイトジェネレーター</dd>
  <dt>Academic</dt>
  <dd>テーマ</dd>
</dl>
Hugo
静的サイトジェネレーター
Academic
テーマ

9.チェックリスト

- [ ] タスク1
- [x] タスク2
  • タスク1
  • タスク2

10.リンク

[Education Labo](https://educationlab.netlify.app)

Education Labo

[ここ][link-1] と [この][link-1] リンクは同じ。
[link-1] という書き方もできる。

[link-1]: https://educationlab.netlify.app

こここの リンクは同じ。
link-1 という書き方もできる。

11.画像挿入

{{ < figure src="featured.png" id="hugo" > }}
{と<、>と}の間の空白は消す

[図1](#hugo)で相互参照

図1で相互参照 画像ギャラリーも追加できる(やり方は公式ドキュメントを参照)

12.ファイルへのリンク

コンテンツの本文でPDF などのファイルのリンクを作成するには、ファイルをstatic/uploads/フォルダーに配置し、次のサンプルコードを利用する。

Download また、Post名と同じ名前のPDFファイルをPostのマークダウンファイルと同じフォルダに置くことで、冒頭にダウンロードのボタンリンクを作れる。

13.目次

{{ < toc > }}を目次を挿入したい所に書く {と<、>と}の間の空白は消す

14.脚注

I have more [^1] to say.

[^1]: Footnote example.

I have more 1 to say.

15.Call-to-Action ボタン

{{ < cta cta_text="Do something" cta_link="/" cta_new_tab="false" > }}
{と<、>と}の間の空白は消す

16.インライン画像

Font AwesomeAcademiconsを利用できる。

{{ < icon name="terminal" pack="fas" > }} Terminal  
{{ < icon name="python" pack="fab" > }} Python  
{{ < icon name="r-project" pack="fab" > }} R
{と<、>と}の間の空白は消す

Terminal
Python
R

17.絵文字

絵文字チートシートから絵文字名をコピーして貼り付ける。
絵文字名とコロンの間に追加されたスペースは削除する

: smile :
: tada :

😄
🎉

18.コンテンツの埋め込み

18.1.Twitter

{{ < tweet 666616452582129664 > }}
{と<、>と}の間の空白は消す

18.2.YouTube

{{ < youtube w7Ft2ymGmfc > }}

{と<、>と}の間の空白は消す

18.3.その他

vimeoやローカルや外部のビデオファイルなども読み込める。

19.吹き出し

<div class="alert alert-note">
  <div>
    A Markdown callout is useful for displaying notices, hints, or definitions to your readers.
  </div>
</div>
A Markdown callout is useful for displaying notices, hints, or definitions to your readers.
<div class="alert alert-warning">
  <div>
    Here&rsquo;s some important information&hellip;
  </div>
</div>
Here’s some important information…

20.Mermaid

```mermaid
graph TD;
  A-->B;
  A-->C;
  B-->D;
  C-->D;
```
A
B
C
D

21.Tex

普通のTexの感覚で書ける

$a_n = n^2 + n$

an=n2+n


$$
\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}
$$

γn=|(xnxn1)T[F(xn)F(xn1)]|F(xn)F(xn1)2

22.テーブル

CSSでデザインを少し変更している。

| Left align | Right align | Center align |
|-----------:|:------------:|:------------|
| This       | This        | This         |
| column     | column      | column       |
| will       | will        | will         |
| be         | be          | be           |
| left       | right       | center       |
| aligned    | aligned     | aligned      |
Left alignRight alignCenter align
ThisThisThis
columncolumncolumn
willwillwill
bebebe
leftrightcenter
alignedalignedaligned

  1. Footnote example. ↩︎

とある大学生
とある大学生
塾講師

機械工学が専門の大学生です。

関連項目