jekyll-theme-freed
jekyll-theme-freed
A guide to build a blog like mine.
Change the following Freed-Wu
to your github username.
Build in Github
Create a Repository
Use this template to
create a repository named Freed-Wu.github.io
.
Create a Token
If you install github-cli
:
$ gh auth login # login github, `~/.git-credentials` will be created after login
$ cat ~/.git-credentials
https://Freed-Wu:gho_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@github.com
Or you can use github web UI
to create
a token refer to
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.
Create a Secret for Your Repo according to Your Token
Go to
https://github.com/Freed-Wu/Freed-Wu.github.io/settings/secrets/actions
to create a secret named GH_TOKEN
like
gho_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
refer to
https://docs.github.com/en/actions/security-guides/encrypted-secrets.
Create a New Post
git clone https://github.com/Freed-Wu/Freed-Wu.github.io
cd Freed-Wu.github.io
vi _config.yaml # use your information to replace mime
vi README.md # create your homepage
rm _post/* # delete my posts
vi _post/YYYY-MM-DD-title.md # create your post
git add -A
git commit
git push
Deploy github pages from branch gh-pages
’s /
refer to
https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch.
An incorrect branch will bring you
some bug.
Now wait https://github.com/Freed-Wu/Freed-Wu.github.io/actions/workflows/pages/pages-build-deployment finished. Open https://Freed-Wu.github.io to see your blog:
xdg-open https://Freed-Wu.github.io
After Building in Github, Open in Localhost
git clone --branch=gh-pages https://github.com/Freed-Wu/Freed-Wu.github.io _site
python -m http.server -d_site &
xdg-open http://localhost:8000
Build in Localhost
git clone --recurse-submodules --depth=1 https://github.com/Freed-Wu/Freed-Wu.github.io
cd Freed-Wu.github.io
Install Dependencies and Run Server
AUR
./install.sh
jekyll s
nix
nix-shell --command 'jekyll s'
rubygems
bundle install
bundle exec jekyll s
https://localhost:8000 will be opened automatically to display your blog.