Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
victoriadrake authored Apr 30, 2022
1 parent 4728f30 commit 248b48b
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ Focused on content and typography, the stylized index page is really just a list

## Requirements

### General

Requires the **extended** version of Hugo. You can find [installation instructions here](https://gohugo.io/getting-started/installing/) (latest version recommended). Here's a handy [Bash function for downloading a specific Hugo version](https://victoria.dev/blog/how-to-do-twice-as-much-with-half-the-keystrokes-using-.bashrc/#bash-function-for-downloading-extended-hugo).

Extended Hugo's [PostCSS](https://gohugo.io/hugo-pipes/postcss/) requires JavaScript packages to compile the styles for this theme. If you're seeing an error like this:
Expand All @@ -55,27 +53,25 @@ cd exampleSite/
npm i postcss postcss-cli autoprefixer
```

### Only when using theme as hugo module:

Go language needs to be installed (version >= 1.12), download Go installer [here](https://go.dev/dl/)

## 1. Get the theme

### Route 1 (recommended): use theme as hugo module
### Use the theme as hugo module

Turn your new or existing site into a hugo module by issuing this command from site root:
1. Ensure that Go is installed (version >= 1.12). Download the Go installer [here](https://go.dev/dl/).

```sh
hugo mod init github.com/me/my-sam-based-site
```
2. Turn your new or existing site into a hugo module by issuing this command from site root:

- Declare the `sam` theme module as a dependency of your site:
```sh
hugo mod init github.com/me/my-sam-based-site
```

```
hugo mod get github.com/victoriadrake/hugo-theme-sam
```
3. Declare the `sam` theme module as a dependency of your site:

### Route 2 (traditional): install theme locally (git clone or submodule)
```sh
hugo mod get github.com/victoriadrake/hugo-theme-sam
```

### Use the theme locally with git clone or as a submodule

Run from the root of your Hugo site:

Expand All @@ -93,18 +89,19 @@ git submodule add https://github.com/victoriadrake/hugo-theme-sam.git themes/sam

From the exampleSite, copy `config.toml` to the root folder of your Hugo site. Inside this file, identify the `theme = ...` line.

### Route 1 (hugo module)
#### To configure as a Hugo module

Make sure the following line is uncommented in order to activate your theme as hugo module:

```
```toml
theme = "github.com/victoriadrake/hugo-theme-sam"
```
### Route 2 (theme cloned locally)

Make sure the following line is uncommented in order to activate your theme as hugo module:
#### To configure a local theme

```
Make sure the following line is uncommented:

```toml
theme = "sam"
```

Expand Down Expand Up @@ -251,11 +248,11 @@ If you have a question or get stuck, please [open an issue](https://github.com/v
Pull requests for bug fixes and enhancements are welcome! Please ensure you first read about [contributing](CONTRIBUTING.md) to this project.
Open source themes like this one would not be possible without some amazing __[contributors](https://github.com/victoriadrake/hugo-theme-sam/graphs/contributors)__. Thank you!
Open source themes like this one would not be possible without some amazing **[contributors](https://github.com/victoriadrake/hugo-theme-sam/graphs/contributors).** Thank you!
## License
Copyright (C) 2018-2021 [Victoria Drake](https://victoria.dev/)
Copyright (C) 2018-2022 [Victoria Drake](https://victoria.dev/)
Licensed under the [Apache License, Version 2.0](https://github.com/victoriadrake/hugo-theme-sam/blob/master/LICENSE) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).
Expand Down

0 comments on commit 248b48b

Please sign in to comment.