Skip to content

Replace {{ .URL }} with {{ .Permalink }}#216

Merged
budparr merged 1 commit intotheNewDynamic:masterfrom
jish:url-is-deprecated
Oct 26, 2019
Merged

Replace {{ .URL }} with {{ .Permalink }}#216
budparr merged 1 commit intotheNewDynamic:masterfrom
jish:url-is-deprecated

Conversation

@jish
Copy link
Contributor

@jish jish commented Oct 13, 2019

Using the {{ .URL }} token results in a warning:

WARN 2019/10/13 15:12:12 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.

Steps to reproduce

Follow along with the Quick Start guide at
https://gohugo.io/getting-started/quick-start/

Running hugo server -D emits a warning that .URL is deprecated.

Using the `{{ .URL }}` token results in a warning:

    WARN 2019/10/13 15:12:12 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.

Steps to reproduce
==================

Follow along with the Quick Start guide at
https://gohugo.io/getting-started/quick-start/

Running `hugo server -D` emits a warning that `.URL` is deprecated.
Copy link

@bstoney bstoney left a comment

Choose a reason for hiding this comment

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

Looks good, the same changes as I had made locally

@budparr
Copy link
Member

budparr commented Oct 26, 2019

Thanks!

@budparr budparr merged commit 0d9656d into theNewDynamic:master Oct 26, 2019
strk added a commit to strk/gohugo-theme-ananke that referenced this pull request May 11, 2020
budparr pushed a commit that referenced this pull request May 12, 2020
* Replace another 2 .URL occurrences with .Permalink

This is basically a completion of #216

* Revert site-navigation URL change
fpiantini pushed a commit to fpiantini/gohugo-theme-ananke that referenced this pull request May 15, 2020
* Replace another 2 .URL occurrences with .Permalink

This is basically a completion of theNewDynamic#216

* Revert site-navigation URL change
Remicck pushed a commit to Remicck/gohugo-theme-ananke that referenced this pull request Mar 7, 2022
* Replace another 2 .URL occurrences with .Permalink

This is basically a completion of theNewDynamic#216

* Revert site-navigation URL change
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.

3 participants