Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to most recent Hugo and Docsy #628

Merged
merged 1 commit into from
Nov 17, 2021
Merged

Update to most recent Hugo and Docsy #628

merged 1 commit into from
Nov 17, 2021

Conversation

dholbach
Copy link
Member

@dholbach dholbach commented Nov 17, 2021

Only partial which needed updating was page-meta-links.html (our diff is smaller now). Hugo updated its tweet shortcode syntax as well.

The diff can be seen here:

❯ diff -u {../docsy/,}layouts/partials/page-meta-links.html
--- ../docsy/layouts/partials/page-meta-links.html	2021-11-17 13:06:45.619795981 +0100
+++ layouts/partials/page-meta-links.html	2021-11-17 13:10:11.994037432 +0100
@@ -5,6 +5,7 @@
 {{ $gh_subdir := ($.Param "github_subdir") -}}
 {{ $gh_project_repo := ($.Param "github_project_repo") -}}
 {{ $gh_branch := (default "master" ($.Param "github_branch")) -}}
+{{ $importedDoc := $.Param "importedDoc" | default "false" }}
 <div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
 {{ if $gh_url -}}
   {{ warnf "Warning: use of `github_url` is deprecated. For details see https://www.docsy.dev/docs/adding-content/repository-links/#github_url-optional" -}}
@@ -37,9 +38,11 @@
   {{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}}
   {{ $newPageURL := printf "%s/new/%s?%s"  $gh_repo $gh_repo_path $newPageQS -}}
 
+  {{ if eq $importedDoc "false" }}
   <a href="{{ $viewURL }}" class="td-page-meta--view" target="_blank" rel="noopener"><i class="fa fa-file-alt fa-fw"></i> {{ T "post_view_this" }}</a>
   <a href="{{ $editURL }}" class="td-page-meta--edit" target="_blank" rel="noopener"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
   <a href="{{ $newPageURL }}" class="td-page-meta--child" target="_blank" rel="noopener"><i class="fa fa-edit fa-fw"></i> {{ T "post_create_child_page" }}</a>
+  {{ end }}
   <a href="{{ $issuesURL }}" class="td-page-meta--issue" target="_blank" rel="noopener"><i class="fab fa-github fa-fw"></i> {{ T "post_create_issue" }}</a>
   {{ with $gh_project_repo -}}
     {{ $project_issueURL := printf "%s/issues/new" . -}}

website on  update [?] via  v10.24.1 via 🐍 v3.8.10 
❯ 

	Only partial which needed updating is page-meta-links (diff is
	smaller now). Hugo updated its tweet shortcode syntax.

Signed-off-by: Daniel Holbach <daniel@weave.works>
Copy link
Member

@scottrigby scottrigby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works and looks good! Had to upgrade hugo locally and now all good 💯

@scottrigby scottrigby merged commit 34b8160 into fluxcd:main Nov 17, 2021
@dholbach dholbach deleted the update branch November 17, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants