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(content): add support for accessing content files within nested folders #286

Merged

Conversation

BaronVonPerko
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • vite-angular-plugin
  • astro-angular
  • create-analog
  • router
  • platform
  • content

What is the current behavior?

The current injectContent() does not support subdirectories within the content folder.

Issue Number: #282

What is the new behavior?

This allows the existing string parameter for the routeParam to remain the same, but also allows the developer to pass in an object instead, consisting of the routeParam key as well as the subdirectory name.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Updates injectContent to allow a custom prefix to be used for content subdirectories
Updates injectContent to allow a custom prefix to be used for content subdirectories
…nto 282-content-files-with-prefix

# Conflicts:
#	packages/content/src/lib/content.spec.ts
#	packages/content/src/lib/content.ts
Updates Content Routes doc to show how Analog supports content subdirectories
@netlify
Copy link

netlify bot commented Mar 2, 2023

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit 266d572
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/64025b25277d9100088a6b4f
😎 Deploy Preview https://deploy-preview-286--analog-docs.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 settings.

@netlify
Copy link

netlify bot commented Mar 2, 2023

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 266d572
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/64025b2517452f0008f6ec54
😎 Deploy Preview https://deploy-preview-286--analog-app.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 settings.

@netlify
Copy link

netlify bot commented Mar 2, 2023

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 266d572
🔍 Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/64025b259602b900081d3572
😎 Deploy Preview https://deploy-preview-286--analog-blog.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 settings.

@brandonroberts brandonroberts changed the title 282 content files with prefix feat(content): add support for accessing content files within nested folders Mar 2, 2023
Updates subdirectory example file tree
Copy link
Member

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

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

LGTM

@brandonroberts brandonroberts merged commit 19acf0c into analogjs:main Mar 3, 2023
@brandonroberts
Copy link
Member

Awesome! @allcontributors add @BaronVonPerko for code,doc

@allcontributors
Copy link
Contributor

@brandonroberts

I've put up a pull request to add @BaronVonPerko! 🎉

Villanuevand pushed a commit to Villanuevand/analog that referenced this pull request Sep 12, 2023
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