Skip to content

Commit

Permalink
fix: utilize hugo.WorkingDir for a reliable edit page link
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys committed Jul 11, 2023
1 parent a56c244 commit f3e12d6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
NPM_CONFIG_LOGLEVEL: error

- name: testbuild
image: thegeeklab/hugo:0.114.0
image: thegeeklab/hugo:0.115.2
commands:
- mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/hugo-geekdoc
- hugo --panicOnWarning -s exampleSite/ -b http://localhost:8000/
Expand Down Expand Up @@ -173,7 +173,7 @@ steps:
- refs/pull/**

- name: build
image: thegeeklab/hugo:0.114.0
image: thegeeklab/hugo:0.115.2
commands:
- hugo --panicOnWarning -s exampleSite/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Geekdoc

[![Build Status](https://img.shields.io/drone/build/thegeeklab/hugo-geekdoc?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/hugo-geekdoc)
[![Hugo Version](https://img.shields.io/badge/hugo-0.93-blue.svg)](https://gohugo.io)
[![Hugo Version](https://img.shields.io/badge/hugo-0.112-blue.svg)](https://gohugo.io)
[![GitHub release](https://img.shields.io/github/v/release/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/releases/latest)
[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/graphs/contributors)
[![License: MIT](https://img.shields.io/github/license/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/blob/main/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ geekdocAnchor: false
<!-- markdownlint-disable MD033 -->

<span class="badge-placeholder">[![Build Status](https://img.shields.io/drone/build/thegeeklab/hugo-geekdoc?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/hugo-geekdoc)</span>
<span class="badge-placeholder">[![Hugo Version](https://img.shields.io/badge/hugo-0.93-blue.svg)](https://gohugo.io)</span>
<span class="badge-placeholder">[![Hugo Version](https://img.shields.io/badge/hugo-0.112-blue.svg)](https://gohugo.io)</span>
<span class="badge-placeholder">[![GitHub release](https://img.shields.io/github/v/release/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/releases/latest)</span>
<span class="badge-placeholder">[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/graphs/contributors)</span>
<span class="badge-placeholder">[![License: MIT](https://img.shields.io/github/license/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/blob/main/LICENSE)</span>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/page-header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ $geekdocRepo := default (default false .Site.Params.geekdocRepo) .Page.Params.geekdocRepo }}
{{ $geekdocEditPath := default (default false .Site.Params.geekdocEditPath) .Page.Params.geekdocEditPath }}
{{ if .File }}
{{ $.Scratch.Set "geekdocFilePath" (default (path.Join (default "content" .Site.Params.contentDir) .File.Path) .Page.Params.geekdocFilePath) }}
{{ $.Scratch.Set "geekdocFilePath" (default (strings.TrimPrefix hugo.WorkingDir .File.Filename) .Page.Params.geekdocFilePath) }}
{{ else }}
{{ $.Scratch.Set "geekdocFilePath" false }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Hugo theme made for documentation"
homepage = "https://geekdocs.de/"
demosite = "https://geekdocs.de/"
tags = ["docs", "documentation", "responsive", "simple"]
min_version = "0.93.0"
min_version = "0.112.0"

[author]
name = "Robert Kaussow"
Expand Down

0 comments on commit f3e12d6

Please sign in to comment.