Update preview build to show latest instead of all versions

Signed-off-by: lucperkins <lucperkins@gmail.com>
This commit is contained in:
lucperkins
2019-04-04 13:48:05 -07:00
committed by Torin Sandall
parent 798d86c075
commit 87179879d7
4 changed files with 17 additions and 27 deletions
+11 -3
View File
@@ -8,10 +8,19 @@ setup:
npm install
serve:
hugo server \
ENV=local hugo server \
--buildDrafts \
--buildFuture
docker-serve:
docker run --rm -it \
-v $(PWD):/src \
-p 1313:1313 \
-e ENV=local \
klakegg/hugo:0.53-ext server \
--buildDrafts \
--buildFuture
production-build: clean load-docs
hugo \
--contentDir generated \
@@ -19,11 +28,10 @@ production-build: clean load-docs
--minify
preview-build: clean load-docs
hugo \
ENV=local hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture \
--contentDir generated \
--ignoreCache \
--minify
+1 -19
View File
@@ -29,12 +29,7 @@ npm install
Then, if [Docker is running](https://docs.docker.com/get-started/):
```bash
docker run --rm -it \
-v $(PWD):/src \
-p 1313:1313 \
klakegg/hugo:0.53-ext server \
--buildDrafts \
--buildFuture
make docker-server
```
Open your browser to http://localhost:1313 to see the site running locally. The docs
@@ -98,19 +93,6 @@ The OPA site is automatically published using [Netlify](https://netlify.com). Wh
changes in this directory are pushed to `master`, the site will be re-built and
re-deployed.
### OPA version changes
The current OPA version displayed in the documentation is set in the
[`config.toml`](./config.toml) configuration file. Look for this in the file:
```toml
[params.versions]
latest = "..."
```
Change the value of `latest` and commit that change to `master` to change the displayed
version in the docs.
## Checking links
To check the site's links, first install the [`htmlproofer`](https://github.com/gjtorikian/html-proofer) Ruby gem:
+1 -1
View File
@@ -1,4 +1,4 @@
{{ $localMode := site.IsServer }}
{{ $localMode := eq (getenv "ENV") "local" }}
{{ $docsHome := .CurrentSection }}
{{ $allDocs := where site.RegularPages "Section" "docs" }}
{{ $docs := where $allDocs ".Params.kind" "eq" "documentation" }}
+4 -4
View File
@@ -1,4 +1,4 @@
{{ $localMode := site.IsServer }}
{{ $localMode := eq (getenv "ENV") "local" }}
{{ $title := site.Title }}
{{ $description := site.Params.description }}
{{ $tagline := site.Params.tagline }}
@@ -41,7 +41,7 @@
<title>
{{ .Name }}
</title>
<use xlink:href="#social-icon--{{ lower .Name }}"/>
<use xlink:href="#social-icon--{{ lower .Name }}" />
</svg>
</a>
</li>
@@ -64,7 +64,7 @@
</a>
<a id="headline--learn-more" href="{{ $docs }}" rel="help">
Learn more
Learn more
</a>
</p>
</div>
@@ -72,4 +72,4 @@
<div class="headline--wave--bg" role="presentation"></div>
<div class="headline--wave--fg" role="presentation"></div>
</div>
</header>
</header>