Use the Posts found in './bin' instead of the root directory#10
Conversation
these are the files copied on project build, which allows the user to update the posts pragmatically before parsing them without tampering with the original files
|
Hm. Interesting. There is just one issue with modifying the blog files -> When you publish your app, the "bin" folder becomes the "project" root folder and the files in What is exactly the use case when you need to modify the files? Because maybe there is a better way. Thanks for you PRs, appreciate that. |
|
I honestly didn't think much about it, I saw that the example website already has those lines added but noticed the code doesn't make use of them. A use case I can think of is to have the posts' read time calculated dynamically instead of having it hardcoded in the posts' front matter, or being able to upload the images in a post to a CDN while leaving the root files use the local copies for offline editing. |
|
That sounds like a job for The posts live in memory for a brief period of time and you can can change them however you like.. |
|
the issue with |
change the path where the Posts are searched for, from the root directory of the project to where the assembly of the project is.
original:
src/Content/**new:
src/bin/**/netX.0/Content/**benefits: allow the user to update the Posts pragmatically before parsing them without tampering with the original files.
this also means that the
.csprojfile must contain the following lines: