#41 Customizable Homepage

Closed
opened 1 year ago by jhabdas · 5 comments
jhabdas commented 1 year ago

By request from Keybase. Create a more versatile homepage by enabling to configure which sections appear on their site. For example, some users may wish to create an about section for display above the content summary.

By request from Keybase. Create a more versatile homepage by enabling to configure which sections appear on their site. For example, some users may wish to create an about section for display above the content summary.
jhabdas added the
enhancement
label 1 year ago
jhabdas commented 1 year ago
Owner

This can be accomplished with some updates to the Paginator and how it chooses to include content. We could make this a config item but it should have some sensible defaults so config is not required.

Related: #50

This can be accomplished with some updates to the Paginator and how it chooses to include content. We could make this a config item but it should have some sensible defaults so config is not required. Related: #50
jhabdas commented 1 year ago
Owner

Essentially this needs an optional mainSections array in config.toml, an update to the layouts/index.html for:

{{ range (.Paginate (where .Data.Pages "Type" "in" .Site.mainSections)).Pages }}
  {{ partial "page-summary.html" . }}
{{ end }}

With a default to "Type" "post" if the config doesn’t exist. Also allow users to supply their own summary template and check the Paginator to ensure it’s outputting data from custom sections.

Essentially this needs an optional `mainSections` array in `config.toml`, an update to the `layouts/index.html` for: ``` {{ range (.Paginate (where .Data.Pages "Type" "in" .Site.mainSections)).Pages }} {{ partial "page-summary.html" . }} {{ end }} ``` With a default to `"Type" "post"` if the config doesn't exist. Also allow users to supply their own summary template and check the Paginator to ensure it's outputting data from custom sections.
jhabdas commented 1 year ago
Owner

Homepage may simply take a sampling of content available in sections weighted by the main menu as opposed to defining a new config, enabling a simple way to define order of items and transforming it into a landing page.

Homepage may simply take a sampling of content available in sections weighted by the main menu as opposed to defining a new config, enabling a simple way to define order of items and transforming it into a landing page.
jhabdas commented 1 year ago
Owner

Leverage Content View Tempaltes and .Render to make it happen.

Leverage [Content View Tempaltes](https://gohugo.io/templates/views) and [`.Render`](https://gohugo.io/functions/render/) to make it happen.
jhabdas commented 11 months ago
Owner

Based on request in chat homepage will leverage a theme-provided landing page layout and should expose post summaries in a configurable section within.

Based on request in chat homepage will leverage a theme-provided `landing` page layout and should expose post summaries in a configurable section within.
jhabdas added this to the 8.1.0 milestone 11 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.