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

Feature request: Manual assets folder control #301

Open
MagicLegend opened this issue Jan 11, 2025 · 2 comments
Open

Feature request: Manual assets folder control #301

MagicLegend opened this issue Jan 11, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@MagicLegend
Copy link

MagicLegend commented Jan 11, 2025

Hi!

I would love it if there was a way where the asset management in Sveltia is expanded by allowing me to manually define categories and folders for items. Currently the only way I found to get items out of the Uncategorized section is by defining a subfolder as the media_folder on a collection. However, I also have assets that I would like to categorize manually, for example some PDF documents.

I can imagine a solution here where the first subfolder in assets would be the categorization? E.g. /assets/documents would automatically be recognized as a documents category.

The workaround I can come up with is by defining a documents collection that doesn't have content, but just defines the media_folder so Sveltia recognizes it, but that leaves me with a documents collection that's empty and unused in my editor, which is clutter that I think should be preventable. Example config that would work:

export const Collection = {
  label: 'Documents',
  name: 'documents',
  public_folder: '/documents',
  media_folder: '/assets/documents',
  create: true
};

(Yes we do some weird stuff with bundeling TS for our config, it's great - love the customizability!)

But this still leaves me with one giant list of documents. What if I want to subdivide this further by having folders?

So:

The feature request is the ability to manually define/assign assets to a section, and letting the UI allow CRUD operations on (sub)folders.

Thanks!

MagicLegend added a commit to DIVD-NL/web-www-v2 that referenced this issue Jan 11, 2025
@kyoshino kyoshino added the enhancement New feature or request label Jan 11, 2025
@kyoshino
Copy link
Member

There will be folder navigation in the Media Library as requested in #229 so that the CMS will display subfolders and allows you to organize files.

@MagicLegend
Copy link
Author

Hi Kohei!

Ah, I didn't search in the discussions - apologies! I see RDjarbeng indeed requested something very similar :) Looking forward to the changes!

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants