GitHub PagesïŒgithub.ioïŒ
ãªããžããªãžã³ãããã Web å ¬éã§ãã GitHub PagesïŒã®ãããã ããŒãžïŒã«ã€ããŠãŸãšããŠããŸãã
GitHub ãªããžããªã«ãã¡ã€ã«ãå ¥ãããã®ãŸãŸ Web ãµã€ããšããŠå ¬éã§ããŸãã
 GitHub Pages now uses Actions by default | GitHub Blog
2022幎8æãã GitHub Pages ã¯
GitHub Actions ãçšããŠãããã€ããæ¹æ³ãããã©ã«ãã«ãªããŸããã
åŸæ¥ã® Jekyll ãŸãã¯éçãã¡ã€ã«ïŒ.html ãªã©ïŒãçšããæ¹æ³ã䜿çšã§ããŸããã
Jekyllã»éçãã¡ã€ã«ãå
¬éãã GitHub Actions ããã§ã«ååšããŠããããã
å®å
šã« GitHub Actions ãçšããæ¹æ³ãžåãæ¿ããå¯èœæ§ãããããã§ãã
ç®æ¬¡
å ¬åŒãµã€ã
-  GitHub Pages - å ¬åŒãµã€ã
-  GitHub Pages ã«ã€ã㊠| GitHub ãã«ã
䜿çšå¶éã»çŠæ¢çšé
 䜿çšå¶é | GitHub ãã«ã
GitHub Pages ã¯æ¬¡ã®å¶éããããŸãã
- ãªããžããªã»å ¬éãµã€ãã®å®¹é: 1GB
- 転éé: æ 100GB
- ãã«ã: 1 æé 10 ãã«ã
ãããã¯ãœããå¶éã§ãããããè¶ ããå Žåã¯éç¥ãå±ããŸãã
 çŠæ¢ãããçšé | GitHub ãã«ã
çŠæ¢ãããçšé
GitHub Pages ã¯ããªã³ã©ã€ã³ããžãã¹ãeã³ããŒã¹ãµã€ããäž»ã«åååŒã®åæ»åãŸãã¯ãµãŒãã¹ãšããŠã®åçšãœãããŠã§ã¢ã®æäŸ (SaaS) ã®ã©ã¡ãããç®çãšããããã®ä»ã®ãŠã§ããµã€ããéå¶ããããã®ç¡æã®ãŠã§ããã¹ãã£ã³ã°ãµãŒãã¹ãšããŠã®äœ¿çšãæå³ãããã®ã§ã¯ãªãããŸããã®ãããªäœ¿çšãèš±å¯ãããã®ã§ããããŸããã
éåžž GitHub Pages ã¯ç¡æã§ãœãŒã¹ãå«ããŠå
¬éãããã®ã§ã
ææ販売ããããœãããŠã§ã¢ã GitHub Pages ã§å
¬éããŠããŸããš
æ¯æãããäºãªããããŠã³ããŒãã§ããŠããŸãäºã«ãªããŸãã
ææåãã¯ããã«é©ãã Web ãµãŒãã¹ã䜿ã£ãŠäžããããšããäºã§ãããã
ããã¯æ³äººã§ã®äœ¿çšãçŠæ¢ããŠããããã§ã¯ãããŸããã
æ³äººçšéã§ãããªãŒãœããã®ãœãŒã¹ãªã©ãå
¬éããç®çã§ããã°
GitHub Pages ã䜿ã£ãŠãæ§ããªãäºã«ãªããŸãã
ãŸããã®çŠæ¢çšé㯠GitHub Pages ãªã®ã§ã
GitHub ãã®ãã®ãçŠæ¢ãããã®ã§ã¯ãããŸããã
äŸãã° GitHub ãªããžããªã§ Web ãµã€ãã®ãœãŒã¹ç®¡çãè¡ãã
ããããä»ã®ãµãŒãã¹ã§ãã«ãã»ãããã€ããŠå
¬éããå Žåã¯
ææåãã§äœ¿çšããŠãè¯ãäºã«ãªããŸãã
ä»ã«ãçŠæ¢äºé ããããŸãã
GitHub Pages ã®èšå®
ãªããžããªããŒãžã® Setting ããããšã
å·Šãµã€ãããŒã« Pages ããããŸãã
ãSourceãã®éžæã«ãããåäœãç°ãªããŸãã
- GitHub Actions - GitHub Actions ãçšã㊠Web ãµã€ãã®ãããã€ãè¡ããŸãã
- Deploy from a branch - ãã©ã³ãå
ãéçãµã€ããšããŠå
¬éããŸãã
ãŸã㯠Jekyll ãçšããŠãã«ãããéçãµã€ããå ¬éããŸããïŒåŸæ¥ã®æ¹æ³ïŒ
ããããäžèšã§çŽ¹ä»ããŠãããŸãã
GitHub Actions ã§å ¬éãã
 Actions | GitHub (æ¥æ¬èª)
GitHub ã«æèŒããã CI/CD ã§ãã
ãªããžããªã® .github/workflows/
å
ã«ã¯ãŒã¯ãããŒã® .yaml
ãã¡ã€ã«ãäœæããgit push
ããäºã§ãèªåã§åŠçãå®æœããŸãã
ãSourceã㧠GitHub Actions ãéžæãããšãã¯ãŒã¯ãããŒã®éžæãã§ããŸãã
çŸåšã¯ãŒã¯ãããŒã¯ããªãå€åœ©ã«å
¬éãããŠããããã
èªèº«ã§äœæããå¿
èŠã¯ãªããå¿
èŠã«å¿ããŠæ€çŽ¢ã»éžæããã ãã§äœ¿ããã§ãããã
2022幎8æã«å
¬éãããã°ãããªã®ã§ã.github.io
ãžã®å±éæ¹æ³ãæ°ä»æ§ã«å¯Ÿå¿ããŠããªãã¯ãŒã¯ãããŒããããŸãã
ïŒåŸæ¥ä»æ§ã®å Žå㯠Secret ãžããŒã¯ã³ã®å
¥åãå¿
èŠã§ãïŒ
æ°ã¶æäžã«ãæ¹åãããã§ãããã
åŸæ¥ã§ã GitHub Actions ãçšã㊠GitHub Pages ã§å
¬éããæ段ããããŸãããã
å
¬åŒæ段ãçšããäºã§ãããŒã¯ã³ã®çºè¡ãããã«ãããã€ã§ããããã«ãªã£ãŠããŸãã
ããŒãžéå¶è
ã ð MkDocs ãçšããŠãã«ãã»ãããã€ããæ¹æ³ã
GitHub ãããžã§ã¯ãã®ãµã³ãã«ãšããŠå
¬éããŠããŸãã
ð fu-sen/GitHubPages-MkDocs | GitHub
éçãµã€ããŸã㯠Jekyll ã§ãã«ãããŠå ¬éãã
GitHub ãªããžããªãžã® git push
ã§äœ¿ãã®ãéäŸã§ããã
GitHub ã® Web äžã§ãªããžããªãçæãããã¡ã€ã«ã®äœæã»ç·šéããäºãã§ããŸãã®ã§ã
å¿
ããã Git ã®æ±ãã«æ
£ããŠããå¿
èŠãããããã§ã¯ãããŸããã
HTML ãªã©ãå
¥ããŠãã®ãŸãŸå
¬éã§ããŸãã
ãŸããð Markdown ã代ããã«äœ¿çšã§ããŸãã.md ãã¡ã€ã«ã䜿çšããŸãã
ãã ããGitHub ã®ãœãŒã¹è¡šç€ºãšã¯ç°ãªã解éããããã®ããããŸãã
.md ãã¡ã€ã«å
㧠HTML ã®èšèŒãå¯èœã§ãã.html ãã¡ã€ã«ã®æ··åšãå¯èœã§ãã
index.html
ã¯ãã¡ã€ã«åã®çç¥ã§è¡šç€ºã§ããŸããã
Markdown 㯠index.md
ã䜿çšã§ããŸãã
ãŸããããããªãå Žåããããžã§ã¯ãããŒãžã§è¡šç€ºããã README.md
ã䜿ãããŸãã
ããŒãžã®æå°é㯠index.html
ã»index.md
ã»README.md
ã®ã¿ãšãªããŸãã
Not Found 㯠404.html
ããã³ 404.md
ã衚瀺ãããŸãã
ãã¡ã€ã«.html
㯠ãã¡ã€ã«
ã§ãåç
§ã§ããŸãããã¡ã€ã«.md
㯠ãã¡ã€ã«.html
ãŸã㯠ãã¡ã€ã«
ã§ãåç
§ã§ããŸãããã¡ã€ã«/
ã¯ç©ççã«ãã£ã¬ã¯ããªïŒãã©ã«ãïŒãšãªããåç
§ã§ããŸããã
ç¬èªãã¡ã€ã³ãèšå®ããå Žåã¯ããã¡ã€ã« CNAME
ãçæããã
ãã®äžã« ãã¡ã€ã³å ãå
¥ããŸãã
_config.yml
ã¯ããŒãã title ãªã©ã®ãµã€ãå
šäœã®èšå®ã«äœ¿ãããŸãã
æ£ãã㯠Jekyll ã®èšå®ãã¡ã€ã«ã§ãã
Jekyll ã¯åœåãã GitHub Pages ã«çµã¿èŸŒãŸããŠããéçãµã€ããžã§ãã¬ãŒã¿ã§ãã
èšå®
ãSettingãã«é¢ä¿ãªã次ã®é ç®ãååšããŸãã
æŽã«ãDeploy from a branchããéžæããå Žåã¯æ¬¡ã®é ç®ããããŸãã
以äžã«åé ç®ã玹ä»ããŠããŸãã
Source å ¬éã»éå ¬éãšãã©ã³ãã®éžæ
ãSettingãã§ãDeploy from a branchãã®å Žåã«éžæã§ããŸãã
å
¬éãããã©ã³ããéžæããŸããå
¬éã»éå
¬éã®ã¹ã€ããã§ããããŸãã
- master branch - ããã©ã«ãã® master ãã©ã³ãå ããã®ãŸãŸ Web å ¬éããŸãã
- master branch /doc folder -
doc/
ãã©ã«ãå ã Web å ¬éããŸãã
master ãã©ã³ãã§ãœãŒã¹ãå ¬éããŠããäžã§ãdoc/
å ãããã¥ã¡ã³ãçã®ç®ç㧠Web å ¬éããäºã§ããŸãã - None - GitHub Pages ãç¡å¹åããŸãã
ä»ã®ãã©ã³ããååšããŠããå Žåããããã®ãã©ã³ããäžèŠ§ã«è¡šç€ºãããŸãã
GitHub Pages ã¯åœå gh-pages
ãã©ã³ãã䜿çšããæ¹æ³ãæ¡çšãããŠããŠã
çŸåšã¯å¿
é ã§ã¯ãªããªã£ãŠããŸãããæ
£ç¿çã«äœ¿çšããŠãããªããžããªãååšããŸãã
Theme Chooser ããŒãã®é©çšã»éžæ
ãSettingãã§ãDeploy from a branchãã®å Žåã«éžæã§ããŸãã
ã·ã³ãã«ã« HTMLã»Markdown ãå¶äœããéãããŒããé©çšã§ããŸãã
HTML ã§é©çšããå Žåã.html ãã¡ã€ã«å
㯠<body>ïœ</body>
å
ã®å
容ãå
¥ãã<head>ïœ</head>
ã®è£
食ã¯åé€ããŠäžããã
代ããã« Front matter 㧠latout: default
ãå ããŸãã
ããŒãã«ãã£ãŠé©çšãã layout
ãå€æŽããå¿
èŠããããŸãã
---
layout: default
---
ããŒãã«ãã£ãŠããã€ãã®ããŒããé©çšã§ããŸãã
äž»ã«æ¬¡ã®ã¬ã€ã¢ãŠãã§çšæãããŠããŠã
ããã° ããã³ Web ãµã€ã ã©ã¡ãã§ã䜿çšã§ããããã«ãªã£ãŠããŸãã
layout: home
-index.md
ãªã©ã®ãããããŒãžãäž»ã«ããã°ã®äžèŠ§è¡šç€ºã§ããlayout: post
- ããã°èšäºããŒãžãlayout: page
-about.md
ãªã©ãèšäºä»¥å€ã®åå¥ããŒãžãããã°ã§ã¯ãªã Web ãµã€ãã
該åœããŒãžã® GitHub ãããžã§ã¯ãããŒãžãã_layouts/
å
ãåç
§ããŠçšæãããŠããã¬ã€ã¢ãŠãã確èªã§ããŸãã
.md ãã¡ã€ã«ã§ããŒãã§äœ¿çšã§ããé
ç®ãããã°ã
ããã .html ãã¡ã€ã«ã§ã䜿çšã§ããŸãã
GitHub Pages 察å¿ããŒã
ç°¡åã«ããŒããé©çšã§ããŸãã
ãã®æããŒãã®éžæãšãµã³ãã«ã衚瀺ãããŸããã
次ã®ããŒãžãããåç
§å¯èœã§ãã
 Supported themes | GitHub Pages
ããŒããé©çšããŠããªãå ŽåãPrimer ãããã©ã«ãããŒããšããŠé©çšãããŠããŸãã
 pages-themes/primer | GitHun
é©çšãããš _config.yml
ãçæãããŸãã_config.yml
ã§ã®èšå®å
容ã¯ãããçšåºŠããŒãã§å
±éããŠãããšããããããŸãã
lang: ja
title: Example Domain
description: example.net.eu.org
theme: jekyll-theme-slate
show_downloads: true
google_analytics: UA-TRACKING-ID
github:
is_project_page: false
zip_url: https://ïœ/file.zip
tar_url: https://ïœ/file.tar.gz
repository_url: https://github.com/ïœ
- themes:
jekyll-theme-ããŒãå
ã§çµ±äžãããŠããŸãã - title: ãµã€ãåããããã«å€§ãã衚瀺ããŸãã
- description: 説æããµã€ãåã®äžã«è¡šç€ºããŸãã
- show_downloads:
true
ã«ãããšããŠã³ããŒããªã³ã¯ã衚瀺ããŸãã - google_analytics: èšå®ããŠããå Žåã¯ãã©ããã³ã° ID ãå
¥ããŸãã
Google ã¢ããªãã£ã¯ã¹ 4ïŒGA4ïŒã® æž¬å® ID ã¯é察å¿ã®å¯èœæ§ããããŸãã - github: äžå±€ã¯ç©ºçœãåè§ 2 æå以äžå
¥ããŠäžããã
- is_project_page:
false
ã«ãããš
ãããžã§ã¯ãããŒãžãžã®ãªã³ã¯ãé衚瀺ã«ãªãå ŽåããããŸãã - zip_url: .zip ãã¡ã€ã«ã®ããŠã³ããŒã URL ãå ¥ããŸãã
- tar_url: .tar.gz ãã¡ã€ã«ã®ããŠã³ããŒã URL ãå ¥ããŸãã
- repository_url: çç¥ãããšãã«ãå ã®ãããžã§ã¯ãã«ãªããŸãããå€æŽã§ããŸãã
- is_project_page:
ããŒãã«ãã£ãŠè¿œå ã®èšå®ããããŸãã_layouts/default.html
ãåç
§ããŠã¿ãŠäžããã
ä»ã«å ¬éãããŠããããŒã
Theme Chooser 以å€ã§ã Jekyll ããŒã㧠remote_theme ã«å¯Ÿå¿ããŠããå Žåã_config.yml
ãçæããremote_theme ãå
¥ããã ãã§ããŒããé©çšã§ããŸãã
Jekyll ããŒãäžèŠ§ãžã®ãªã³ã¯ã¯ Jekyll å
¬åŒãµã€ãã®æ¬¡ããåç
§ã§ããŸãã
æå®ããå€ã¯ GitHub ãªããžããªã§ remote_theme: ãŠãŒã¶ãŒ/ãªããžããª
ã§ãã
äŸãã° Just the Docs ã¯æ¬¡ã® GitHub ãªããžããªã§å ¬éãããŠããŸãã
 pmarsceill/just-the-docs | GitHub
