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
Gatsby.jsで.md/.adocが混在できるテンプレートを作ったときの苦しみ / Pai...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
moomoo-ya
August 26, 2020
Programming
720
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Gatsby.jsで.md/.adocが混在できるテンプレートを作ったときの苦しみ / Pain-to-create-gatsby-template-that-supports-markdown-and-asciidoc
2020.08.26
フロントエンドLT会 vol.1 - 2020夏祭り
「Gatsby.jsで.md/.adocが混在できるテンプレートを作ったときの苦しみ」
moomoo-ya
August 26, 2020
More Decks by moomoo-ya
See All by moomoo-ya
サービスを陳腐化させない組織だった技術刷新 / Technology Renewal Initiatives
moomooya
0
1.7k
はじめてのオンラインイベント配信 with COVID-19 バグ修正版 / Online-Event-bugfixed
moomooya
0
170
一番安い子だーれだ?~黒字化のための無慈悲なタスク配分~ / Distribute tasks
moomooya
1
3.6k
はじめてのオンラインイベント配信 with COVID-19 バグあり版 / Online-Event-includes-bug
moomooya
0
910
やはり俺のLT登壇はまちがっている。 / my-lightning-talk-is-wrong-as-i-expected
moomooya
4
2.7k
LADRのすすめ&先行技術検証PRJの紹介 / Introducing-LADR-and-Technology-verification
moomooya
5
3k
技術書へのアクセスを劇的に向上させた話 / oreilly-safari-and-acm-membership
moomooya
2
8k
モノリスにおけるビジネスロジックの設計 ~アグリゲートパターン~ / aggregate-pattern-for-domain-modeling-on-monolithic
moomooya
2
1.8k
オブジェクト指向を学んでから20年間でモヤったこと / Object-Oriented-groomy-in-20-years
moomooya
0
610
Other Decks in Programming
See All in Programming
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
270
AWSに止められる覚悟してますか?
morizo_1984
2
510
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
340
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
360
すこし踏み込む CancellationToken
htkym
2
1.6k
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
320
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.5k
Are APIs Still Relevant in the AI Era?
soyuka
0
420
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
730
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
190
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
440
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
Featured
See All Featured
Accessibility Awareness
sabderemane
1
230
From π to Pie charts
rasagy
1
390
BBQ
matthewcrist
89
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
KATA
mclloyd
PRO
35
16k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
570
We Have a Design System, Now What?
morganepeng
55
8.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Odyssey Design
rkendrick25
PRO
2
860
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
320
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
260
Transcript
#frontendlt Gatsby.jsで.md/.adocが 混在できるテンプレートを 作ったときの苦しみ 2020.08.26 フロントエンドLT会 vol.1 -2020夏祭り Isamu Suzuki,
Rakus
#frontendlt • 株式会社ラクス ◦ ガンプラ部 部長 ◦ 先行技術検証 ◦ アーキテクチャ選定
◦ 技術イベント司会 • 先月引っ越し ◦ 作業部屋兼サーバールーム確保! ◦ 先週やっとNuro光開通 • 自転車買いました • Fat Project作者 • ポケモンはじめました ◦ 緑→ソード 鈴木 勇 / Isamu Suzuki
#frontendlt 今日のお題 Gatsby.jsのテーマを作った話
#frontendlt Gatsby.js? • React.jsベースのWebページ/SPA作成用フレームワーク ◦ いわゆるSSG : Static Site Generator
▪ Markdownでコンテンツを作成 ▪ React.jsでテンプレートを作成 • ブログエンジンとしても ◦ 今回は技術ブログを作り直そうと思った
#frontendlt SSGでブログを構築する仕組み Netlify GraphQL transformer plugin remark Gatsby.js template 頑張って記事を書く
#frontendlt Asciidoc 使いたい!!
#frontendlt • かんたんに書けるけど表現力がない ◦ 注釈とか(文中に)カンタンに入れたい ◦ 定義リスト使いたい ◦ 吹き出し付きブロック要素使いたい Markdownの不満点
#frontendlt すべて出来ます Asciidocならね
#frontendlt Asciidoc • 軽量マークアップ言語という意味だとMarkdownと同じカテゴリ • 電子書籍を構造化対象に含む構造化言語 • オライリーからもAsciidocで組版された書籍が出版されている つまり 「技術書が書ける」
#frontendlt SSGでブログを構築する仕組み Netlify GraphQL transformer plugin remark Gatsby.js template 頑張って記事を書く
ここの……
#frontendlt これを こうする transformerプラグインの追加でいけそう
#frontendlt Asciidoc用のtransformer自体はある transformerの追加はnpm installして、設定ファイルへの追記で OK
#frontendlt 世界に平和が訪れた
#frontendlt . . .
#frontendlt わけはなく
#frontendlt マルチtransformerは考慮されていない? • 多分Gatsby.jsの設計思想 • 複数のtransformerで取り込んだデータは別グラフ Markdownの記事群 Asciidocの記事群
#frontendlt 何が困る? • グラフが別なので「記事群から取得」ができない ◦ 「mdの記事群」「adocの記事群」に分かれる ◦ 「全ファイル群(条件:ブログ記事)から取得」となる • 記事のデータ構造がtransformer間で統一されていない
◦ 変換して共通形式に ▪ asciidocのエイリアス機能を駆使してるけど…… • 「最新10件取得」が困難 ◦ 共通形式にした後マージしてソートして……
#frontendlt つらい
#frontendlt どうするのが正解だったのか • (おそらく)1概念=1 transfer にするべき • MarkdownとAsciidocを混在させるためには両対応のtransformerを つくるべきなのではないか 誰かいい方法知ってたら教えて下さい……m(_
_)m
#frontendlt 苦労の跡 https://github.com/moomoo-ya/gatsby-starter-ts-asciidoc
#frontendlt 宣伝
#frontendlt 次回の司会担当イベントは9/9(水)
#frontendlt Thank ☺ you • Asciidocで技術書が書ける • Gatsby.jsでMarkdown/Asciidocの混在はつらい? • 「ブログ記事」の統一構造が定義されてほしい
#frontendlt Thank ☺ you • Asciidocで技術書が書ける • Gatsby.jsでMarkdown/Asciidocの混在はつらい? • 「ブログ記事」の統一構造が定義されてほしい
• Asciidocで技術書が書ける • Gatsby.jsでMarkdown/Asciidocの混在はつらい? • 「ブログ記事」の統一構造が定義されてほしい • Asciidocもっと流行れ