|
17 | 17 | The easiest way is to download the theme from GitHub and copy it into `themes/chicago7`, or clone it directly using Git. |
18 | 18 |
|
19 | 19 | ```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 |
21 | 21 | ``` |
22 | 22 |
|
23 | 23 | ### Install as a Hugo Module |
24 | 24 |
|
25 | 25 | 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. |
26 | 26 | This means you’ll be using the version of the theme exactly as it exists in the repository at the time you fetch it. |
27 | 27 |
|
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'] |
30 | 32 | ``` |
31 | 33 |
|
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: |
33 | 35 |
|
34 | 36 | ```toml |
35 | 37 | [module] |
36 | 38 | [[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 |
38 | 58 | ``` |
39 | 59 |
|
| 60 | + |
40 | 61 | ## How to configure |
41 | 62 |
|
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" |
73 | 98 | ``` |
74 | 99 |
|
75 | 100 | *Supported social media links*: |
|
0 commit comments