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

Create glossary of terms #2189

Merged
merged 1 commit into from
Aug 13, 2023
Merged

Conversation

jmooring
Copy link
Member

Closes #2184

@jmooring
Copy link
Member Author

jmooring commented Aug 12, 2023

Appearance will improve when gohugoio/gohugoioTheme#267 is merged.

This is mostly accurate, though I did omit some details that site and theme authors really don't need to know (e.g., that a slice is backed by an array).

After going through this exercise, I believe we should stop referring to "site variables", "page variables", etc. Instead, we should call these "site methods" and "page methods".

  1. They are not variables. The values are immutable within template actions.
  2. Why is .Page.Title a variable but .Page.Pagination a method? It's inconsistent.

I think we should reserve the word "variable" for user-defined variables within template actions... because they are variable.

I suspect the word choices we made 10 years ago were largely influenced by Jekyll.


Also, to narrow the usage of "parameters" to site and page parameters, rename the .Params method in shortcode templates to .Args. Functions, methods, and shortcodes take arguments. The site and page have user-defined parameters.

@bep
Copy link
Member

bep commented Aug 12, 2023

I have merged/pushed the theme update, could you rebase this branch?

@jmooring jmooring force-pushed the create-glossary branch 3 times, most recently from fbbc28e to a259625 Compare August 12, 2023 14:28
@jmooring
Copy link
Member Author

I have merged/pushed the theme update, could you rebase this branch?

Thanks for theme merge. This is rebased, and I think I'm done futzing with it.

@jmooring jmooring merged commit 04b8f39 into gohugoio:master Aug 13, 2023
6 checks passed
@jmooring jmooring deleted the create-glossary branch August 13, 2023 15:43
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.

Create a glossary of terms
2 participants