Skip to content

Commit

Permalink
doc: Highlight links to other doc versions (#1983)
Browse files Browse the repository at this point in the history
  • Loading branch information
trisyoungs authored Oct 17, 2024
1 parent 2c07de1 commit ac46289
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 36 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
nixOSVersion:
type: string
default: 22.11
hugoVersion:
type: string
default: "0.135.0"
conanfile:
type: string
default: cmake/Modules/conan-dissolve.cmake
Expand All @@ -26,6 +29,7 @@ runs:
echo "qtVersion=${{ inputs.qtVersion }}" >> ${GITHUB_ENV}
echo "nixVersion=${{ inputs.nixVersion }}" >> ${GITHUB_ENV}
echo "nixOSVersion=${{ inputs.nixOSVersion }}" >> ${GITHUB_ENV}
echo "hugoVersion=${{ inputs.hugoVersion }}" >> ${GITHUB_ENV}
- name: Get code version
shell: bash
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/website/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Website
description: Build and publish website

inputs:
hugoVersion:
default: "0.98.0"
isRelease:
type: boolean
default: false
Expand Down Expand Up @@ -32,17 +30,18 @@ runs:
if: ${{ inputs.isRelease == 'true' && inputs.isLegacy == 'false' }}
shell: bash
run: |
# Set version in docs index
sed -i 's/vMAJOR.MINOR/Release v${{ env.dissolveMajorVersion }}.${{ env.dissolveMinorVersion }}/g' web/docs/_index.md
# Set version and tip visibility in docs index
sed -i 's/RELEASETYPE version MAJOR.MINOR/Release v${{ env.dissolveMajorVersion }}.${{ env.dissolveMinorVersion }}/g' web/docs/_index.md
sed -i "/RELEASE TIP/d" web/docs/_index.md
head -n 10 web/docs/_index.md
- name: 'Apply Development Release Styling'
if: ${{ inputs.isDevelopment == 'true' }}
shell: bash
run: |
# Set version and shortcode target in docs index
sed -i 's/vMAJOR.MINOR/Development v${{ env.dissolveMajorVersion }}.${{ env.dissolveMinorVersion }}/g' web/docs/_index.md
sed -i 's/documentationinfo target=".*"/documentationinfo target="development"/g' web/docs/_index.md
# Set version and tip visibility in docs index
sed -i 's/RELEASETYPE version MAJOR.MINOR/Development version ${{ env.dissolveMajorVersion }}.${{ env.dissolveMinorVersion }}/g' web/docs/_index.md
sed -i "/DEVELOPMENT TIP/d" web/docs/_index.md
head -n 10 web/docs/_index.md
# Change base url
Expand All @@ -57,9 +56,9 @@ runs:
if: ${{ inputs.isLegacy == 'true' }}
shell: bash
run: |
# Set version and shortcode target in docs index
sed -i 's/vMAJOR.MINOR/Legacy v${{ env.dissolveMajorVersion }}.${{ env.dissolveMinorVersion }}/g' web/docs/_index.md
sed -i 's/documentationinfo target=".*"/documentationinfo target="legacy"/g' web/docs/_index.md
# Set version and tip visibility in docs index
sed -i 's/RELEASETYPE version MAJOR.MINOR/Legacy version ${{ env.dissolveMajorVersion }}.${{ env.dissolveMinorVersion }}/g' web/docs/_index.md
sed -i "/LEGACY TIP/d" web/docs/_index.md
head -n 10 web/docs/_index.md
# Change base url
Expand All @@ -74,7 +73,7 @@ runs:
shell: bash
run: |
set -ex
wget https://github.com/gohugoio/hugo/releases/download/v${{ inputs.hugoVersion }}/hugo_extended_${{ inputs.hugoVersion }}_Linux-64bit.deb -O '${{ github.workspace }}/hugo.deb'
wget https://github.com/gohugoio/hugo/releases/download/v${{ env.hugoVersion }}/hugo_extended_${{ env.hugoVersion }}_linux-amd64.deb -O '${{ github.workspace }}/hugo.deb'
sudo dpkg -i ${{ github.workspace }}/hugo*.deb
- name: 'Install pandoc / xetex'
Expand Down
1 change: 1 addition & 0 deletions web/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Git ignore file for dissolve-web/
public/*
public-docs/*
resources/*
static/img/*.svg
static/img/*.png
Expand Down
6 changes: 0 additions & 6 deletions web/docs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ github_subdir = "web"
github_branch = "develop"
offlineSearch = true

# Documentation Index Description
[params.docinfo]
release = "Here you can find the user guide and examples for the current release of Dissolve (vMAJOR.MINOR). Updated documentation for the current development version is [available here](/dev), and documentation for the previous release series can be [found here](/legacy)."
development = "Here you can find the user guide and examples for the current development version of Dissolve (vMAJOR.MINOR), describing any exciting and upcoming new features."
legacy = "Here you can find the user guide and examples for the previous major release series of Dissolve (vMAJOR.MINOR). This should be considered as legacy documentation and will be removed at some point."

# User interface configuration
[params.ui]
# Set to true to disable breadcrumb navigation.
Expand Down
10 changes: 7 additions & 3 deletions web/docs/_index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
---
title: "Documentation for vMAJOR.MINOR"
linkTitle: "Documentation (vMAJOR.MINOR)"
title: "Documentation for RELEASETYPE version MAJOR.MINOR"
linkTitle: "Documentation (RELEASETYPE version MAJOR.MINOR)"
cascade:
- type: "docs"
---

{{< documentationinfo target="release" >}}
Here you can find the user guide and examples for the RELEASETYPE version MAJOR.MINOR of Dissolve.

{{< tip text="Documentation for the current release version is [available here](/)" />}} <!-- RELEASE TIP -->
{{< tip text="Updated documentation for the current development version is [available here](/dev)" />}} <!-- DEVELOPMENT TIP -->
{{< tip text="Documentation for the most recent legacy relese series is [available here](/legacy)." />}} <!-- LEGACY TIP -->

## Copyright / Contributors

&copy; 2024 Team Dissolve and contributors
- Dr T. Youngs
- Dr A. Washington (January 2020 - present)
- Dr R. Buchanan (September 2023 - present)
- D. Nixon (January 2020 - present)
- D. Bradley (January 2023 - present)
- J. Swift (June 2023 - present)
Expand Down
5 changes: 4 additions & 1 deletion web/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ module github.com/disorderedmaterials/dissolve/web

go 1.18

require github.com/google/docsy v0.2.0 // indirect
require (
github.com/google/docsy v0.10.0 // indirect
github.com/google/docsy/dependencies v0.7.2 // indirect
)
8 changes: 8 additions & 0 deletions web/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20210804190922-7d3d774145ac/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.2.0 h1:DN6wfyyp2rXsjdV1K3wioxOBTRvG6Gg48wLPDso2lc4=
github.com/google/docsy v0.2.0/go.mod h1:shlabwAQakGX6qpXU6Iv/b/SilpHRd7d+xqtZQd3v+8=
github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg=
github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
github.com/google/docsy/dependencies v0.2.0/go.mod h1:2zZxHF+2qvkyXhLZtsbnqMotxMukJXLaf8fAZER48oo=
github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI=
github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
github.com/twbs/bootstrap v4.6.1+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
5 changes: 0 additions & 5 deletions web/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@
{{ partialCached "favicons.html" . }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partialCached "head-css.html" . }}
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
Expand Down
10 changes: 0 additions & 10 deletions web/layouts/shortcodes/documentationinfo.html

This file was deleted.

0 comments on commit ac46289

Please sign in to comment.