åŸã£ãŠã _config.yml
ã«æ¬¡ãè¿œå ããŸãã
remote_theme: pmarsceill/just-the-docs
ããã ãã§ããŒããé©çšãããŸããæŽã«ããŒãã«å¿ããèšå®ã®è¿œå ãå¯èœã§ãã
GitHub Pages ã§ã¯ãããããªããžããªãã¯ãŒãã³ã»ä¿®æ£ããå¿
èŠã¯ãããŸããã
æå°éã§ãã¡ã€ã«ç®¡çãè¡ããŸãã
Custom domain ç¬èªãã¡ã€ã³ã®é©çšã»èšå®
ãSourceãããGitHub Actionsãã®å Žåã
GitHub Actions ã®ã¯ãŒã¯ãããŒã«ãã£ãŠã¯ãã®èšå®ãç¡èŠãããŸãã
ç¬èªãã¡ã€ã³ãé©çšããŸããé©çšããªãå Žåã¯æ¬¡ã®ã¢ãã¬ã¹ã«ãªããŸãã
https://ãŠãŒã¶ãŒå.github.io/ãããžã§ã¯ãå
- å人ã®å Žåhttps://çµç¹.github.io/ãããžã§ã¯ãå
- çµç¹ã®å Žå
â» ïœ.github.com/ãããžã§ã¯ãå
ã¯å€ãèšèŒã§ãçŸåšã¯äœ¿çšã§ããŸããã
ãSouceãã§ãDeploy from a branchããéžæããŠããå Žåã
ãã¡ã€ã« CNAME
ã«ãã¡ã€ã³åãå
¥ã£ãç¶æ
ã§çæãããŸãã
ãã㯠Settings ã§èšå®ããã« CNAME
ãã¡ã€ã«ãäœã£ãŠ git push
ãå¯èœã§ãã
ãSourceãããGitHub Actionsãã®å Žåã¯é£åãããªããªã£ãããã
ãã®é
ç®ã§äœ¿çšãããã¡ã€ã³åãèšå®ããå¿
èŠããããŸãã
ð ããŒã ãµãŒã ã¯æ¬¡ã§èšå®ããŸãã
ãµããã¡ã€ã³ | çš®é¡ | å€ |
---|---|---|
å ¬éãã¡ã€ã³å | CNAME | å人ã»çµç¹.github.io |
www
ãªã©ã®ãµããã¡ã€ã³ãä»ããªãå Žåã
CNAME ã®ä»£ããã« ANAMEã»ALIAS ã¬ã³ãŒãã§èšå®ã§ããå ŽåããããŸãã
ãããããŒã ãµãŒãã§å¯Ÿå¿ããŠããªãå ŽåãA ã¬ã³ãŒãã§èšå®ãå¿
èŠã§ãã
Windows 以å€ã§ã¯ dig
ã§æ€çŽ¢ã§ããŸãã
dig fu-sen.github.io
Web ã§ãæ€çŽ¢å¯èœã§ããGoogle ãæäŸããŠãã dig ããããŸãã
ãååãã« å人ã»çµç¹.github.io
ãå
¥ããŠäžããã
ã¬ã³ãŒã㯠A ãããã©ã«ãã«ãªã£ãŠããŸãã
ããã§ã¯ fu-sen.github.io
ã§å®éã«æ€çŽ¢ããçµæã§ãã
;; QUESTION SECTION:
;fu-sen.github.io. IN A
;; ANSWER SECTION:
fu-sen.github.io. 3600 IN A 185.199.111.153
fu-sen.github.io. 3600 IN A 185.199.109.153
fu-sen.github.io. 3600 IN A 185.199.108.153
fu-sen.github.io. 3600 IN A 185.199.110.153
çŸåšã¯ IPv6 ãå²ãåœãŠããããŸãã
ã¬ã³ãŒã AAAA ãåç
§ããŠäžããã
;fu-sen.github.io. IN AAAA
;; ANSWER SECTION:
fu-sen.github.io. 3600 IN AAAA 2606:50c0:8000::153
fu-sen.github.io. 3600 IN AAAA 2606:50c0:8001::153
fu-sen.github.io. 3600 IN AAAA 2606:50c0:8002::153
fu-sen.github.io. 3600 IN AAAA 2606:50c0:8003::153
Windows ã§ã¯ä»£ããã« nslookup
ã䜿ããŸããWindows 10 ã§ã䜿çšå¯èœã§ãã
nslookup fu-sen.github.io
æš©éã®ãªãåç:
åå: fu-sen.github.io
Addresses: 2606:50c0:8002::153
2606:50c0:8001::153
2606:50c0:8000::153
2606:50c0:8003::153
185.199.110.153
185.199.109.153
185.199.108.153
185.199.111.153
ãã®å ŽåãããŒã ãµãŒãã¯æ¬¡ã®èšå®ã«ãªããŸãã
ãµããã¡ã€ã³ | çš®é¡ | å€ |
---|---|---|
ãªãã»@ã»ãã¡ã€ã³å | A | 185.199.108.153 |
ãªãã»@ã»ãã¡ã€ã³å | A | 185.199.109.153 |
ãªãã»@ã»ãã¡ã€ã³å | A | 185.199.110.153 |
ãªãã»@ã»ãã¡ã€ã³å | A | 185.199.111.153 |
ãªãã»@ã»ãã¡ã€ã³å | AAAA | 2606:50c0:8000::153 |
ãªãã»@ã»ãã¡ã€ã³å | AAAA | 2606:50c0:8001::153 |
ãªãã»@ã»ãã¡ã€ã³å | AAAA | 2606:50c0:8002::153 |
ãªãã»@ã»ãã¡ã€ã³å | AAAA | 2606:50c0:8003::153 |
å人ã»çµç¹ã«ãã£ãŠ IP ã¢ãã¬ã¹ãç°ãªããŸãã
å¿
ã dig
ã» nslookup
ã§èª¿ã¹ãäžã§èšå®ããŠäžããã
www ã®æç¡
example.com
ã Custom domain ãšããŠèšå®ã䜿çšãã GitHub Pages ã®å Žåãwww.example.com
ã GitHub Pages ã®ãµãŒãã«èšå®ããå Žåãwww.example.com
㯠example.com
ãžè»¢éãããŸãã
éã« www.example.com
ã Custom domain ã«å
¥ããŠããå Žåã¯ãexample.com
㯠www.example.com
ãžè»¢éãããŸãã
ç¬èªãã¡ã€ã³ãžã®è»¢é
ç¬èªãã¡ã€ã³ãèšå®ããå Žåããã®ãã®å
ã«ãªã ââ.github,io
ãââ,github.io/ãããžã§ã¯ã
ã§åç
§ããå Žåã¯ã
èšå®ãè¡ã£ãç¬èªãã¡ã€ã³ãžè»¢éãããŸãã
GitHub Pages ã¯èšå®ãè¡ã£ãç¬èªãã¡ã€ã³ã
GitHub Pages ã§ç®¡çãããäºãæåŸ
ããŸããã
ãã®ç¬èªãã¡ã€ã³ãä»ã® Web ãµãŒãã¹ã§éçšããäºãã§ããŸãã
äŸãã°åç
§ãå€ããªããGitHub Pages ã®å¶éã«éããŠããŸã£ãŠãã
åŸæ¥äœ¿çšããŠããã¢ãã¬ã¹ã¯ç¬èªãã¡ã€ã³ãžã®è»¢éã«ããŠã
ç¬èªãã¡ã€ã³ãä»ã® Web ãµãŒãã¹ã§éçšããåé¿çãé©çšã§ããŸãã
ð Cloudflare Pages ã ð Surge ã¯è»¢ééã®å¶éããªãã®ã§åè£ã«ã§ããã§ãããã
Enforce HTTPS åžžæ SSL ã®æå¹å
2016幎6æ15æ¥ä»¥éã«çæããããããžã§ã¯ãã§ã¯å人ã»çµç¹.github.io/ãããžã§ã¯ãå
ãåžžæ https åºå®ã«ãªããŸãã
ç¬èªãã¡ã€ã³ã䜿çšããå Žåã¯çŸåšãéžæã§ããŸãã
åŸã£ãŠç¬èªãã¡ã€ã³ã§ããã° http ã§ã®å
¬éãçŸåšã§ãå¯èœã§ãã
SSL 蚌ææžã«ã¯ ð Let’s Encrypt ãçºè¡ããæå¹ãªéã¯èªåæŽæ°ãããŸãã
ããã«æäœã§ãæ°åèŠããããã  ãå
¥ããŠåç
§ã§ããããã«ãªããŸã§æ°åèŠããŸãã
çºè¡ã«ã¯ããŒã ãµãŒããåæ ãããŠããå¿
èŠããããŸãã
ããŒã ãµãŒãã«ã¯ãã£ãã·ã¥ïŒTTLïŒãããäºã«ã泚æäžããã
å人ã»çµç¹.github.io ã§å ¬éãã
ãããžã§ã¯ããåŸãã«ä»ããªãå人.github.io
ãŸã㯠çµç¹.github.io
ã§ãããŒãžå
¬éã§ããŸãã
å人ã»çµç¹ã®èªå·±çŽ¹ä»ã Blog ãªã©ã®ç®çã§äœ¿çšã§ããŸãã
æ³äººçšé以å€ã§ãèšå®ããŠäœ¿çšã§ããçµç¹å ã§ãããžã§ã¯ããäœæã§ããŸãã
äžäººã§ã®äœæãå¯èœã§ãããè€æ°äººã§ã®æ§æãå¯èœã§ãã
ãã®æ©èœããããããçŸåšå人ã§è€æ°ã®ã¢ã«ãŠã³ããæã€äºã¯éæšå¥šã«ãªããŸãã
ãããžã§ã¯ãåã å人.github.io
ãŸã㯠çµç¹.github.io
ã§äœæããã ãã§ãã
ãã®äžã« index.html
ãªã©ãå«ããŸãã
ããã«å
¥ãã robots.txt
ã¯ç¬èªãã¡ã€ã³ã䜿çšããªãå人ã»çµç¹.github.io/ãããžã§ã¯ã
ã® Web ããŒãžã«ã圱é¿ããããŸãã
ãŸã favicon
ãªã©ã®ç»åããããžã§ã¯ã㧠meta ã¿ã°æå®ããªãå Žåã¯åæ ãããŸãã
Sitemap ã«ã泚æãèŠããŸãã
ãã®èŸºã®åé¡ãåé¿ããããã«ããããžã§ã¯ãã«ç¬èªãã¡ã€ã³ãå²ãåœãŠããã
ãµããã¡ã€ã³ã䜿çšã§ãã ð Cloudflare Pages ã» ð Vercel ã§
Web ãµã€ããå
¬éããã®ãè¯ãã§ãããã
å人ã»çµç¹ããŒãžã«ç¬èªãã¡ã€ã³ãå²ãåœãŠã
å人ããŒãžã»çµç¹ããŒãžã«ã  Custom Domain ãèšå®ããŠã
ç¬èªãã¡ã€ã³ãèšå®ããäºãã§ããŸããââ.github.io
ã«ç¬èªãã¡ã€ã³ãèšå®ããå Žåã§ã
ãããžã§ã¯ãå㯠ââ.github.io
ã®ãŸãŸã«ããŠäžãã
å人ã»çµç¹ããŒãžã«ç¬èªãã¡ã€ã³ãèšå®ãããšã
åã
ã®ãããžã§ã¯ãã§ç¬èªãã¡ã€ã³ãèšå®ããŠããªãå Žåãââ.github.io/ãããžã§ã¯ã
ã¯ç¬èªãã¡ã€ã³/ãããžã§ã¯ã
ã§ã®å
¬éãšãªããŸãã
ãªããå人ã»çµç¹ããŒãžã«ç¬èªãã¡ã€ã³ãèšå®ããå Žåã¯ã
https ã®åŒ·å¶ãç¡å¹ã«ããŠãhttp ã§ã®åç
§ã«ããäºãã§ããŸãã
ããã¯ãããžã§ã¯ãæ¯ã«èšå®å¯èœã§ãã
Node ã® gh-pages ã¢ããªã§ãããã€ãã
git ã³ãã³ãã䜿ã代ããã« GitHub Pages ãå
¬éããç®çã§
ãªããžããªãžã³ãããããŠå
¬éãã CLI ã GitHub å
ã§ããã€ãååšããŸãã
çŸåšã¯ GitHub Actions ã ð Vercel ã» ð Cloudflare Pages ãçšããåæã§ã
ãã«ãåã®ãœãŒã¹ã¬ãã«ããªããžããªãžå
¥ããŠããäºãå€ãã§ããã
ãœãŒã¹ãå
¬éããã« GitHub Pages ãçšããŠå
¬éãããå Žåã«äœ¿ããŸãã
åã«ã³ãããã«å¿
èŠãª git ã³ãã³ãã 1 ã³ãã³ãã§è¡ã£ãŠããã®ã§ã
å®éã«ã¯ GitHub Pages çšé以å€ã§ã䜿ãäºãã§ããŸãã
Node.js ãã€ã³ã¹ããŒã«ããŠããç¶æ ã§æ¬¡ãå®è¡ããŸãã
npm i -g gh-pages
ãŸãäºã GitHub ã®ãªããžããªãé£æºãããŠãããŸãã
äŸãã° ð Hugo ã䜿ãå Žåã¯public
å
ã«ãã«ããã index.html
ãªã©ãçæãããã®ã§ã
hugo
gh-pages -d public
ãšãããš gh-pages
ãã©ã³ããžã³ãããããŸãã
ããšã¯ gh-pages
ãã©ã³ãã GitHub Pages ãšããŠå
¬éããããèšå®ããŸãã
- -a -
git add
ã»git remove
ã®ã¿ãå®è¡ããŸãã - -b ãã©ã³ã - ã³ããããããã©ã³ãã
gh-pages
以å€ãæå®ã§ããŸãã - -d ãã©ã«ã - ã³ããããããã©ã«ãã
./
ã§çŸåšã®å Žæã§ããâ» - -g ã¿ã° - ã¿ã°ãä»äžããŸãã
- -m ã¡ãã»ãŒãž - ã³ãããã¡ãã»ãŒãžãç¶ããŸããããã©ã«ãã¯
Updates
ã§ãã - -n - commit ã®ã¿ãè¡ããpush ããªãããã«ããŸãã
- -o ãªã¢ãŒã - ãªã¢ãŒãã
origin
以å€ã«ããå Žåã«æå®ããŸãã - -r ãªããžã㪠- ä»ã®ãªããžããªãžã³ãããããå Žåã¯æå®ããŸãã
- -t - é ã«
.
ãä»ããã¡ã€ã«ã察象ã«ããŸãã
â» éå¶è
ã®çµéšã§ -d çç¥æïŒ-d "."
åçïŒã§ãšã©ãŒãçºçããŠããŸãã
ãªãã·ã§ã³ãé·ããªãå Žå㯠pageage.json
ãå«ããŸãã
{
"scripts": {
"deploy": "gh-pages -d public/ -b master"
}
}
ããšã¯ npm run deploy
ã§ãããã€ã§ããŸããã-- ãªãã·ã§ã³
ã§ãªãã·ã§ã³ãè¿œå ã§ããã®ã§ã
ãããçšããŠã³ãããã¡ãã»ãŒãžãè¿œå ãããšè¯ãã§ãããã
npm run deploy -- -m "\`readme.md\` ãæŽæ°"
Q&A
_ ã§ã¯ããŸããã£ã¬ã¯ããªã»ãã¡ã€ã«ãæ©èœããŸããã
ãSourceãã§ãDeploy from a branchããéžæããŠããå Žåã
éçãµã€ããžã§ããŒã¿ Jekyll ãåäœããŸãã
Jekyll 㯠_
ã§ã¯ããŸããã£ã¬ã¯ããªã»ãã¡ã€ã«ãç¹æ®ãªãã¡ã€ã«ãšããŠæ±ãããããã_
ã§ã¯ããŸããã¡ã€ã«ãç¡èŠãããŠããŸããŸãã
ãSourceãããGitHub Actionsãã«å€æŽããŠ
ãStatic HTMLããé©çšããäºã§ã
Jekyll ãé©çšããã«éçãã¡ã€ã«ã衚瀺ããäºãã§ããŸãã
éçãµã€ããžã§ããŒã¿ã䜿çšããŠããå Žåã¯ã
GitHub Actions ã§ååšããŠãããããããªãã®ã§ã
GitHub ãããžã§ã¯ãã®äœ¿çšæ¹æ³ãå€ããè¯ãæ©äŒã§ãããã
ãŸãã¯ãããžã§ã¯ãã®ã«ãŒãã«ç©ºã® .nojekyll
ãå«ããŠäžããã
ããã«ãã Jekyll ã®åäœãç¡å¹ã«ãªããŸãã
ã³ããããã床ã«ã¡ãŒã«éç¥ãå±ããŸãã
ããŒã ãµãŒããèšå®ãããŠã®å Žåã GitHub ãæšå¥šããã¬ã³ãŒãèšå®ãããŠããªãå Žåã«
GitHub ããã¡ãŒã«éç¥ãå±ããŸãã
Subject: [ãŠãŒã¶ãŒ/ãªããžããª] Page build warning
The page build completed successfully, but returned the following warning for the
master
branch:Your site’s DNS settings are using a custom subdomain, ãã¡ã€ã³å, that’s set up as an A record. We recommend you change this to a CNAME record pointing at ãŠãŒã¶ãŒ.github.io. For more information, see https://help.github.com/en/articles/using-a-custom-domain-with-github-pages.
For information on troubleshooting Jekyll see:
https://help.github.com/articles/troubleshooting-jekyll-builds
If you have any questions you can contact us by replying to this email.
ð EU.org ãæŽãªããµããã¡ã€ã³ãªãã®ç¶æ
ã§èšå®ããå Žåã
CNAMEã»ALIASã»ANAME ã§èšå®ããŠãå®éã«ã¯ A ã¬ã³ãŒãã§èšå®ãããããã
ã¡ãŒã«éç¥ãå±ããŸãã
ãããåé¿ããã®ã¯ä»ã®ãµãŒãã¹ã§ Web å
¬éããããã«ããŸãã
äŸãã° ð Vercel ã䜿çšã§ããŸãã
ãããžã§ã¯ãåããŠãŒã¶ãŒåãå€æŽããå ŽåãURL ã¯å€åããŸããïŒ
ç¬èªãã¡ã€ã³ãèšå®ããã« âââ.github.io/ãããžã§ã¯ã
ã§äœ¿çšããŠããå Žåã
ãããžã§ã¯ãåã®å€æŽã«ãšããªã£ãŠ URL ã¯å€åããŸãã
ãã ãä»ãŸã§äœ¿ãããŠãã URL ã¯æ°ãã URL ãžè»¢éã«ãªããNot Found ã«ã¯ãªããŸããã
ãã㯠Custom Domain ã§ç¬èªãã¡ã€ã³ãå²ãåœãŠãå Žåã
åŸæ¥ã âââ.github.io/ãããžã§ã¯ã
ã®åœ¢åŒã§äœ¿çšããŠããå Žåãâââ.github.io/ãããžã§ã¯ã
ã¯ç¬èªãã¡ã€ã³ãžã®è»¢éã«ãªããŸãã
GitHub ãŠãŒã¶ãŒå ã®å€æŽãè¡ã£ãå Žåãâââ.github.io
ãå€åããäºã«ãªããŸããã
ãã®å Žåãå€ã âââ.github.io
ãã転éãããããã«ãªããŸãã
ããã㧠Custom domain ãèšå®ããŠããã°ãURL ã¯å€åããªãã®ã§ã
ãããŠãããžã§ã¯ãåºæã® Custom domain ããµããã¡ã€ã³ã¬ãã«ã§ãè¯ãã®ã§
å²ãåœãŠãŠããã®ãæã§ãã