Annoying warning with Beautiful Hugo

I am using Beautiful Hogo theme.

I am getting this warning whenever I run the command hugo:

Building sites … WARN 2019/05/25 14:46:15 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.

How can I get rid of this warning message ?

1 Like

It’s just as the warning says, you need to replace the deprecated bit. That either means, getting the theme author to update their theme, or, overriding the templates of the theme in your project, and fixing the problems.

1 Like

This has already been reported in halogenica/beautifulhugo#261.

@RickCogley The Hugo syntax update was done last month, at commits 37d73ff and c44ae13 in my merged PR halogenica/beautifulhugo#269.

To see GitLab’s CI’s resutls after including my PR, you may refer to my blog’s source @cf42f8e, which updated my tweaked Beautiful Hugo theme @d2cad9b7, whose parent is a merge commit for the inclusion of the aforementioned commit @c44ae138.

For a detailed description of what my PR is doing, you may refer to my dedicated blog post: Replacing Deprecated Hugo Syntax in Blog Theme -.

1 Like

By the way, you don’t need to wait for merge from the project owner. For example, you may test my unmerged PR 222 for nested Staticman comment support by the following commands.

$ 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 pr222 # test on a new branch pr222
$ git fetch upstream pull/222/head # git pull will be rejected
$ git merge FETCH_HEAD # manually merge the this PR against branch pr222
$ cd <your-blog>
... # edit your .gitmodules with url="<repo-containing-pr222>" and branch = "pr222"
$ 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

1 Like

Thanks for the clarity.

1 Like