mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-21 23:35:08 +01:00
Update README.
This commit is contained in:
parent
2a2122f81c
commit
46a294805b
34
README.md
34
README.md
@ -110,17 +110,9 @@ $ git submodule add https://github.com/panr/hugo-theme-hello-friend.git themes/h
|
|||||||
|
|
||||||
⚠️ **The theme needs at least Hugo version 0.74.x**.
|
⚠️ **The theme needs at least Hugo version 0.74.x**.
|
||||||
|
|
||||||
The theme is using [Hugo Pipes](https://gohugo.io/hugo-pipes/) to handle Javascript and PostCSS files. This setup **requires** following npm packages. Before you start, you have to install them (globally or locally):
|
|
||||||
|
|
||||||
🚨 **THIS STEP IS VERY IMPORTANT** 🚨
|
|
||||||
|
|
||||||
```
|
|
||||||
yarn add -D @babel/cli @babel/core @babel/preset-env browserslist clipboard cssnano postcss-cli postcss-import postcss-mixins postcss-nested postcss-preset-env postcss-url
|
|
||||||
```
|
|
||||||
|
|
||||||
## How to run your site
|
## How to run your site
|
||||||
|
|
||||||
If you installed all needed `npm` dependencies, then you can run:
|
From your Hugo root directory run:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ hugo server -t hello-friend
|
$ hugo server -t hello-friend
|
||||||
@ -233,7 +225,29 @@ In a post's front matter you have to add `hideReadMore` param set to `true`. Thi
|
|||||||
|
|
||||||
## How to (safely) edit the theme <a id="how-to-edit" />
|
## How to (safely) edit the theme <a id="how-to-edit" />
|
||||||
|
|
||||||
To change something in the theme, you have to go to `themes/hello-friend` and modify the files. You can also copy them (like `assets` folder) from the theme to your root directory and modify the files there (thanks to Hugo's lookup https://gohugo.io/templates/lookup-order). This will protect your changes from overriding when you update the theme.
|
To change something in the theme, you have to go to `themes/hello-friend` and modify the files.
|
||||||
|
|
||||||
|
If you have to override only some of the styles, you can do this easily by adding `static/style.css` in your root directory and point things you want to change.
|
||||||
|
|
||||||
|
Otherwise, if you really want to edit the theme, you need to install Node dependencies. To do so, go to the theme directory (from your Hugo root directory):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cd themes/hello-friend
|
||||||
|
```
|
||||||
|
|
||||||
|
then run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm install
|
||||||
|
$ npm i yarn
|
||||||
|
$ yarn
|
||||||
|
```
|
||||||
|
|
||||||
|
and finally, to run webpack in watch mode:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ yarn dev
|
||||||
|
```
|
||||||
|
|
||||||
## Found a bug? <a id="bug" />
|
## Found a bug? <a id="bug" />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user