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
GitHubをCMSとして使う話/ using_github_as_CMS
Search
Masahiko Sakakibara
June 14, 2023
Programming
730
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GitHubをCMSとして使う話/ using_github_as_CMS
Masahiko Sakakibara
June 14, 2023
More Decks by Masahiko Sakakibara
See All by Masahiko Sakakibara
決済端末ビジネスを、決済会社だけのものにしない/stripe_terminal_business
rdlabo
0
61
JavaScriptで始める店舗インフラ決済構築/stripe_terminal_workshop
rdlabo
0
61
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
720
本当に欲しかったのはモノレポツールではなく、tsconfigの設定だった / monorepo-tsconfig
rdlabo
1
420
Reactフレームワークプロダクトを モバイルアプリにして、もっと便利に。 ユーザに価値を届けよう。/React Framework with Capacitor
rdlabo
0
600
プライベートプロダクト戦略 - フロントエンドカンファレンス沖縄 / private_product_frontend
rdlabo
3
4.9k
JavaScriptから デバイスの力を100%引き出すための Web APIとCapacitor入門 / power_from_javascript
rdlabo
0
650
Capacitor4_release
rdlabo
0
740
Web技術で稼ぐため選択肢を俯瞰しよう/options_to_earn_web_technology
rdlabo
0
170
Other Decks in Programming
See All in Programming
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
190
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
200
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
190
contenteditable と日本語入力に向き合う
colorful12
0
210
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
1
180
オーケストレーション記述言語 Katari
yukikurage
0
180
R8 の設定見直しでアプリサイズ削減
andpad
0
220
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.2k
JIS keyboard support in Omarchy
lef237
0
150
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
450
Next.js: The final boss of Web Performance
guaca
0
320
GraphQL の onError と Nullability のこれから
quramy
0
170
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
810
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
A Tale of Four Properties
chriscoyier
163
24k
WCS-LA-2024
lcolladotor
0
900
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Transcript
ɾແݶΧελϜϑΟʔϧυ ʙಈత$.4ΛΊͯɺ(JU)VCΛ$.4ͱͯ͠͏
ࣗݾհ ࡗݪণ Ұൠࣾஂ๏ਓϦϨʔγϣϯσβΠϯ ݚڀॴදཧࣄ Ұൠࣾஂ๏ਓΤϦΞɾ ΠϊϕʔγϣϯɾΞϥΠΞϯε$50 *POJD+BQBO6TFS(SPVQ
ද *POJD%FWFMPQFS&YQFSU 4USJQF$PNNVOJUZ&YQFSU
UJQTZT
৯දࣔҹ εϚϗͱϓϦϯλ͚ͩͰ৯දࣔϥ ϕϧΛͭ͘ΕΔຊॳͷઐ༻ΞϓϦ
XJOFDPEF ଟछྨଟྔͷϫΠϯΛෳڌͰཧͰ ͖Δຊ།ҰͷΞϓϦɻ
$.4ߏங᠘͕͍ͬͺ͍
ιϑτΣΞͷϝϯςφϯε IUUQTFOEP fl JGFEBUF
ϓϥάΠϯͷ࠾༻
ߏ͕͍͠ͷΛߋ৽Մೳʹʁ
όοΫΞοϓͷϝϯςφϯε %#ਧ͖ඈͼ·ͨ͠ɻ ࠷ऴόοΫΞοϓͬͯࡢͰ͢ΑͶʁʂ ઌ݄͔ΒόοΫΞοϓͱΕͯ·ͤΜͰͨ͠ɻ σΟεΫ༰ྔ͕͍ͬͺ͍ͩͬͨΑ͏Ͱ͢ɻ Ͳ͏ͨ͠Β͍͍ΜͰ͔͢ʁʂʁʂ Ͳ͏ʹͳΓ·ͤΜɾɾɾɻ
ΞΫηεूதͨ࣌͠ͷରԠ 8FCαΠτ͕ݟΕͳ͍Μ͚ͩͲͲ͏ͯ͠ʁ ͔ͤͬ͘ςϨϏʹऔΓ্͛ΒΕͨͷʹɻ ΞΫηε͕ूதͯ͠αʔό͕མ͔ͪͨΒͰ͢Ͷɻ མͪண͘·Ͱ͔ͭ͠Ͱ͖ͳ͍Ͱ͢ɻ Ͳ͏ͨ͠Β͍͍ΜͰ͔͢ʁʂʁʂ ͕ͬͭΓαʔόʹ͓͍ۚΕͯ࠶ൃࢭΛʂ
Ϣʔβ͕ϨΠΞτΛյ͢ Ͳ͜Λߋ৽ͨ͠Β͍͍ʁ "ͱ#ͷϑΟʔϧυΛߋ৽͍ͯͩ͘͠͞ɻ $ͷϑΟʔϧυΛߋ৽ͨ͠Β͜ΘΕͨʂ $ͷϑΟʔϧυΛߋ৽͔ͨ͠ΒͰ͢ɻ
ϗεςΟϯάྉۚ ֹ݄ Φʔτεέʔϧ 1)1.Z42- /FUMJGZ 0ԁʙ ͋Γ ෆՄ 'JSFCBTF )PTUJOH
0ԁʙ ͋Γ ෆՄ 4ࣾ 425ԁʙ ͳ͠ Մ "ࣾ 20999.70ԁʙ ͳ͠ Մ
Ϣʔβ͕ߋ৽͢ΔࣗࣾαΠτͰɺ$.4ߏஙɻ ͦΕɺඞཁͰ͔͢ʁ
ཧͯ͠ߟ͑Α͏ ͳͥ$.4ߏங͕ඞཁʁ ̍ɽ)5.-Λॻ͚ͳ͍Ϣʔβ͕ߋ৽Ͱ͖ΔΑ͏ʹ͢ΔͨΊ ̎ɽಉҰςϯϓϨʔτͰྔ࢈ͨ͠هࣄΛཧ͢ΔͨΊ ɹɹʢྫɿχϡʔεαΠτʣ ̏ɽ&$αΠτߏஙͳͲෳࡶͳखॱ͕ඞཁͳͷΛखܰʹߏங͢ΔͨΊ
͜Ε(JU)VCͰղܾͰ͖Δʂ
̍ɽ)5.-Λॻ͚ͳ͍Ϣʔβ͕ߋ৽Ͱ͖ΔΑ͏ʹ͢ΔͨΊ ؆୯ͳϖϥΠνͩͬͨΒɺ͜ͷϨϕϧͰ͍͚Δɻ
ϑϨϯνͷΦʔφʔγΣϑ ʮ͜ΕݟͨΒߋ৽Ͱ͖ͨΑʯ
·ͪͮ͘Γձࣾͷελοϑ ʮΩʔࣗମΛؒҧͬͯআͨ͠Βɺࣦഊͨͬͯ͠ϝʔϧ͖ͨʯ
·ͪͮ͘Γձࣾͷελοϑ ॻ͖͙͑Β͍Ͱ͖ΔΑɻ
࣮ྫ̍ɿࣗ࡞ςϯϓϨʔτ <ul class="list-news"></ul> export interface IItem { selector: string; template:
string; data: Array<{ title?: string; ja?: string; price?: string; body?: string; image?: string }>; } export const news: IItem = { selector: '<ul class="list-news"></ul>', template: '<li><label class="form-label">{{ title }}</label><p>{{ body }}</ p></li>', data: [ { title: 'ίϩφײછ༧ରࡦ', body: 'ίϩφײછ༧ରࡦͱͯ͠ɺۭؾͷೖΕସ͑ɺִؒʹ༨༟ͷ͋Δ੮ͷ͝ҊɺΞΫϦ ϧ൘ɺ٬ελοϑͷϚεΫண༻ͳͲͷରԠΛ͓ͯ͠٬༷Λ͓ܴ͍͑ͨ͠·͢ɻ<br>ళɺ৽ܕίϩ φΠϧεରࡦೝূళͰ͢ɻ<br>2࣌ؒఔͰͷ͓৯ࣄΛ͓ئ͍͍ͨ͠·͢ɻ', }, ], }; )5.- 5ZQF4DSJQU
࣮ྫ̍ɿ͜Μͳ/PEFΛ࣮ߦͯ͠#VJME const targets = ['index.html']; const items: IItem[] = [news,
redWine, whiteWine, champagneWine, announcement]; const build = () => { execSync(`rm -r -f ${process.cwd() + '/www'}`); mkdirSync(process.cwd() + '/www'); execSync(`cp -r ${process.cwd() + '/src/template'}/* ${process.cwd() + '/www'}`); for (const templateFile of targets) { let template = readFileSync(process.cwd() + '/www/' + templateFile).toString('utf-8'); for (const item of items) { const insertData: string[] = []; for (const line of item.data) { let template = item.template; for (const [key, value] of Object.entries(line)) { const re_url = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/ gi; const replaceText = (value as string).replace(re_url, '<a href="$1" target="_blank" rel="noreferrer">$1</a>'); template = template.replace(new RegExp(`{{ ${key} }}`, 'g'), replaceText as string); } insertData.push(template); } const changeSelector = item.selector.replace(/></g, `>${insertData.join('')}<`); template = template.replace(item.selector, changeSelector); } writeFileSync(process.cwd() + '/www/' + templateFile, template); } }; build(); createWineSearchIndex(); apiBuild(); 5ZQF4DSJQU
࣮ྫ̎ɿ+BWB4DSJQUϑϨʔϜϫʔΫ <h4> <img src="assets/svg/list.svg" class="svg" decoding="async" /> ͓Βͤ </h4> <ul
class="list-news"> {news.map(d => <li><label class="form-label" innerHTML={d.title}></label><p innerHTML={d.body}></p> </li>)} </ul> +49 ͜Ε͚ͩͰॻ͚ͪΌ͏ɻ؆୯ʂ
ಉҰςϯϓϨʔτͰྔ࢈ͨ͠هࣄΛཧ͢ΔͨΊ ϔουϨε$.4Λͬͯಈతʹσʔλऔಘ͠Α͏ 8PSE1SFTTDPN NJDSP$.4 LJOUPOF
ಉҰςϯϓϨʔτͰྔ࢈ͨ͠هࣄΛཧ͢ΔͨΊ { path: ':id', component: ArticlePage, }, this.route.paramMap.subscribe(as ync (params:
ParamMap) => { this.articleId = parseInt(params.get('id'), 10); const {article} = await this.articleService.getCategory( this.articleId ); this.article = article; }); <article> <h3 [innerHTML]="item.title"></ h3> <p class="attribute"> <ion-note>{{ item.date | date: "yyyyMM݄dd" }}</ion-note> <ion-note *ngIf="item.count"> / {{ item.count }}Point</ion-note> </p> <p class="excerpt" [innerHTML]="item. excerpt"></p> </article>
44(443QSFSFOEFSJPΛͬͯϨϯμϦϯάͰ͖Δ ༰ $43 ϢʔβڥͰHTMLΛϨϯμϦϯά 44( αʔόϗεςΟϯάલʹHTMLΛϨϯμϦϯά 443 ϦΫΤετ࣌ʹHTMLΛϨϯμϦϯά QSFSFOEFSJP ಛఆIP͔ΒͷϦΫΤετ͚࣌ͩɺαʔό͕ϨϯμϦ
ϯάࡁΈHTMLΛฦ٫
ٕज़ͷ՝ٕज़Ͱղܾ͠Α͏ ಈతݴޠ͕ΔαʔόͷόοΫΞοϓαʔόෛՙͷίϯτ ϩʔϧϢʔβ͕յͨ͠ΒͲ͏͠Α͏FUD ͪΖΜϦεΫϚωʔδϝϯτ͠ͳ͕Β$.4ߏங͋ΓͰ͕͢ɺ ੩తαΠτԽ͢Δ͜ͱͰ͜ΕΒͷΛΓӽ͑ΕΔՄೳੑ͕͋Δ ͷͰҰߟ͑ͯΈ·ͤΜ͔ɻ