Content3
_quarto.yml テンプレート集
Quarto の _quarto.yml 設定テンプレート集
1 _quarto.yml テンプレート集
Quarto の設定ファイルをまとめています。
1.1 1. 基本的な構造
project:
type: website # website, book, blog, presentation, article
output-dir: docs # 出力ディレクトリ
website:
title: "サイトタイトル"
navbar:
background: dark
format:
html:
theme: spacelab
toc: true
code-fold: true1.2 2. プロジェクト種類
| type | 説明 |
|---|---|
website |
静的ウェブサイト(_site) |
book |
書籍(_book) |
blog |
ブログ |
presentation |
スライドショー |
article |
論文/記事 |
1.3 3. HTML出力
format:
html:
toc: true
toc-depth: 3
code-fold: true
code-link: true
highlight-style: github
theme: [cosmo, bootstrap]
mathjax: auto
lang: ja
navbar:
background: primary
left:
- href: index.qmd
text: Home1.4 4. PDF出力
format:
pdf:
documentclass: article
classoption: [draft, oneside]
geometry:
- margin=1in
- top=1.5in
mainfont: "Noto Serif CJK JP"
sansfont: "Noto Sans CJK JP"
monofont: "Source Han Code JP"
fontsize: 11pt
number-sections: true1.5 5. 複数形式同時出力
format:
html:
toc: true
pdf:
documentclass: report
docx:
reference-doc: template.docx1.6 6. Word出力
format:
docx:
reference-doc: my-template.docx
toc: true
toc-depth: 21.7 7. Reveal.js スライド
project:
type: presentation
format:
revealjs:
theme: simple
transition: slide
slide-number: c/t
code-fold: true
embed-resources: true1.8 8. ウェブサイト設定
project:
type: website
output-dir: docs
website:
title: "私のウェブサイト"
description: "サイトの説明"
navbar:
background: dark
search: true
left:
- href: index.qmd
text: Home
- href: about.qmd
text: About
right:
- icon: github
href: https://github.com/username
footer: "© 2026 名前"
open-graph: true1.9 9. ブログ設定
project:
type: website
website:
title: "マイブログ"
navbar:
background: dark
blog:
post-date-format: "yyyy年MM月dd日"
format:
html:
theme: [cosmo, darkly]1.10 10. 書籍プロジェクト
project:
type: book
book:
title: "私の本"
author: "名前"
chapters:
- index.qmd
- 01-intro.qmd
- 02-method.qmd
- conclusion.qmd
toc: true
downloads: [pdf, epub]1.11 11. デフォルト設定
defaults:
format:
html:
theme: flatly
toc: true
code-fold: true
execute:
echo: true
warning: false1.12 12. 変数を使う
# _quarto.yml
vars:
author: "名前"
email: "mail@example.com"---
# .qmd 内
著者: ?var:author
メール: ?var:email
1.13 13. リソース指定
project:
type: website
resources:
- "images/*"
- "data/*.csv"
- "style.css"1.14 14. フィルター
filters:
- adjustbox
- "quarto-diagrams" # Mermaid1.15 15. 学術論文(PDF + HTML)
title: "論文タイトル"
author:
- name: 名前
affiliation: 大学
date: today
bibliography: references.bib
project:
type: article
format:
html:
toc: true
number-sections: true
pdf:
documentclass: article
geometry: margin=1in
number-sections: true1.16 Tips
| ポイント | メモ |
|---|---|
ファイル名は _quarto.yml |
アンダースコア始まり |
| インデントはスペース2つ | YAML惯例 |
コメントは # |
|
| ローカル上書き | _quarto.local.yml |
このテンプレート集は README.md を参考に作成しています