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

search for posts in sub-directories #12

Merged
merged 7 commits into from
May 30, 2024

Conversation

MeltyObserver
Copy link
Contributor

Just makes the program look for posts in sub-directories created under the content path which is how jekyll works.

This will help with organizing posts visually.

example (this doesn't wok on master):

Content/blog/
   - graphics/
       - how-to-do-physics-based-rendering.md
   - web/
       - starting-with-blazorstatic.md
   - linux/
       - setting-up-arch.md

One more thing that can be changed is the value of FileNameNoExtension, instead of just the file's name it can also contain it's relative path to the content folder (eg. linux/setting-up-arch instead of just setting-up-arch).
Or the user can choose to add a field to their FrontMatter class to differentiate between posts.

Copy link

netlify bot commented May 29, 2024

Deploy Preview for blazorstatic ready!

Name Link
🔨 Latest commit 5398e90
🔍 Latest deploy log https://app.netlify.com/sites/blazorstatic/deploys/6658d2be68cf450008d9c7d1
😎 Deploy Preview https://deploy-preview-12--blazorstatic.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.

…ubfolder/post-in-subfolder` will result in filename `blog/subfolder/post-in-subfolder`)
…ll correspond to url and original structure.
@tesar-tech
Copy link
Owner

Nice, thanks for the addition.

  • I made the FileNameNoExtension into relative path of file with no extension to content path by function. Now the posts are located in respective folders (/blog/subfolder/post-in-subfolder has its origin in Content/Blob/subfolder/post-in-subfolder.md)
  • I changed the BlogPage to accept multiple segments in parameter (using wildcard).
  • Test post is there.

Does that suit your needs now?

How should we name the FileNameNoExtension, it is basically url for the future post...

@MeltyObserver
Copy link
Contributor Author

MeltyObserver commented May 29, 2024

I think it can be renamed to just name, path or url (like jekyll).

Also will this work with the media folder? i didn't use any media in my project so far so i didn't test if i can have subddirs there or not.

@tesar-tech
Copy link
Owner

tesar-tech commented May 30, 2024

Url it is.

The media folder works, it just copies the whole folder.

Do you wish to add yourself as a co-author to the blog/subfolder/post-in-subfolder post?

@MeltyObserver
Copy link
Contributor Author

no that's fine, thanks for the help with this.

@tesar-tech tesar-tech merged commit c83d3ef into tesar-tech:master May 30, 2024
3 of 4 checks passed
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