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

assets directory not added and removed by Flowershow #661

Open
ktneely opened this issue Jan 7, 2025 · 4 comments
Open

assets directory not added and removed by Flowershow #661

ktneely opened this issue Jan 7, 2025 · 4 comments

Comments

@ktneely
Copy link

ktneely commented Jan 7, 2025

I'm trying to add an assets directory under content for hosting author images and other material. The challenge is that I cannot get assets to "stick".

Scenario 1: assets in Obsidian

My first attempt was to create an assets/ directory at the top level of the Obsidian vault as a peer of blog/, people/, etc. Inside the folder was a single image, author.png` to be used in conjunction with a defined person. When updating flowershow with the "publish all notes" function in the plugin, my documents from all the other directories get uploaded, however, it skips the assets folder entirely.

Scenario 2: Adding via git

Since the plugin was not adding the directory and file, I cloned the repo, added the directory and file under content/, and committed. The Vercel build process kicked off and succeeds. However, the image is not used within the blog posts as a part of the author. Furthermore, when I update content and re-publish via Obsidian, it removes the folder and its underlying asset.
Obsidian/Flowershow will remove assets/ whether it is present in the vault or not.

To Reproduce

The following steps should reproduce the issue:

  1. Create a new flowershow instance following the online guide
  2. Use a new vault for this instance
  3. publish the vault
  4. add an assets/ folder in Obsidian
  5. add an image file to the folder
  6. publish
  7. check repository under content/ and the assets folder will not be there

Note: I can get the assets/ folder to "stick" if I add a dummy Markdown file under it, however, the images are not pushed.

You can also immediately see that the asset file(s) will be deleted with the flowershow plugin widget. There should be a way to add the assets to the plugin's tracking mechanism.

@rufuspollock
Copy link
Member

@ktneely thanks for reporting. Are you using the Obsidian plugin?

@ktneely
Copy link
Author

ktneely commented Jan 13, 2025

Yes, I am using the Obsidian plugin method. I reviewed a related issue that mentioned symlinking the assets folder, but that doesn't seem to be relevant here, since I'm not referencing the assets as being under the blog/ directory, and assets and blog are at the same level .

@rufuspollock
Copy link
Member

@ktneely the assets folder has to be in or symlinked into the public folder usually.

@ktneely
Copy link
Author

ktneely commented Jan 31, 2025

I don't have an explicit public directory, is that required? My directory tree looks like this (I've cut some content directories out)

.
├── .obsidian/
├── assets/
│   ├── Headshot.png
│   └── assets.md
├── blog/
│   ├── 2024-03-27-Tier-1-Go-Bag.md
│   ├── 2025-01-16-Analysis-Toolkit-Part-2.md
├── people/
│   └── Kevin.md
├── projects/
└── index.md

Should there be a symlink likeblog/assets -> ../assets/ ? I thought I tried that and it didn't work, but now can't quite remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants