feat: move to hugo
All checks were successful
Build and deploy website / Build and Push Hugo Site (push) Successful in 36s
All checks were successful
Build and deploy website / Build and Push Hugo Site (push) Successful in 36s
This commit is contained in:
parent
06e94159b1
commit
21dcebdc33
45 changed files with 494 additions and 609 deletions
84
README.md
84
README.md
|
@ -1,43 +1,69 @@
|
|||
# Chirpy Starter
|
||||
<img align="right" width="150" alt="logo" src="https://user-images.githubusercontent.com/5889006/190859553-5b229b4f-c476-4cbd-928f-890f5265ca4c.png">
|
||||
|
||||
[][gem]
|
||||
[][mit]
|
||||
# Hugo Theme Stack Starter Template
|
||||
|
||||
When installing the [**Chirpy**][chirpy] theme through [RubyGems.org][gem], Jekyll can only read files in the folders
|
||||
`_data`, `_layouts`, `_includes`, `_sass` and `assets`, as well as a small part of options of the `_config.yml` file
|
||||
from the theme's gem. If you have ever installed this theme gem, you can use the command
|
||||
`bundle info --path jekyll-theme-chirpy` to locate these files.
|
||||
This is a quick start template for [Hugo theme Stack](https://github.com/CaiJimmy/hugo-theme-stack). It uses [Hugo modules](https://gohugo.io/hugo-modules/) feature to load the theme.
|
||||
|
||||
The Jekyll team claims that this is to leave the ball in the user’s court, but this also results in users not being
|
||||
able to enjoy the out-of-the-box experience when using feature-rich themes.
|
||||
It comes with a basic theme structure and configuration. GitHub action has been set up to deploy the theme to a public GitHub page automatically. Also, there's a cron job to update the theme automatically everyday.
|
||||
|
||||
To fully use all the features of **Chirpy**, you need to copy the other critical files from the theme's gem to your
|
||||
Jekyll site. The following is a list of targets:
|
||||
## Get started
|
||||
|
||||
```shell
|
||||
.
|
||||
├── _config.yml
|
||||
├── _plugins
|
||||
├── _tabs
|
||||
└── index.html
|
||||
1. Click *Use this template*, and create your repository as `<username>.github.io` on GitHub.
|
||||

|
||||
|
||||
2. Once the repository is created, create a GitHub codespace associated with it.
|
||||

|
||||
|
||||
3. And voila! You're ready to go. The codespace has been configured with the latest version of Hugo extended, just run `hugo server` in the terminal and see your new site in action.
|
||||
|
||||
4. Check `config` folder for the configuration files. You can edit them to suit your needs. Make sure to update the `baseurl` property in `config/_default/config.toml` to your site's URL.
|
||||
|
||||
5. Open Settings -> Pages. Change the build branch from `master` to `gh-pages`.
|
||||

|
||||
|
||||
6. Once you're done editing the site, just commit it and push it. GitHub action will deploy the site automatically to GitHub page asociated with the repository.
|
||||

|
||||
|
||||
---
|
||||
|
||||
In case you don't want to use GitHub codespace, you can also run this template in your local machine. **You need to install Git, Go and Hugo extended locally.**
|
||||
|
||||
## Update theme manually
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
hugo mod get -u github.com/CaiJimmy/hugo-theme-stack/v3
|
||||
hugo mod tidy
|
||||
```
|
||||
|
||||
To save you time, and also in case you lose some files while copying, we extract those files/configurations of the
|
||||
latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes.
|
||||
> This starter template has been configured with `v3` version of theme. Due to the limitation of Go module, once the `v4` or up version of theme is released, you need to update the theme manually. (Modifying `config/module.toml` file)
|
||||
|
||||
## Usage
|
||||
## Deploy to another static page hostings
|
||||
|
||||
Check out the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
||||
If you want to build this site using another static page hosting, you need to make sure they have Go installed in the machine.
|
||||
|
||||
## Contributing
|
||||
<details>
|
||||
<summary>Vercel</summary>
|
||||
|
||||
You need to overwrite build command to install manually Go:
|
||||
|
||||
This repository is automatically updated with new releases from the theme repository. If you encounter any issues or want to contribute to its improvement, please visit the [theme repository][chirpy] to provide feedback.
|
||||
```
|
||||
amazon-linux-extras install golang1.11 && hugo --gc --minify
|
||||
```
|
||||
|
||||
## License
|
||||

|
||||
|
||||
This work is published under [MIT][mit] License.
|
||||
If you are using Node.js 20, you need to overwrite the install command to install manually Go:
|
||||
|
||||
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
|
||||
[chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/
|
||||
[CD]: https://en.wikipedia.org/wiki/Continuous_deployment
|
||||
[mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE
|
||||
```
|
||||
dnf install -y golang
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
Make sure also to specify Hugo version in the environment variable `HUGO_VERSION` (Use the latest version of Hugo extended):
|
||||
|
||||

|
||||
</details>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue