Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ブログを作るなら Nuxt Content v2はいいぞ
Search
Fulu
October 16, 2022
Technology
0
160
ブログを作るなら Nuxt Content v2はいいぞ
Vue Fes Japan 2022 のLT内容です
https://vuefes.jp/2022/sessions/FurusawaKaoru
Fulu
October 16, 2022
Tweet
Share
Other Decks in Technology
See All in Technology
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
130
OpenShiftでllm-dを動かそう!
jpishikawa
0
140
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
400
Tebiki Engineering Team Deck
tebiki
0
24k
Agent Skils
dip_tech
PRO
0
130
AWS Network Firewall Proxyを触ってみた
nagisa53
1
240
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
270
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
260
コンテナセキュリティの最新事情 ~ 2026年版 ~
kyohmizu
6
1.1k
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
330
Exadata Fleet Update
oracle4engineer
PRO
0
1.1k
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
Building Adaptive Systems
keathley
44
2.9k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
160
Discover your Explorer Soul
emna__ayadi
2
1.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
98
It's Worth the Effort
3n
188
29k
Paper Plane
katiecoart
PRO
0
46k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
340
Practical Orchestrator
shlominoach
191
11k
Statistics for Hackers
jakevdp
799
230k
Transcript
ブログを作るなら Nuxt Content v2はいいぞ Vue Fes Japan 2022
自己紹介 Furusawa Kaoru ユアマイスター株式会社 フロントエンドエンジニア Twitter: @firirice
ブログを作るって大変だと思いませんか?
例えば、〇〇ヘッドレスCMSを使うとして • API仕様を確認してからNuxtからAPIを呼ぶように実装する • APIの仕様変更や他のCMSへの移行を考慮しながらComposable 設計を行う
ファイルを置くだけで静的コンテンツが作れる contentディレクトリを作って、記事ファイルを置くだけで静的コンテンツを作れる。 (ファイルの対応形式は Markdown、YML、CSV、 JSON) # Hello ## Nuxt Contentはいいぞ
content/index.md <template> <main> <ContentDoc /> </main> </template> pages/index.vue
ファイルを置くだけで静的コンテンツが作れる contentディレクトリを作って、記事ファイルを置くだけで静的コンテンツを作れる。 対応している形式は Markdown、YML、CSV、 JSON。 # Hello ## Nuxt Contentはいいぞ
content/index.md
自動でパースされるものって装飾が大変じゃない?
Prose Componentsで各タグの装飾ができる Nuxt Content内部にあるComponentと同じ名前のComponentを配置することでオーバーライドして、各タグ の装飾ができる。 https://content.nuxtjs.org/api/components/prose#prose-components
使用例① <script setup lang="ts"> defineProps<{ id: string }>() </script> <template>
<h1 :id="id" class="mb-8 border-b pb-2 text-4xl font-bold"> <a :href="`#${id}`" class="group relative"> <slot /> <font-awesome-icon icon="link" class="absolute text-base opacity-0 group-hover:opacity-100" /> </a> </h1> </template> components/content/ProseH1.vue
使用例② <template> <div class="bg-gray-100 p-4 relative"> <slot /> <font-awesome-icon icon="copy"
class="absolute bottom-2 right-2 opacity-0 hover:opacity-100" @click="copy" /> </div> </template> components/content/ProseCode.vue
MDC(MarkDown Components) Syntax markdownから任意のVue Componentを使うことができる。 # Hello ## Nuxt Content
はいいぞ ::card The content of the card :: content/index.md <template> <div class="rounded border bg-white p-6"> <slot /> </div> </template> components/content/Card.vue
• markdownで書いた記事をディレクトリに置くだけで静的コンテンツを作れます • Prose Components: 各タグを簡単にカスタマイズできる • MDC Syntax: markdownからVue
Componentが使える • 他にも便利な機能がある ◦ nuxt.configに設定するだけでcodeのHigh Lightができる ◦ Mongo DBライクにデータを取得できるAPI Nuxt Contentはいいぞ
ご清聴ありがとうございました
Coming Soon
None