Skip to content

Commit 9d85346

Browse files
committed
feat: [doc] Add hugo-xterm installation methods
Remove link to another theme installation instructions and add own installation methods and instructions. fix: Replace incorrect ':' with '"' in features list.
1 parent 31ff360 commit 9d85346

File tree

2 files changed

+148
-10
lines changed

2 files changed

+148
-10
lines changed

README.md

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Features
6969
* Switchable dark and light themes with automatic selection based on system
7070
theme.
7171
* SEO friendly OpenGraph and twitter cards support
72-
* Customizable using configurations for: "full width:, "centered".
72+
* Customizable using configurations for: "full width", "centered".
7373
* Taxonomies and posts RSS.
7474
* Responsive tested on desktop and on smart phones.
7575
* Responsive menus for desktop and mobile screens.
@@ -91,9 +91,79 @@ tested as I don't use them myself:
9191
Installation
9292
------------
9393

94-
Follows the same steps for installing and updating a Hugo theme such as this
95-
link for installing and updating PaperMode theme
96-
[adityatelange/hugo-PaperMod/wiki/Installation][6].
94+
Follow the steps in any one of these methods to install or update a Hugo
95+
theme.
96+
97+
### Method - Using hugo mod
98+
99+
Add hugo-xterm theme as Hugo module to hide the theme content and let you
100+
focus only on your site content. Let Hugo handle the theme updates
101+
automatically and control the theme as a Hugo module instead of git.
102+
103+
```bash
104+
cd <your-site-directory>
105+
106+
# initialize your site as a hugo module.
107+
hugo mod init <your-repo-host/your-username/your-site-repo>
108+
109+
# import hugo-xterm theme as hugo module in configuration
110+
$ cat config/_default/config.toml
111+
[module]
112+
[[module.imports]]
113+
path = "github.com/manid2/hugo-xterm"
114+
115+
# update theme
116+
hugo mod get -u
117+
```
118+
119+
For all below methods your site needs to point to hugo-xterm theme
120+
subdirectory in configuration as below:
121+
122+
```bash
123+
$ cat config/_default/config.toml
124+
theme = "hugo-xterm"
125+
```
126+
127+
### Method - Download and copy theme
128+
129+
Download the archived (i.e. .zip or tar.gz) theme from github repository
130+
releases page. Extract and copy the contents into `themes/hugo-xterm`
131+
subdirectory in your site directory.
132+
133+
To update the theme just download a new release and overwrite the same
134+
subdirectory.
135+
136+
This method is simple, can be automated with script and saves space on disk by
137+
omitting the theme repository history.
138+
139+
### Method - Using git clone
140+
141+
This method clones the theme repository with history into your site's themes
142+
subdirectory which is useful if you want to control the history or make your
143+
own private modifications to the theme.
144+
145+
```bash
146+
cd <your-site-directory>
147+
git clone https://github.com/manid2/hugo-xterm themes/hugo-xterm --depth=1
148+
149+
# update theme
150+
cd themes/hugo-xterm
151+
git pull
152+
```
153+
154+
### Method - Using git submodule
155+
156+
This is similar to cloning the theme into subdirectory except using git
157+
submodule which makes the theme acts a dependency of your site repository. It
158+
lets git to control your site and its dependency this theme.
159+
160+
```bash
161+
git submodule add --depth=1 https://github.com/manid2/hugo-xterm \
162+
themes/hugo-xterm
163+
164+
# update theme
165+
git submodule update --remote --merge
166+
```
97167

98168
Local development
99169
-----------------
@@ -133,7 +203,6 @@ License
133203
[3]: https://github.com/kaitlinmctigue/kaitlinmctigue.github.io
134204
[4]: https://github.com/hakimel/reveal.js
135205
[5]: https://wave.webaim.org/
136-
[6]: https://github.com/adityatelange/hugo-PaperMod/wiki/Installation
137206
[7]: https://manid2.github.io/hugo-xterm/
138207
[8]: https://en.wikipedia.org/wiki/HSL_and_HSV
139208
[9]: https://github.com/alecthomas/chroma/

exampleSite/content/about.md

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Features
4040
* Switchable dark and light themes with automatic selection based on system
4141
theme.
4242
* SEO friendly OpenGraph and twitter cards support
43-
* Customizable using configurations for: "full width:, "centered".
43+
* Customizable using configurations for: "full width", "centered".
4444
* Taxonomies and posts RSS.
4545
* Responsive tested on desktop and on smart phones.
4646
* Responsive menus for desktop and mobile screens.
@@ -66,9 +66,79 @@ tested as I don't use them myself:
6666
Installation
6767
------------
6868

69-
Follows the same steps for installing and updating a Hugo theme such as this
70-
link for installing and updating PaperMode theme
71-
[adityatelange/hugo-PaperMod/wiki/Installation][6].
69+
Follow the steps in any one of these methods to install or update a Hugo
70+
theme.
71+
72+
### Method - Using hugo mod
73+
74+
Add hugo-xterm theme as Hugo module to hide the theme content and let you
75+
focus only on your site content. Let Hugo handle the theme updates
76+
automatically and control the theme as a Hugo module instead of git.
77+
78+
```bash
79+
cd <your-site-directory>
80+
81+
# initialize your site as a hugo module.
82+
hugo mod init <your-repo-host/your-username/your-site-repo>
83+
84+
# import hugo-xterm theme as hugo module in configuration
85+
$ cat config/_default/config.toml
86+
[module]
87+
[[module.imports]]
88+
path = "github.com/manid2/hugo-xterm"
89+
90+
# update theme
91+
hugo mod get -u
92+
```
93+
94+
For all below methods your site needs to point to hugo-xterm theme
95+
subdirectory in configuration as below:
96+
97+
```bash
98+
$ cat config/_default/config.toml
99+
theme = "hugo-xterm"
100+
```
101+
102+
### Method - Download and copy theme
103+
104+
Download the archived (i.e. .zip or tar.gz) theme from github repository
105+
releases page. Extract and copy the contents into `themes/hugo-xterm`
106+
subdirectory in your site directory.
107+
108+
To update the theme just download a new release and overwrite the same
109+
subdirectory.
110+
111+
This method is simple, can be automated with script and saves space on disk by
112+
omitting the theme repository history.
113+
114+
### Method - Using git clone
115+
116+
This method clones the theme repository with history into your site's themes
117+
subdirectory which is useful if you want to control the history or make your
118+
own private modifications to the theme.
119+
120+
```bash
121+
cd <your-site-directory>
122+
git clone https://github.com/manid2/hugo-xterm themes/hugo-xterm --depth=1
123+
124+
# update theme
125+
cd themes/hugo-xterm
126+
git pull
127+
```
128+
129+
### Method - Using git submodule
130+
131+
This is similar to cloning the theme into subdirectory except using git
132+
submodule which makes the theme acts a dependency of your site repository. It
133+
lets git to control your site and its dependency this theme.
134+
135+
```bash
136+
git submodule add --depth=1 https://github.com/manid2/hugo-xterm \
137+
themes/hugo-xterm
138+
139+
# update theme
140+
git submodule update --remote --merge
141+
```
72142

73143
Local development
74144
-----------------
@@ -106,7 +176,6 @@ License
106176
[3]: https://github.com/kaitlinmctigue/kaitlinmctigue.github.io
107177
[4]: https://github.com/hakimel/reveal.js
108178
[5]: https://wave.webaim.org/
109-
[6]: https://github.com/adityatelange/hugo-PaperMod/wiki/Installation
110179
[8]: https://en.wikipedia.org/wiki/HSL_and_HSV
111180
[9]: https://github.com/alecthomas/chroma/
112181
[10]: https://manid2.gitlab.io/cv/

0 commit comments

Comments
 (0)