Skip to content

Commit

Permalink
docs: website build improvements (#806)
Browse files Browse the repository at this point in the history
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
  • Loading branch information
aepfli and thisthat committed Feb 21, 2023
1 parent c366739 commit 03ce732
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 10 deletions.
4 changes: 4 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.hugo_build.lock
resources/_gen
public
go.sum
16 changes: 6 additions & 10 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
DOCREPO := github.com/keptn-sandbox/lifecycle-toolkit-docs
TMPDIR := $(CURDIR)/tmp
VOLUMES := -v $(TMPDIR)/lifecycle-toolkit-docs:/src -v $(CURDIR)/content/en/docs:/src/content/en/docs-dev
VOLUMES := -v $(CURDIR):/src
# renovate: datasource=docker depName=klakegg/hugo
HUGO_VERSION := 0.105.0-ext
IMAGE := klakegg/hugo:$(HUGO_VERSION)
PORT := 1314

.PHONY: build server clean htmltest

clone:
@rm -rf $(TMPDIR)/lifecycle-toolkit-docs | true
@mkdir -p $(TMPDIR)/lifecycle-toolkit-docs
@git clone https://$(DOCREPO) $(TMPDIR)/lifecycle-toolkit-docs
.PHONY: build server clean shell htmltest

build:
docker run --rm -it $(VOLUMES) $(IMAGE) -D -v

shell:
docker run --rm -it $(VOLUMES) $(IMAGE) shell

server:
docker run --rm -it $(VOLUMES) -p $(PORT):$(PORT) $(IMAGE) server -D -p $(PORT)

clean:
docker run --rm -it $(VOLUMES) $(IMAGE) --cleanDestinationDir

htmltest: clone build
htmltest: build
docker run -v $(CURDIR):/test --rm wjdp/htmltest -s /test/tmp/lifecycle-toolkit-docs/public
26 changes: 26 additions & 0 deletions docs/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
_merge: deep
module:
imports:
- path: github.com/keptn-sandbox/lifecycle-toolkit-docs
ignoreConfig: false
mounts:
- source: static
target: static
- source: layouts
target: layouts
- source: data
target: data
- source: assets
target: assets
- source: archetypes
target: archetypes
- source: content/en/_index.md
target: content/en/_index.md
proxy: direct

params:
versions:
- url: /docs/
version: development
- url: https://lifecycle.keptn.sh
version: production
38 changes: 38 additions & 0 deletions docs/content/en/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
+++
title = "Home"

+++

<!-- markdownlint-disable MD033 -->
<!-- markdownlint-disable-next-line MD013 -->
{{< blocks/cover title="Welcome to the Keptn Lifecycle Toolkit Documentation" image_anchor="top" height="half" color="primary" >}}
<div class="mx-auto">
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
Docs <i class="fas fa-arrow-alt-circle-right ml-2"></i>
</a>
<a class="btn btn-lg btn-primary mr-3 mb-4" href="https://github.com/keptn/lifecycle-toolkit/releases">
Releases <i class="fab fa-github ml-2 "></i>
</a>
</div>
{{< /blocks/cover >}}
<!-- markdownlint-enable MD033 -->

{{% blocks/lead color="white" %}}
[![Keptn Lifecycle Toolkit in a Nutshell](https://img.youtube.com/vi/K-cvnZ8EtGc/0.jpg)](https://www.youtube.com/watch?v=K-cvnZ8EtGc)
{{% /blocks/lead %}}

{{< blocks/section color="dark" >}}
{{% blocks/feature icon="fa-lightbulb" title="Keptn Recordings" %}}
See Keptn [in Action](https://youtube.com/playlist?list=PL6i801Rjt9DbikPPILz38U1TLMrEjppzZ)
{{% /blocks/feature %}}

{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/keptn/lifecycle-toolkit" %}}
We do a [Pull Request](https://github.com/keptn/lifecycle-toolkit/pulls) contributions workflow on **GitHub**.
New users are always welcome!
{{% /blocks/feature %}}

{{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/keptnProject" %}}
For announcement of latest features etc.
{{% /blocks/feature %}}

{{< /blocks/section >}}
10 changes: 10 additions & 0 deletions docs/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/keptn/keptn-lifecycle-toolkit/docs

go 1.19

require github.com/keptn-sandbox/lifecycle-toolkit-docs v0.0.0-20230209144724-01b35a6cfc44 // indirect=

require (
github.com/google/docsy/dependencies v0.6.0 // indirect
github.com/keptn-sandbox/lifecycle-toolkit-docs v0.0.0-20230209144724-01b35a6cfc44 // indirect
)

0 comments on commit 03ce732

Please sign in to comment.