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

feat: add generic home page section generation #5

Closed
wants to merge 1 commit into from

Conversation

thde
Copy link
Owner

@thde thde commented Oct 23, 2024

This change enables theme user to specify arbitrary order of sections, and add multiple sections of the same type (more generic approach than in gurusabarish#105, which is applicable only to experience blocks).

  • All sections are specified in config as a list, with order of items directly reflecting order on the main page (including navbar).
  • Type of a section is specified with a new type field.
  • If there are multiple sections of the same type, in order to distinguish them for navbar navigation, you need to specify unique id field.
  • Navbar and main page generation is more generic, allowing to add custom section types – the only requirement is a custom partial named after the section type. Styling can be provided in a custom CSS (enabled with customCSS site param).

This change enables theme user to specify arbitrary order of sections,
and add multiple sections of the same type (more generic approach than
in gurusabarish#105, which is applicable only to experience blocks).

- All sections are specified in config as a list, with order of items
  directly reflecting order on the main page (including navbar).
- Type of a section is specified with a new `type` field.
- If there are multiple sections of the same type, in order to
  distinguish them for navbar navigation, you need to specify unique
  `id` field.
- Navbar and main page generation is more generic, allowing to add
  custom section types – the only requirement is a custom partial named
  after the section type. Styling can be provided in a custom CSS
  (enabled with `customCSS` site param).

Signed-off-by: Marek Pikuła <[email protected]>
@thde
Copy link
Owner Author

thde commented Oct 23, 2024

merged in e63f70c

@thde thde closed this Oct 23, 2024
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