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

Fix #261 #269

Merged
merged 2 commits into from May 8, 2019

Conversation

@VincentTam
Copy link
Contributor

commented Apr 25, 2019

Overview

This PR resolves #261 by replacing deprecated Hugo syntax with updated one.

hugo server's response to the current syntax

Building sites … WARN 2019/04/09 10:14:55 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
WARN 2019/04/09 10:14:55 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.
WARN 2019/04/09 10:14:55 Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like:
    {{ with .OutputFormats.Get "RSS" }}{{ . RelPermalink }}{{ end }}.

Message source: https://gist.github.com/chris-short/78582dc32f877d65eb388f832d2c1dfa

Changes implemented

  1. {{ .Hugo.Generator }}{{ hugo.Generator }}
  2. {{ .RSSLink }}{{ with .OutputFormats.Get "RSS" }}{{ . RelPermalink }}{{ end }}
  3. {{ .Hugo.Version }}{{ .Site.Hugo.Version }}
  4. {{ .URL }}
    • {{ .Permalink }} in "Older/Newer Posts", <meta> tag
    • {{ .RelPermalink }} in page's slug for Staticman

Quick guide to test this pull request

If you're using a theme as a Git submodule (as recommended in Hugo's official tutorial), you may create a new (local/GitLab/etc) (private) repo for this theme and run these commands to get this PR merged against a testing branch pr269 in the private repo. I denote the URL of this repo as the upstream.

$ git remote -v
upstream	https://github.com/halogenica/beautifulhugo.git (fetch)
upstream	https://github.com/halogenica/beautifulhugo.git (push)
... # other remote omitted
$ git checkout -b pr269 # test on a new branch pr269
$ git fetch upstream pull/269/head # git pull will be rejected
$ git merge FETCH_HEAD # manually merge the this PR against branch pr269
$ cd <your-blog>
... # edit your .gitmodules with url="<repo-containing-pr269>" and branch = "pr269"
$ git submodule sync # inform Git the changes in .gitmodules
$ git submodule update --remote --recursive # switch to the HEAD of your cloned repo for the theme

Related posts:

  1. My SO question
  2. .Hugo.Generator は廃止されるので hugo.Generator を使おう
  3. My Hugo Discourse question
  4. victoriadrake/hugo-theme-introduction#146
  5. My dedicated blog post
@henryiii

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

This sounds great! Any chance this could go in, @halogenica?

@halogenica halogenica merged commit 07f7656 into halogenica:master May 8, 2019

@halogenica

This comment has been minimized.

Copy link
Owner

commented May 8, 2019

Fantastic, thank you very much! I know there are several other PRs piled up, unfortunately it will take me some time to work through them and my attention will be sporadic for the foreseeable future. I really appreciate quick and easy fixes like this that clean up the theme and keep things running. Thanks again!

@henryiii

This comment has been minimized.

Copy link
Contributor

commented May 8, 2019

Thanks, @VincentTam and @halogenica !

@VincentTam

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2019

@halogenica Thanks for the merge and your great theme !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.