Instructions for Windows users by Marco Campos (madcampos.dev): On Windows you can achieve this using mklink on cmd or New-Item on powershell: > mklink /D "" "" > New-Item -ItemType SymbolicLink -Path "" -Target "" Note that you have to either do this as Administrator or enable "developer mode" to do it without Administrator permissions. ss64.com/nt/mklink.html learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-item?view=powershell-7.4#example-7-create-a-symbolic-link-to-a-file-or-folder
On windows you need to make a Junction (mklink /J "path to junction link" "path to target folder"), not a symlink. Unless you are using WSL for a virtual Linux container. This is the only way to make sure the contents are also saved in your Astro Git repository. As for Linux and MacOS, also make sure the symbolic link reference path is relative to the repository or the contents will not be added to your Git repo. You can use the relative flag (ln -sr ... ...) to achieve this.
I also faced the same issue of not having the folder show up in the git repository and it therefore didn't sync/deploy to Netlify. Thanks for pointing toward a solution, it seems to be working (for now)
Hey, thank you! I know about symlinks and use them occasionally, but it never came to mind that I can do this! This method should work on other markdown based websites too, not just Astro!
This is great but I'm wondering why not just open the vault at the src/content directory and avoid all the symlinking? You don't need to open the vault at the root of the project. Also, you can just bring over the images to a directory inside the src/content directory as well and do the image referencing that way (relative). And the .Obsidian directory will be created at the root of the src/content directory as well, where is more convenient.
Yeah for simpler setups that's the way to go. I wanted to add my website's content folder in my existing vault, in which I have my whole knowledge base, so symlinks were the solution to achieve that.
Thank you. I know it should be possible. Since I don't have a way to learn and validate how links work in Windows, and I didn't want to sound like an expert in things I'm not, I left that part for y'all to figure it out 😁 have a good one!
Instructions for Windows users by Marco Campos (madcampos.dev):
On Windows you can achieve this using mklink on cmd or New-Item on powershell:
> mklink /D "" ""
> New-Item -ItemType SymbolicLink -Path "" -Target ""
Note that you have to either do this as Administrator or enable "developer mode" to do it without Administrator permissions.
ss64.com/nt/mklink.html
learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-item?view=powershell-7.4#example-7-create-a-symbolic-link-to-a-file-or-folder
For Windows, look up "Link Shell Extension". It's the easiest way to create symlinks, junctions, etc. and you do it right from File Explorer.
On windows you need to make a Junction (mklink /J "path to junction link" "path to target folder"), not a symlink. Unless you are using WSL for a virtual Linux container. This is the only way to make sure the contents are also saved in your Astro Git repository. As for Linux and MacOS, also make sure the symbolic link reference path is relative to the repository or the contents will not be added to your Git repo. You can use the relative flag (ln -sr ... ...) to achieve this.
I also faced the same issue of not having the folder show up in the git repository and it therefore didn't sync/deploy to Netlify. Thanks for pointing toward a solution, it seems to be working (for now)
Just what I needed, thank you man!
Subscription deserved :D
Hey, thank you! I know about symlinks and use them occasionally, but it never came to mind that I can do this! This method should work on other markdown based websites too, not just Astro!
Totally! That's what I like about it. It's framework agnostic.
I love this video. Saves me quite a hassle. Thanks man.
This is great but I'm wondering why not just open the vault at the src/content directory and avoid all the symlinking? You don't need to open the vault at the root of the project. Also, you can just bring over the images to a directory inside the src/content directory as well and do the image referencing that way (relative). And the .Obsidian directory will be created at the root of the src/content directory as well, where is more convenient.
Yeah for simpler setups that's the way to go. I wanted to add my website's content folder in my existing vault, in which I have my whole knowledge base, so symlinks were the solution to achieve that.
This is such a great idea. Thanks!
Thanks for the neat tip!
Happy to help!
good video
checkout frontmatter cms
of course you can create links on windows, duh
...but great video otherwise, thank you. Dunno why I started with criticism. My bad. Have a good one, buddy.
Thank you. I know it should be possible. Since I don't have a way to learn and validate how links work in Windows, and I didn't want to sound like an expert in things I'm not, I left that part for y'all to figure it out 😁 have a good one!