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

Add Versions to function documentation #2323

Closed
cmahnke opened this issue Nov 11, 2023 · 4 comments
Closed

Add Versions to function documentation #2323

cmahnke opened this issue Nov 11, 2023 · 4 comments

Comments

@cmahnke
Copy link
Contributor

cmahnke commented Nov 11, 2023

With Hugo 0.120.0 I'll get a message regarding .Site.IsServer:

INFO  deprecated: .Site.IsServer was deprecated in Hugo v0.120.0 and will be removed in a future release. Use hugo.IsServer instead.

Since the is coming from one of my themes, I'd like to know since when the replacement hugo.IsServer is available to set the required min version in theme.toml.

My proposal is as follows:
Each function documentation page (like for hugo.IsServer) should have a field since indicating the version in which a function has been introduced. The same goes for deprecated functions (or variables) like .Site.IsServer, they should't been silently removed from the docs, but marked as deprecated.

BTW: Maybe this issue need to be moved.

@jmooring jmooring transferred this issue from gohugoio/hugo Nov 11, 2023
jmooring added a commit to jmooring/hugo-docs that referenced this issue Nov 11, 2023
jmooring added a commit to jmooring/hugo-docs that referenced this issue Nov 11, 2023
@jmooring
Copy link
Member

New features in v0.120.0 are visually tagged with "New in v0.120.0". That is our common practice, but I inadvertently removed a couple of the tags with a recent change.

I've added a deprecation notice to the site methods deprecated in v0.120.0:

Note that deprecated functions and methods will not appear in lists, including section menus. They will, however, appear in search results. You won't be able to search for them today. The search index will be updated in a few days... I'm guessing the pages will appear in the search results by 15 November 2023.

I added two new sections to the documentation guidelines:

Our deprecation practice is described here:
https://gohugo.io/troubleshooting/deprecation/

@ytrepidorosonomous
Copy link
Contributor

@jmooring I suggest the deprecation warning to be placed at the start of the page.

@cmahnke
Copy link
Contributor Author

cmahnke commented Nov 11, 2023

@jmooring : Thanks for your fast response and work!
I guess that 6 + 6 minor version for notice and warning will be enough, since my themes are internal and under (more or less) constant development.

@hugo-sid
Copy link
Member

hugo-sid commented Nov 13, 2023

Thanks for the work @jmooring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants