diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml deleted file mode 100644 index 170a1c3b6d..0000000000 --- a/.github/workflows/release-docs.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Release Documentation - -on: - workflow_call: - inputs: - tag_name: - description: "Tag for the functions runner image" - type: "string" - required: true - page_dir: - description: "Root directory of the website" - type: "string" - required: false - default: "./tmp/page/" - docs_dir: - description: "Sub directory of documentation" - type: "string" - required: false - default: "./docs" - dry_run: - description: "Flag for testing" - type: "boolean" - default: false - required: false - -jobs: - release-docs: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Checkout - page branch - uses: actions/checkout@v3 - with: - ref: "page" - path: ${{ inputs.page_dir }} - token: ${{ secrets.KEPTN_BOT_TOKEN }} - - - name: Get Latest Release Information - uses: octokit/request-action@v2.x - id: latest_release - with: - route: GET /repos/:owner/:repository/releases/latest - repository: lifecycle-toolkit - owner: keptn - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Detect needed Folder Operations - id: folder - run: | - CURRENT_VERSION=`cat ${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/docs/version || echo "unknown"` - echo $CURRENT_VERSION - if [[ "${{ fromJson(steps.latest_release.outputs.data).tag_name }}" == "${{ inputs.tag_name }}" ]]; then - if [[ "${{ fromJson(steps.latest_release.outputs.data).tag_name }}" != "$CURRENT_VERSION" ]]; then - echo "migrate=docs-$CURRENT_VERSION" >> $GITHUB_OUTPUT - fi - echo "name=docs" >> $GITHUB_OUTPUT - echo "latest=true" >> $GITHUB_OUTPUT - else - echo "name=docs-${{ inputs.tag_name }}" >> $GITHUB_OUTPUT - fi - - - name: Move old latest release documentation folder - if: ${{steps.folder.outputs.migrate }} - run: | - cp -R \ - "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/docs/." \ - "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.migrate }}" - - - name: Copy configuration - if: ${{steps.folder.outputs.latest }} - run: | - cp -R ./docs/. "${{ inputs.page_dir }}${{ inputs.docs_dir }}" - - - name: Copy documentation folder - run: | - cp -R ./docs/content/en/docs/. "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.name}}" - echo "${{ inputs.tag_name }}" > "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.name}}/version" - - - name: Push content - if: ${{ inputs.dry_run != true }} - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions - cwd: ${{ inputs.page_dir }} - message: "releasing documentation ${{ inputs.tag_name }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a827944f18..d1ef684f5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -204,7 +204,7 @@ jobs: if: needs.release-please.outputs.releases_created == 'true' with: tag_name: ${{ needs.release-please.outputs.tag_name }} - uses: ./.github/workflows/release-docs.yml + uses: keptn/docs-tooling/.github/workflows/release-docs.yml@v0.0.2-beta1 secrets: inherit update-examples: diff --git a/docs/.htmltest.yml b/docs/.htmltest.yml index 20ba2d0712..0d6dfadc76 100644 --- a/docs/.htmltest.yml +++ b/docs/.htmltest.yml @@ -7,7 +7,4 @@ IgnoreDirs: IgnoreURLs: - "linkedin.com" - "localhost" - # our edit links in the sidebar might not work for newly created pages - - "github.com/keptn/lifecycle-toolkit/tree/main" - - "github.com/keptn/lifecycle-toolkit/edit/main" StripQueryString: false diff --git a/docs/README.md b/docs/README.md index 15de73def7..d31e01a016 100644 --- a/docs/README.md +++ b/docs/README.md @@ -85,5 +85,5 @@ This is important so we do know which version it contains - specifically importa `Docsy` offers a mechanism to build a version menu based on Hugo's configuration. We extended this mechanism and enhanced it with a check for directories starting with `docs` and containing a `version` file. -For more details inspect the [layout file with adaptions](layouts/partials/navbar-version-selector.html). +For more details inspect [our theme with a layout file with adaptations](https://github.com/keptn/docs-tooling). This way we do not need to adapt the configuration all the time we are releasing a new version. diff --git a/docs/config/_default/config.yaml b/docs/config/_default/config.yaml index 8658f3a01f..598b9c4238 100644 --- a/docs/config/_default/config.yaml +++ b/docs/config/_default/config.yaml @@ -18,8 +18,6 @@ module: target: assets - source: archetypes target: archetypes - - source: content/en/_index.md - target: content/en/_index.md proxy: direct languages: en: diff --git a/docs/config/_default/params.yaml b/docs/config/_default/params.yaml index f053dbf387..a495c4d8da 100644 --- a/docs/config/_default/params.yaml +++ b/docs/config/_default/params.yaml @@ -11,6 +11,12 @@ versions: - url: https://lifecycle.keptn.sh/docs version: latest - mermaid: enable: true + +links: + developer: + - desc: Development takes place here! + icon: fab fa-github + name: Keptn Lifecycle Toolkit GitHub Repository + url: https://github.com/keptn/lifecycle-toolkit diff --git a/docs/content/en/_index.md b/docs/content/en/_index.md index d4511e93c7..229f32f66f 100644 --- a/docs/content/en/_index.md +++ b/docs/content/en/_index.md @@ -1,5 +1,15 @@ --- title: Home +cascade: + - _target: + path: "/docs/**" + sitemap: + priority: 1.0 + + - _target: + path: "/docs-*/**" + sitemap: + priority: 0.1 --- diff --git a/docs/go.mod b/docs/go.mod index 030dccb2c9..cc6846f5af 100644 --- a/docs/go.mod +++ b/docs/go.mod @@ -4,5 +4,5 @@ go 1.19 require ( github.com/google/docsy/dependencies v0.6.0 // indirect - github.com/keptn/docs-tooling v0.0.1 // indirect + github.com/keptn/docs-tooling v0.1.1 // indirect ) diff --git a/docs/go.sum b/docs/go.sum index a2d5d4a360..45f9543ee2 100644 --- a/docs/go.sum +++ b/docs/go.sum @@ -1,6 +1,6 @@ github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= github.com/google/docsy/dependencies v0.6.0 h1:BFXDCINbp8ZuUGl/mrHjMfhCg+b1YX+hVLAA5fGW7Pc= github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE= -github.com/keptn/docs-tooling v0.0.1 h1:J9OvIp1Xhkwpp4aiIZ0sKzEeoMY5CsWhfkQv8ruxlwA= -github.com/keptn/docs-tooling v0.0.1/go.mod h1:6nzm4ykIXyoxsJo3gFsaNWbpycj4pG03lOwE3x927eo= +github.com/keptn/docs-tooling v0.1.1 h1:IuI0Fgs0JrtffLN05iaRZVkRMbPu6h9bxR4C8q1ApGU= +github.com/keptn/docs-tooling v0.1.1/go.mod h1:x0iT5YsJosz6wzjQke/YaLgiXF6PV+N8QzxSAc2MY/4= github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/docs/layouts/_default/_markup/render-link.html b/docs/layouts/_default/_markup/render-link.html deleted file mode 100644 index 89d0b0d33d..0000000000 --- a/docs/layouts/_default/_markup/render-link.html +++ /dev/null @@ -1,13 +0,0 @@ -{{- if or (strings.HasPrefix .Destination "http") (strings.HasPrefix .Destination "#") -}} -{{ .Text | safeHTML }} -{{- else -}} -{{- $link := . -}} -{{- $internal := urls.Parse .Destination -}} -{{- if $internal.Path -}} -{{- $fragment := "" }} -{{- with $internal.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}} -{{- with .Page.GetPage $internal.Path }}{{ $internal = printf "%s%s" .RelPermalink $fragment }} -{{ $link.Text | safeHTML }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/docs/layouts/partials/navbar-version-selector.html b/docs/layouts/partials/navbar-version-selector.html deleted file mode 100644 index 4dba1b7b9b..0000000000 --- a/docs/layouts/partials/navbar-version-selector.html +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/docs/static/google90258e79df368ea0.html b/docs/static/google90258e79df368ea0.html new file mode 100644 index 0000000000..f5fc5c5f1a --- /dev/null +++ b/docs/static/google90258e79df368ea0.html @@ -0,0 +1 @@ +google-site-verification: google90258e79df368ea0.html