ç¥ã£ã¦ã¾ããï¼Netlifyã«ã¯ãããªæ©è½ããããã ãï¼
ãã®è¨äºã¯JAMstack Advent Calendar 2018ã®ï¼æ¥ç®ã®è¨äºã§ãï¼
JAMstacké¢é£ã®è¨äºãã¿ããªãã¯ã¤ã¯ã¤å¥½ãæ¾é¡ã«æ¸ãã¦ããæãã§ããï¼ã£ã¦ãã¨ã§ç§ãJAMStackã®æå±è ã§ããMatt Biilmannãããåµæ¥ã»éå¶ãã¦ããNetlifyã«ã¤ãã¦æ¸ãã¦ãããã¨æãã¾ãã
JAMstackã¯ãã¯ã©ã¤ã¢ã³ããµã¤ãJavaScriptãåå©ç¨å¯è½ãªAPIãäºããã«ãããããã¼ã¯ã¢ããã®ï¼ã¤ã§æ§æãããWebéçºã¢ã¼ããã¯ãã£ãã®ãã¨ã§ããã
Netlifyã£ã¦ã©ããªãµã¼ãã¹
ãããªJAMstackãå®ç¾ããéã«ãã«ããããéçãµã¤ãã®ãã¹ãã£ã³ã°ãé常ã«ç°¡åã«ã§ãããµã¼ãã¹ããããNetlifyã§ãã
Netlifyã§ã¯GitHubãªã©ã§ç®¡çãã¦ãããªãã¸ããªããèªåçã«ãããã¤ãè¡ããä»ã«ããã©ã¼ã ãCIæ©è½ãªã©éçãµã¤ããéç¨ããä¸ã§ä¾¿å©ãªæ©è½ãè±å¯ã«æã£ã¦ãã¾ãã
ã©ããªæ©è½ãããã®ï¼
2018å¹´11ææç¹ã§Netlifyã«ã¯æ¬¡ã®æ©è½ãåãã£ã¦ãã¾ãã
- éçãµã¤ããã¹ãã£ã³ã°
- ãã«ãæ©è½
- ç¬èªãã¡ã¤ã³è¨å®
- CMSæ©è½
- ãã©ã¼ã è¨ç½®
- Functions
- A/Bãã¹ã
- Prerendering
- ãã¼ã æ©è½
Netlifyã¯ãã®ãããã¹ãã¼ãã§æ°ããæ©è½ãéçºãã¦ããã®ã§ãä»å¾ããµã¤ãéç¨ããä¸ã§ä¾¿å©ãªæ©è½ãå ãã£ã¦ãããã¨ã§ãããã
ãã®ä¸ã§ããNetlifyã¯ãã¹ãã£ã³ã°ã ãããç¡ãï¼ãã£ã¦æ©è½ã«ã¤ãã¦è§¦ãã¦ããã¾ãã
CMSæ©è½
NetlifyCMSã¯æåã©ãããNetlifyãç¨ãã¦CMSï¼Content Management Systemï¼ãæ§ç¯ããããã®ã©ã¤ãã©ãªç¾¤ã§ãã
管çç»é¢ããã³ã³ãã³ããå ¥ç¨¿ããã ãããã°ããã¥ã¼ã¹ãµã¤ãã®ãããªãµã¤ããæ軽ã«æ§ç¯ãããã¨ãã§ãããã§ãï¼ï¼ï¼
ãã¡ããã使ããµã¼ãã¹ã¯Netlifyã ãã§ãå¥ã®ã¬ã³ã¿ã«ãµã¼ãã¼ãåããããé¢åãªã»ããã¢ããä½æ¥ãè¡ãå¿ è¦ãããã¾ããã
NetlifyCMSã«ã¯ãã¼ã¿ãã¼ã¹ã¯ããã¾ãããã代ããã«GitHubã¬ãã¸ããªä¸ã«å½åè¦åãã¤ãã¦ã³ãããããããã¡ã¤ã«ã使ã£ã¦ãè¨äºãã¼ã¿ã®ç®¡çããã¦ããã¾ãã
ãã®ãããNetlifyã¯ã¬ãã¸ããªã«æ°ããã³ãããããã£ãã¿ã¤ãã³ã°ã§ãã«ããè¡ããéçãµã¤ããçæãããã¨ã§ãåæ§ã®æ©è½ãå®ç¾ãã¦ããããã§ãããããJAMstackãªãµã¤ãæ§æã«ãªãã®ã§ããµã¼ãã¼ã®è² è·ãªã©ãããããã©ã¯ã©ã¯éç¨ãå¯è½ã§ãã
ãã©ã¼ã æ©è½
ã³ã¼ãã¬ã¼ããµã¤ããååã»ãµã¼ãã¹ã®ç´¹ä»LPãªã©ããµã¤ãã®ã»ã¨ãã©ã¯éçã³ã³ãã³ããªãã ãã©ãã©ããã¦ãåãåãããã©ã¼ã ã ãã¯å¿ è¦ï¼ãã¨ããçç±ã§ãµã¼ãã¼ãµã¤ãã®ããç°å¢ãå¿ è¦ã¨ãã¦ãã人ã¯å¤ãã¨æãã¾ãã
ãããNetlifyã使ãã°ãã®åé¡ã解決å¯è½ã§ãããµã¼ãã¼ãµã¤ãã®ã³ã¼ããä¸åæ¸ããã¨ãªããNetlifyããã©ã¼ã ã®ãµã¼ãã¼å´ã®æ©è½ã代æ¿ãã¦ããããããéçãµã¤ããªã®ã«ãã©ã¼ã æ©è½ãå®ç¾ãããã¨ãã§ããã®ã§ããããããNetlifyã
Netlify Functions
ãã®Functionsæ©è½ã¯ãç°¡åã«ããã¨AWS Lambda Functionsãã©ãããã¦Netlifyä¸ã§ããã¹ãåã£ã¦ä½¿ããããã«ããæ©è½ã§ãããããAWSã®ãããªãã¡ãã¤ãã管çç»é¢ã使ããã»ãããã¯ã¬ã¸ããã«ã¼ããç»é²ããã«ããã«ä½¿ãå§ãããã¨ãåºæ¥ã¾ãã
éçãµã¤ãä¸ã§ã¯é è½ãããå 容ãªã©ãfunctionsãè£å©çã«ä½¿ããã ãã§ãéçãµã¤ãã§åºæ¥ãªãã£ããã¨ãå¤ã ã§ããããã«ãªãã¨æãã¾ãã
A/Bãã¹ã
ããã°ãECãµã¤ããéç¨ãã¦ããã¨ãããã¼ã®ç½®ãæããå¿åãã¿ã³ã®ä½ç½®ãç½®ãæãã¦ãã¦ã¼ã¶ã¼ã®æµå ¥ãã©ããããå¤ããã®ãã測å®ãããããªA/Bãã¹ããå®æ½ãããã¨ãããããããã¾ããã
Netlifyãæä¾ãã¦ããSplit Testingã¨ããæ©è½ãç¨ãããã¨ã§ãGitHubã®ãã©ã³ãããã¼ã¹ã«ããA/Bãã¹ããå°å ¥ãããã¨ãã§ãã¾ããè¶ ç°¡åã
ãã©ã³ããã¨ã«ãã¹ããããã³ã³ãã³ããå¤ãã¦ãããè¨æ¸¬ã¯GAã§ãªãã·ã§ã³ã®å 容ãå¤ãã¦å¥éè¨æ¸¬ããå½¢ã§éè¨ãã¾ãã
Prerendering
SEO対çã¨ããããããTwitterãFacebookã§ã®OGPã®è¡¨ç¤ºãåãæ¿ããããªãã£ã¦æããã¾ãããã
éçãµã¤ãã§åä½ãã¦ããã·ã³ã°ã«ãã¼ã¸ã¢ããªã±ã¼ã·ã§ã³ã§ã¯ãmetaæ å ±ã®æ´æ°ãJavaScriptä¸ã§ã®ã¿ããè¡ããªããããï¼ã¤ã®ãµã¤ãã§ï¼ã¤ã®OGã¿ã°ãã表示ãããã¨ãã§ãã¾ããã
Netlifyã§ã¯ãã®èª²é¡ã解決ãã¦ããããPrerenderingã¨ããæ©è½ãæä¾ãã¦ãã¾ãããããæå¹ã«ãããã¨ã§ãJavaScriptã§è¨å®ããmetaã¿ã°ãOpen Graphã®è¨å®ããTwitterãFacebookãªã©ã®SNSã§è¡¨ç¤ºãããããã«ãªãã¾ãã
ããã¯JavaScriptã§æç»ããå 容ãNetlifyããã£ãã·ã¥ãã¦ããã¦ããã¦ãååæç»æã«ãã®ãã£ãã·ã¥ãè¿ãã¦ãããããmetaãªã©ã®åãæ¿ãã«ã対å¿ãã¦ãã¾ããããããï¼ä¸èº«ã¯prerender.ioï¼
ã¾ã¨ã
Netlifyæå¤ã¨è²ã 便å©ãªæ©è½ããããªãã£ã¦ãã¨ãä¼ããã¾ããã§ããããã
宣ä¼ã«ãªãã¾ããããã®è¾ºãã®å ·ä½çãªå©ç¨æ¹æ³ãªã©ãã¾ã¨ããæ¬ãæ¸ãã¦ã¾ãã®ã§ããããã®è¨äºã§èå³ãããã¾ããããã²ãä¸èªãã¦ããã ãã¦Netlifyã使ãããªãã¦ã¿ã¦ãã ããï¼