2019-02-22 / syui

github

github.dev

googleから取得できるdomainの.devで、github.devがgithubによって速攻で取得され、github pagesの宣伝に使われてたので、とりあえずpreviewしてみた。

https://github.dev

source : https://github.com/github/personal-website

deploy : https://mbahack2.syui.cf/personal-website

$ git clone https://github.com/github/personal-website
$ personal-website
$ rvm install 2.6.1
$ rvm --default use 2.6.1
$ gem install jekyll bundler
$ bundle
$ bundle exec jekyll serve

repoを作って、branch:gh-pagesにpushすると、開発者っぽいabout pagesがdeployされる。url:https://syui.github.io/personal-website

$ git branch
$ git checkout -b gh-pages
$ git push origin gh-pages
# fork
$ curl -sL https://syui.github.io/personal-website

url,baseurlをsetすると、cssがhttps protocolになった。

$ vim _config.yml
url: https://mbahack2.syui.cf
baseurl: personal-website

$ vim _includes/header.html
// https://jekyllrb.com/news/2016/10/06/jekyll-3-3-is-here/
By default, baseurl is set to "" and therefore yields (never set to "/"):
{{ "/docs/assets/" | absolute_url }} => https://jekyllrb.com/myproject/docs/assets
{{ "/docs/assets/" | relative_url }} => /myproject/docs/assets

ちなみに、dirではなくrootに置く場合は、repo${user}.github.ioにする。