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

Implement category related content page #63

Merged
merged 12 commits into from
Oct 25, 2024
Merged

Conversation

rccsousa
Copy link
Collaborator

Why

  • The current version of content hub did not have a page dedicated to each category where users could browse and access content on a category basis;

How

  • Refactoring fetchContentFromAuthor, enabling category-based search;
  • Refactoring Categories collection, adding a slug field to enable content searching;
  • Adding categories page with content grid;

Also includes minor changes and refactors to other components to extend reusability.

Changes fetching structure to include type and target, expanding
fetching to categories to facilitate pulling content to populate
"content by category" pages.

Adds a slug field to categories collection to enable fetching category
by slug from its respective page.

Updates function calling in ./authors/[slug]/page.tsx
Renames the AuthorContentGrid component to ContentGrid as it will be
used in "contents by category" page.
Simplifies and fixes total article calculation logic to loop through the
different content types and increment its lengts.

Closes #33
Also adds extra typing to fetchContentFromAuthorOrCategory 'type'
parameter
Adds Category pages that fetches content per category, based on slug,
and displays in grid as well as pointing to other existing categories.

Currently displays all categories but can be changed to related / parent
/ child categories in the feature
Enables category pill to link directly to the category content page.

Updates SearchBar to disable link function in order to retain filtering
behaviour.
Copy link

netlify bot commented Oct 25, 2024

Deploy Preview for content-sub ready!

Name Link
🔨 Latest commit 8053c6c
🔍 Latest deploy log https://app.netlify.com/sites/content-sub/deploys/671ba7a91c95150008ff69d0
😎 Deploy Preview https://deploy-preview-63--content-sub.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.

@rccsousa rccsousa marked this pull request as ready for review October 25, 2024 13:26
Copy link
Contributor

@davelange davelange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Though when I go to a category page on the deployed site, it's a 404.

@rccsousa rccsousa merged commit ceebb96 into main Oct 25, 2024
5 checks passed
@rccsousa rccsousa deleted the rs/setup-category-page branch October 25, 2024 14:38
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