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

Document strings.FirstUpper #1901

Merged
merged 1 commit into from
Nov 20, 2022
Merged

Document strings.FirstUpper #1901

merged 1 commit into from
Nov 20, 2022

Conversation

deining
Copy link
Contributor

@deining deining commented Nov 19, 2022

This PR addresses #739 by adding a new documentation page for function strings.FirstUpper. It also fixes 2 typos I spotted.
One quirk I came across while previewing the new page locally:
In the frontmatter of the newly created page, relatedfuncs is empty. However, at be bottom of the page, there is a section See Also, containing entries for anchorize, strings.Repeat, errorf and warnf, float, and emojify. This is weird.

Additional note: to me it seems like the section See Also for existing functions string.xxx is often filled with somehow unrelated entries.

@jmooring
Copy link
Member

Yes, relatedfuncs is, at the moment, apparently not used. It is not referenced anywhere in the templates or the theme.

The "See Also" bit is rendered by:
https://github.com/gohugoio/gohugoioTheme/blob/master/layouts/partials/related.html

Which is driven by:
https://github.com/gohugoio/hugoDocs/blob/master/config/_default/config.toml#L60-L70

@jmooring
Copy link
Member

jmooring commented Nov 19, 2022

You can remove the following from front matter:

  • date
  • publishdate
  • lastmod
  • workson
  • deprecated

And please remove the changes to the Firebase page. I'm working on that section now.

Thanks.

@deining
Copy link
Contributor Author

deining commented Nov 20, 2022

Yes, relatedfuncs is, at the moment, apparently not used. It is not referenced anywhere in the templates or the theme.

Thanks for your clarification, this was helpful! What about adding an additional section Related functions on function pages? Alternatively, we could add any given related function(s) as additional items to the top of the list in the See also section.

You can remove the following from front matter:
* date
* publishdate
* lastmod
* workson
* deprecated

Done. I changed the archetype for function pages as well, I hope this is fine for you.

And please remove the changes to the Firebase page. I'm working on that section now.

Done.

Thanks.

You are welcome.

@jmooring jmooring merged commit 1686f60 into gohugoio:master Nov 20, 2022
@deining deining deleted the contrib branch November 20, 2022 14:41
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