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
JAMstack_kotohajime.pdf
Search
IMANISHI TOSHIFUMI
December 07, 2019
Technology
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JAMstack_kotohajime.pdf
IMANISHI TOSHIFUMI
December 07, 2019
More Decks by IMANISHI TOSHIFUMI
See All by IMANISHI TOSHIFUMI
Vue 3 超入門 ー ゆく Vue くる Vue
toshifumiimanishi
0
200
Form_design_from_Netflix.pdf
toshifumiimanishi
0
170
New_Sass_Module_System.pdf
toshifumiimanishi
2
910
mercurial_nyuumon.pdf
toshifumiimanishi
0
98
Web制作者のためのSassの参考書.pdf
toshifumiimanishi
3
2.9k
ゆく技術_くる技術.pdf
toshifumiimanishi
0
300
裏CSS.pdf
toshifumiimanishi
0
140
Other Decks in Technology
See All in Technology
形式手法を使って仕様をコーディングしよう
mikanichinose
0
180
IoTデバイスを繋げるプロトコルMatterをAndroidで使用する方法
harutiro
0
120
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
760
自律型 AI をセキュアに実装!Gemini と MIG で作る動的コード実行環境
recruitengineers
PRO
1
210
FinTech 1-2 : Overview of FinTech
ks91
PRO
0
150
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
0
270
ミイダス株式会社 テックチームのご紹介 / MIIDAS Tech Team
miidas
0
160
大阪オフィスに Unitree Go2 がやってきたので Physical AI やってみた
dafujii
0
320
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
480
[2026 Oracle Technical Deep Dive] AI時代のアプリケーションを支えるCloud NativeとJava EEモダナイゼーション (2026年9月17日開催)
oracle4engineer
PRO
0
120
The seven pitfalls of AI (revised version)
ufried
0
270
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
0
120
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
740
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
540
The untapped power of vector embeddings
frankvandijk
2
1.9k
Building the Perfect Custom Keyboard
takai
2
890
It's Worth the Effort
3n
188
29k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Building an army of robots
kneath
307
47k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
Between Models and Reality
mayunak
4
480
Being A Developer After 40
akosma
91
590k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Transcript
+".TUBDL͜ͱ͡Ί ΤϯδχΞަྲྀձʙ7VFͱ͔3FBDU৮͓͔ͬͯͳ͍ͱͶʙʛ%FD ࠓढ़จ גࣜձࣾΞϯςΟʔɾϑΝΫτϦʔ
ࠓढ़จ ͍·ʹ͠ ϑϩϯτΤϯυΤϯδχΞ !UPTIJNBSOJF UPTIJGVNJJNBOJTIJ ͱ͠;Έ
+BWB4DSJQU "1*T .BSLVQ +".TUBDLͱ ˠΫϥΠΞϯταΠυͷ+BWB4DSJQU ˠ࠶ར༻Մೳͳ"1* ˠ͋Β͔͡Ίߏங͞Εͨ.BSLVQ
IFBEMFTT$.4ͱ "1*
813&45"1* QVTI OVYUHFOFSBUF
813&45"1*Λऔಘ͢Δʹɺ ύʔϚϦϯΫΛઃఆ͠·͢ ߘ*%
const apiUrl = 'http://localhost:8000/wp-json/wp/v2'; export default { … axios: {
baseURL: apiUrl }, … } OVYUDPOpHKT
None
JOEFYWVF export default { data () { return { posts:
[] } }, … async asyncData({ $axios }) { const { data } = await $axios.get('/posts?_embed') return { posts: data } }, } BTZOD%BUB/VYUKTͰఏڙ͢Δಠࣗʹ֦ுͨ͠7VFKTͷίϯϙʔωϯτΦϓγϣϯ ඇಉظʹσʔλΛऔಘ͢ΔͨΊͷϝιουͰɺ7VFKTͷEBUBʹϚʔδ͞Ε·͢ OVYUDPOpHKTͰఆٛͨ͠CBTF63-͕ࢀর͞Ε·͢ @FNCFEύϥϝʔλɺΞΠΩϟονը૾ίϝϯτͳͲͷใΛऔಘͰ͖·͢
JOEFYWVF <template> … <article v-for="post in posts" :key=“post.id"> <n-link :to="{
path: '/posts/' + post.id }"> <h2>{{ post.title.rendered }}</h2> <div v-html="post.excerpt.rendered"></div> </n-link> </article> … </template> ݻఆϖʔδͷϦϯΫऔಘ ݻఆϖʔδͷλΠτϧऔಘ ݻఆϖʔδͷ༰ൈਮ
None
export default { … generate: { routes: async () =>
{ const { data } = await axios.get(`${apiUrl}/posts?_embed`) return data.map(post => { return { route: `/posts/${post.id}`, payload: post } }) } } … } OVYUDPOpHKT HFOFSBUFίϚϯυͰɺಈతͳϧʔςΟϯάແࢹ͞Ε·͢ɻ ಈతͳύϥϝʔλʔΛ༻͍ͨϧʔτΛੜ͍ͤͨ͞߹ɺಈతͳϧʔςΟϯάͷྻΛηοτ͢Δඞཁ͕͋Γ·͢ɻ QBZMPBEɺಈతϧʔςΟϯάੜͷߴԽͷͨΊͰ͢ɻ
@JEWVF <template> <div> <h2>{{ post.title.rendered }}</h2> <div v-html="post.content.rendered"></div> </div> </template>
… export default { data () { return { post: {} } }, async asyncData({ $axios, params, error, payload }) { if (payload) { return { post: payload } } else { const { data } = await $axios.get(`/posts/${params.id}?_embed`) return { post: data } } } }
None
QVTI HBUTCZCVJME
$ npm install --save gatsby-source-contentful $ npm install --save gatsby-transformer-remark
HBUTCZDPOpHKT require('dotenv').config({ path: `.env.${process.env.NODE_ENV}` }) module.exports = { … plugins:
[ … { resolve: `gatsby-source-contentful`, options: { spaceId: `${process.env.CONTENTFUL_SPACE_ID}`, accessToken: `${process.env.CONTENTFUL_ACCESS_TOKEN}`, } }, `gatsby-transformer-remark` … ], } (BUTCZ+4ͭͷڥΛαϙʔτ͠·͢ɻ w HBUTCZEFWFMPQΛ࣮ߦ͢Δͱʮ։ൃʯڥʹͳΓ·͢ɻ w HBUTCZCVJMEɺ·ͨɺHBUTCZTFSWFΛ࣮ߦ͢Δͱʮຊ൪ʯڥʹͳΓ·͢ɻ HBUTCZUSBOTGPSNFSSFNBSL(BUTCZ+4Ͱ.BSLEPXOϑΝΠϧΛѻ͏ͨΊͷ5SBOTGPSNFSϓϥάΠϯͰ͢ɻ
FOWEFWFMPQNFOU CONTENTFUL_SPACE_ID=xxxxxxxx CONTENTFUL_ACCESS_TOKEN=xxxxxxxx FOWQSPEVDUJPO CONTENTFUL_SPACE_ID=xxxxxxxx CONTENTFUL_ACCESS_TOKEN=xxxxxxxx
None
None
w pMUFSɿϩέʔϧӳޠ w TPSUɿهࣄ࡞࣌ͷ߱ॱ
TSDQBHFTJOEFYKT import React from "react" import { Link, graphql }
from "gatsby" const IndexPage = ({ data }) => ( <div> <ul> { data.allContentfulCourse.edges.map(edge => { return ( <li key={edge.node.slug}> <Link to={ edge.node.slug }><h3>{ edge.node.title }</h3></Link> <div>{ edge.node.description.childMarkdownRemark.excerpt }</div> </li> ) }) } </ul> </div> ) export default IndexPage export const pageQuery = graphql` …
None
HBUTCZOPEFKT const path = require(`path`) exports.createPages = async ({ graphql,
actions: { createPage } }) => { const sources = await graphql(` … `) if (sources.errors) return const posts = sources.data.allContentfulCourse.edges posts.forEach(({ node }) => { createPage({ path: `${node.slug}`, component: path.resolve(`src/templates/blog-post.js`), context: { slug: node.slug } }) }) } औಘ͍ͨ͠$POUFOU5ZQFΛࢦఆ͠·͢ɻ w QBUIϖʔδΛग़ྗ͢Δύεͷࢦఆ w DPNQPOFOUϖʔδΛੜ͢Δࡍʹ͏ςϯ ϓϨʔτͷύεΛࢦఆ w DPOUFYUQBHF2VFSZͷҾͱςϯϓϨʔτ ͷQSPQTʹ͢Λࢦఆ σʔλΛऔಘ͢ΔͨΊͷ(SBQI2-ΫΤϦ ϖʔδੜͷॲཧ
None
UFNQMBUFTCMPHQPTUKT import React from 'react' import { graphql } from
'gatsby' export const pageQuery = graphql` … ` export default (props) => { const { title, description } = props.data.contentfulCourse return ( <div> <h1>{ title }</h1> <div dangerouslySetInnerHTML={{ __html: description.childMarkdownRemark.html }} /> </div> ) } QBHF2VFSZϖʔδʹඞཁͳσʔλΛ(SBQI2-ͷRVFSZʹΑͬͯऔಘ͢ΔͨΊͷͷͰɺ औಘͨ͠σʔλΛίϯϙʔωϯτʹQSPQTͰͯ͠ϖʔδΛੜ͠·͢ɻ औಘ͍ͨ͠$POUFOU5ZQFΛࢦఆ͠·͢ɻ
None
None
None
w +".TUBDL8FC։ൃͷΞʔΩςΫνϟ w Έ߹Θͤࣗ༝ w ϑϩϯτΤϯυͷ৽ٕज़ʹ৮ΕΔ w -FU`T+".TUBDL ·ͱΊ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