Skip to content

Commit

Permalink
docs: Website build improvements (keptn#798)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Schrottner <[email protected]>
  • Loading branch information
aepfli committed Feb 9, 2023
1 parent d19b533 commit 003bf82
Show file tree
Hide file tree
Showing 5 changed files with 83 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
37 changes: 37 additions & 0 deletions docs/content/en/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
+++
title = "Home"

+++

{{< 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 >}}


{{% 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/aepfli/lifecycle-toolkit-docs v0.0.0-20230203105145-39f38b0bedb9 // 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 003bf82

Please sign in to comment.