Skip to content

Commit

Permalink
📄 README.md update
Browse files Browse the repository at this point in the history
  • Loading branch information
colinwilson committed Aug 3, 2023
1 parent 5e01797 commit a70e577
Showing 1 changed file with 88 additions and 4 deletions.
92 changes: 88 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Check out the demo site [https://lotusdocs.dev/docs](https://lotusdocs.dev/docs)
* [x] Static Search plugin option (powered by [FlexSearch](https://github.com/nextapps-de/flexsearch), enabled by default)
* [x] Support for [DocSearch](https://docsearch.algolia.com/)
* [x] Custom shortcodes (PrismJS, Alerts, Tabs, Tables)
* [ ] Analytics ([Google Analytics v4](https://analytics.google.com/analytics/web/), [Plausible Analytics](https://plausible.io/))
* [x] Analytics ([Google Analytics v4](https://analytics.google.com/analytics/web/), [Plausible Analytics](https://plausible.io/))
* [ ] [Open Graph](https://ogp.me/)
* [ ] [Mermaid](https://mermaid.js.org/) Support
* [ ] Math equations powered by [KaTeX](https://katex.org/)
Expand All @@ -38,12 +38,96 @@ Check out the demo site [https://lotusdocs.dev/docs](https://lotusdocs.dev/docs)

### Requirements

Hugo **Extended** (minimum version: 0.100.0)
- Hugo **Extended** (minimum version: 0.100.0)
- git
- Go (minimum version v1.19)

Default Markdown parser library `Goldmark`
### Getting started

The Lotus Docs theme can installed using one of the following methods:

- As a Hugo Module[^1]
- As a Git submodule
- Clone the theme files locally

### Initialize your site as a Hugo Module

The Lotus Docs theme makes use of the [Hugo Bootstrap Module](https://github.com/gohugoio/hugo-mod-bootstrap-scss). For this reason, it's necessary to initialize your site as a Hugo Module. If your site isn't already, use the `hugo mod init` command to initialize your site as a module:

```bash
hugo mod init github.com/<user>/<your-hugo-theme-name>
```

### Install as a Hugo Module

Now, edit the `hugo.toml` configuration file to include the [Lotus Docs theme](https://github.com/colinwilson/lotusdocs) and the [Hugo Bootstrap module](https://github.com/gohugoio/hugo-mod-bootstrap-scss) as modules:

```toml
baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'

[module]
# this is needed when you add the theme as a submodule to your repo.
# replacements = "github.com/colinwilson/lotusdocs -> themes/lotusdocs"
[[module.imports]]
path = "github.com/colinwilson/lotusdocs"
disable = false
[[module.imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
```

### Install as a Git Submodule

From the root of your project run the following `git` commands:

```bash
git init
git submodule add https://github.com/colinwilson/lotusdocs themes/lotusdocs
```

Edit the `hugo.toml` config file:

```toml
baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'

[module]
[[module.imports]]
path = "lotusdocs"
disable = false
[[module.imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
```

### Install Locally

There may be cases where you prefer to customize and maintain the Lotus Docs theme yourself. In such cases, use `git` to clone the theme into the `themes/lotusdocs` directory:

```bash
git clone https://github.com/colinwilson/lotusdocs themes/lotusdocs
```

Edit the `hugo.toml` config file:

```toml
baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'

[module]
[[module.imports]]
path = "lotusdocs"
disable = false
[[module.imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
```

## Author

[Colin Wilson](https://github.com/colinwilson)

Copyright © 2022-2023 [Colin Wilson](https://github.com/colinwilson)
Copyright © 2022-2023 [Colin Wilson](https://github.com/colinwilson)

[^1]: [Hugo Modules](https://gohugo.io/hugo-modules/)

0 comments on commit a70e577

Please sign in to comment.