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
680
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
59
JavaScriptで始める店舗インフラ決済構築/stripe_terminal_workshop
rdlabo
0
50
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
700
本当に欲しかったのはモノレポツールではなく、tsconfigの設定だった / monorepo-tsconfig
rdlabo
1
390
Reactフレームワークプロダクトを モバイルアプリにして、もっと便利に。 ユーザに価値を届けよう。/React Framework with Capacitor
rdlabo
0
570
プライベートプロダクト戦略 - フロントエンドカンファレンス沖縄 / private_product_frontend
rdlabo
3
4.9k
JavaScriptから デバイスの力を100%引き出すための Web APIとCapacitor入門 / power_from_javascript
rdlabo
0
640
Capacitor4_release
rdlabo
0
730
Web技術で稼ぐため選択肢を俯瞰しよう/options_to_earn_web_technology
rdlabo
0
170
Other Decks in Programming
See All in Programming
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
390
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
320
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
400
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
110
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.2k
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.3k
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
230
Go のフラットな パッケージに 「ファイル単位の private」を 〜Linter “declscope” を作った話〜
mpyw
0
320
Webの地図
yosuke_furukawa
PRO
6
4.5k
「新人AI禁止のその先へ ― 参加と協働のステップアップ」Vibe TOKYO, AI & CRAFT / 2026年8月21日
kentarowada
0
100
SREの越境 / SRE Collaboration
y0hgi
0
120
Security issues being discussed on Web Platforms
petamoriken
0
940
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
520
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
520
The Curious Case for Waylosing
cassininazir
1
510
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
Ruling the World: When Life Gets Gamed
codingconduct
0
330
The Limits of Empathy - UXLibs8
cassininazir
1
670
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
For a Future-Friendly Web
brad_frost
183
10k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
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ߏங͋ΓͰ͕͢ɺ ੩తαΠτԽ͢Δ͜ͱͰ͜ΕΒͷΛΓӽ͑ΕΔՄೳੑ͕͋Δ ͷͰҰߟ͑ͯΈ·ͤΜ͔ɻ