Skip to content

Commit 8b04b88

Browse files
committed
Update README.md
1 parent 302ffb3 commit 8b04b88

1 file changed

Lines changed: 61 additions & 36 deletions

File tree

README.md

Lines changed: 61 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,59 +17,84 @@
1717
The easiest way is to download the theme from GitHub and copy it into `themes/chicago7`, or clone it directly using Git.
1818

1919
```sh
20-
git clone https://github.com/akopdev/hugo-theme-chicago7.git themes/chicago7
20+
git submodule add https://github.com/akopdev/hugo-theme-chicago7.git themes/chicago7
2121
```
2222

2323
### Install as a Hugo Module
2424

2525
You can also install the theme as a Hugo module. Keep in mind that, by default, the theme will not appear in the themes directory.
2626
This means you’ll be using the version of the theme exactly as it exists in the repository at the time you fetch it.
2727

28-
```sh
29-
hugo mod get github.com/akopdev/hugo-theme-chicago7
28+
Add theme link to `hugo.toml` file:
29+
30+
```toml
31+
theme = ['github.com/akopdev/hugo-theme-chicago7']
3032
```
3133

32-
and in your config file add:
34+
Although specifying modules in the theme array works fine, you have more control if you explicitly import the theme as a module:
3335

3436
```toml
3537
[module]
3638
[[module.imports]]
37-
path = 'github.com/akopdev/hugo-theme-chicago7'
39+
path = 'github.com/akopdev/hugo-theme-chicago7'
40+
```
41+
Then, to load/update the theme module and run hugo:
42+
43+
```sh
44+
hugo mod get -u
45+
hugo server --minify
46+
```
47+
48+
### Example of creating site from scratch
49+
50+
Below is an example on how to create a new site from scratch:
51+
52+
```sh
53+
hugo new site my-blog
54+
cd my-blog
55+
hugo mod init github.com/<username>/my-blog
56+
echo "theme = ['github.com/akopdev/hugo-theme-chicago7']" >> hugo.toml
57+
hugo server
3858
```
3959

60+
4061
## How to configure
4162

42-
The theme doesn't require any advanced configuration. Just copy to your `config.yaml`:
43-
44-
```yaml
45-
markup:
46-
highlight:
47-
style: "bw"
48-
49-
menu:
50-
header:
51-
- name: "About"
52-
url: "about"
53-
weight: 40
54-
55-
- name: "Posts"
56-
url: "posts"
57-
weight: 30
58-
59-
- name: "Projects"
60-
url: "projects"
61-
weight: 20
62-
63-
- name: "Home"
64-
url: "/"
65-
weight: 10
66-
67-
params:
68-
author: "Your Name"
69-
social:
70-
twitter: https://x.com/example
71-
behance: "https://behance.net/yourprofile"
72-
facebook: "https://facebook.com/yourprofile"
63+
The theme doesn't require any advanced configuration. Just copy to your `hugo.toml`:
64+
65+
```toml
66+
[markup]
67+
[markup.highlight]
68+
style = "bw"
69+
70+
[menu]
71+
[[menu.header]]
72+
name = "About"
73+
url = "about"
74+
weight = 40
75+
76+
[[menu.header]]
77+
name = "Posts"
78+
url = "posts"
79+
weight = 30
80+
81+
[[menu.header]]
82+
name = "Projects"
83+
url = "projects"
84+
weight = 20
85+
86+
[[menu.header]]
87+
name = "Home"
88+
url = "/"
89+
weight = 10
90+
91+
[params]
92+
author = "Your Name"
93+
94+
[params.social]
95+
twitter = "https://x.com/example"
96+
behance = "https://behance.net/yourprofile"
97+
facebook = "https://facebook.com/yourprofile"
7398
```
7499

75100
*Supported social media links*:

0 commit comments

Comments
 (0)