diff --git a/README.md b/README.md index 582fd65..0dc1212 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ ### DEMO - https://hugo-terminal.now.sh/ -Buy Me A Coffee - --- - [Features](#features) @@ -29,6 +27,7 @@ - [**Fira Code**](https://github.com/tonsky/FiraCode) as default monospaced font. It's gorgeous! - **really nice duotone**, custom syntax highlighting based on [**PrismJS**](https://prismjs.com) - fully responsive +- fully based on Hugo ecosystem (Pipes and Modules) #### Built-in shortcodes @@ -84,19 +83,31 @@ A custom syntax highlighting based on PrismJS. All you need to do is to wrap you You can download the theme manually by going to [https://github.com/panr/hugo-theme-terminal.git](https://github.com/panr/hugo-theme-terminal.git) and pasting it to `themes/terminal` in your root directory. -You can also clone it directly to your Hugo folder: +### Install theme as Hugo Module + +``` +hugo mod get github.com/panr/hugo-theme-terminal@module +``` + +Please keep in mind that for the time of testing the theme is available as a module only from `module` branch. After testing period (fall, 2022), the module will be available on `master` branch by default. + +### Install theme locally ``` git clone https://github.com/panr/hugo-theme-terminal.git themes/terminal ``` -If you don't want to make any radical changes, it's the best option, because you can get new updates when they are available. You can also include it as a git submodule: +This will clone the repository directly to the `themes/terminal` directory. + +### Install theme as a submodule ``` git submodule add -f https://github.com/panr/hugo-theme-terminal.git themes/terminal ``` -⚠️ **The theme needs at least Hugo version 0.74.x**. +This will install the repository as a sumbodule in the `themes/terminal` directory. + +⚠️ **The theme needs at least Hugo version 0.100.x**. ## How to run your site @@ -204,6 +215,14 @@ paginate = 5 identifier = "showcase" name = "Showcase" url = "/showcase" + +[module] + # In case you would like to make changes to the theme and keep it locally in you repository, + # uncomment the line below (and correct the local path if necessary). + # -- + # replacements = "github.com/panr/hugo-theme-terminal -> themes/terminal" +[[module.imports]] + path = 'github.com/panr/hugo-theme-terminal' ``` to `config.toml` file in your Hugo root directory and change params fields. In case you need, here's [a YAML version](https://gist.github.com/panr/9eeea6f595c257febdadc11763e3a6d1). @@ -226,34 +245,6 @@ If you have to override only some of the styles, you can do this easily by addin To change something directly in the theme, you have to go to `themes/terminal` and modify the files. -First, you need to install Node dependencies. To do so, go to the theme directory (from your Hugo root directory): - -```bash - cd themes/terminal -``` - - then run: - - ```bash - npm install - npm i yarn - yarn - ``` - -After you modified the files you can run webpack in watch mode: - -```bash -yarn dev -``` - -or rebuild theme - -```bash -yarn build -``` - -To see the changes (remember to restart `hugo server`). - ## Found a bug? If you spot any bugs, please use [Issue Tracker](https://github.com/panr/hugo-theme-terminal/issues) or create a new [Pull Request](https://github.com/panr/hugo-theme-terminal/pulls) to fix the issue. @@ -279,14 +270,9 @@ Sounds OK? Cool, let's rock! 🤘 I'd be happy to know more about you and what you are doing. If you want to share it, please make a contribution and [add your site to the list](https://github.com/panr/hugo-theme-terminal/blob/master/USERS.md)! 🤗 -## Sponsoring - -If you like my work and want to support the development of the project, now you can! Just: - -Buy Me A Coffee ## License -Copyright © 2019-2020 Radosław Kozieł ([@panr](https://twitter.com/panr)) +Copyright © 2019-2022 Radosław Kozieł ([@panr](https://twitter.com/panr)) The theme is released under the MIT License. Check the [original theme license](https://github.com/panr/hugo-theme-terminal/blob/master/LICENSE.md) for additional licensing information.