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

filter based on catalog parent-id and tags #79 #81

Merged
merged 7 commits into from
Sep 23, 2024

Conversation

JavierCladellas
Copy link
Collaborator

Added a filter to helpers/get-page-cards.js that:

  • Checks if the catalog tag is present in a page.
  • Gets the identifiers of the parents pages by looking at the parent-catalogs attribute.
  • Gets the actual identifier of the parent page, located as tags in the actual parent page attributes
  • If the parent page contains any of the tags present in the parent-catalogs, it will be nested inside that module.

[ Example usage]
The work still uses the toolboxes page layout, but searches for the catalog tag to not interfere with existing work.

The base of the catalog system should have the following attributes, assuming I want to set the id of the page to base-id:

:page-layout: toolboxes
:page-tags: catalog, base-id

Then for any direct child of the base-id page :

:page-layout: toolboxes
:page-tags: catalog, toolbox, my-page-1-id
:parent-catalogs: base-id

If I want to create a card that appears both on the base-id and the my-page-1-id pages I can do:

:page-layout: default
:page-tags: catalog, toolbox, my-leaf-page
:parent-catalogs: base-id, my-page-1-id

= My Leaf page content... 

[NOTES]

  • the page layout of all catalog pages that have children should be toolboxes
  • All pages inside the catalog must have the catalog tag and the toolbox tag (for cards to appear)
  • A page can have multiple parents.
  • The page-layout of the leaf pages is not important

@JavierCladellas JavierCladellas added the ✨ enhancement New feature or request label Sep 21, 2024
@JavierCladellas JavierCladellas self-assigned this Sep 21, 2024
@JavierCladellas JavierCladellas linked an issue Sep 21, 2024 that may be closed by this pull request
Copy link

netlify bot commented Sep 21, 2024

Deploy Preview for antora-ui-peppy-froyo-6a3edb ready!

Name Link
🔨 Latest commit 05d5f65
🔍 Latest deploy log https://app.netlify.com/sites/antora-ui-peppy-froyo-6a3edb/deploys/66f127c31bc93a00080f71ca
😎 Deploy Preview https://deploy-preview-81--antora-ui-peppy-froyo-6a3edb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@prudhomm prudhomm merged commit d86119c into main Sep 23, 2024
6 checks passed
@prudhomm prudhomm deleted the 79-allow-arbitrary-nesting-of-modules branch September 23, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow arbitrary nesting of modules
2 participants