Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ブログを作るなら Nuxt Content v2はいいぞ
Search
furusawa
October 16, 2022
Technology
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ブログを作るなら Nuxt Content v2はいいぞ
Vue Fes Japan 2022 のLT内容です
https://vuefes.jp/2022/sessions/FurusawaKaoru
furusawa
October 16, 2022
Other Decks in Technology
See All in Technology
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
280
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
290
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
340
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
270
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
140
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
790
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
5
1.1k
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.8k
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
180
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
730
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
180
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
460
Unsuck your backbone
ammeep
672
58k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
The World Runs on Bad Software
bkeepers
PRO
72
12k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Navigating Weather and Climate Data
rabernat
0
560
Side Projects
sachag
456
43k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
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