diff options
author | Varun A P <varunlakshmananap@gmail.com> | 2022-01-06 23:35:00 +0300 |
---|---|---|
committer | Varun A P <varunlakshmananap@gmail.com> | 2022-01-06 23:35:00 +0300 |
commit | d84e2e86b9aaad1dd8056dd5f160b73423c995f0 (patch) | |
tree | 1947a228f987a68cdbc5a3fe91094c909cdb6c92 | |
parent | a5a56ef533a24737d1ef41ce9c299741e7ace4be (diff) |
Update theme setup documentation
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | package.json | 6 |
2 files changed, 16 insertions, 2 deletions
@@ -33,7 +33,7 @@ Alternatively, you can include this repository as a [git submodule](https://git- git submodule add https://github.com/apvarun/showcase-hugo-theme.git themes/showcase ``` -## Preview the theme +## Preview the theme with example content Showcase theme ships with an fully configured example site. For a quick preview: @@ -46,6 +46,16 @@ hugo serve --themesDir ../.. Then visit `http://localhost:1313/` in your browser to view the example site. +## Configuring theme to a hugo website + +1. Copy `package.json` and `package-lock.json` to the root folder of your the website +2. Run `npm install` to install required packages for theme +3. Run `npm i -g postcss-cli` to use PostCSS with Hugo build +4. Set `theme = 'showcase'` in config.toml +5. Run `npm start` to start your local server + +Make sure to commit the above changes to your repository. + When deploying to services like Netlify or Vercel, use the following command for building your site: ```sh diff --git a/package.json b/package.json index bf7f61c..0ccd1bf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,11 @@ "name": "showcase-hugo-theme", "version": "1.3.0", "description": "Showcase is a minimal, single page theme for Hugo", - "scripts": {}, + "scripts": { + "start": "hugo server --disableFastRender", + "start-examplesite": "hugo server -s exampleSite --themesDir=../.. --disableFastRender", + "build": "NODE_ENV=production hugo --gc" + }, "repository": { "type": "git", "url": "git+https://github.com/apvarun/showcase-hugo-theme.git" |