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

FR add support for metadata #15

Open
maggaou opened this issue Oct 8, 2023 · 5 comments
Open

FR add support for metadata #15

maggaou opened this issue Oct 8, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@maggaou
Copy link

maggaou commented Oct 8, 2023

Metadata for author, date and source link. This could be implemented by comments (I'm not sure about the native properties feature). Ask these details when running create css command. Providing additional command to add/edit metadata could be other choice but this adds more clutter to the general command pool.

@Zachatoo Zachatoo added the enhancement New feature or request label Oct 8, 2023
@Zachatoo
Copy link
Owner

This would have to be customizable, as not everyone will want the same metadata.

Maybe it makes more sense to add support for plugins like Templates and Templater, so you can template out anything you want? And you could insert it anywhere you want in the CSS file?

@maggaou
Copy link
Author

maggaou commented Oct 26, 2023

I'm still voting for a simple way to add basic metadata such as author and source. We want to encourage users to add that information. It could be on/off setting, on by default. See Modal form plugin.

@holroy
Copy link
Contributor

holroy commented Apr 13, 2024

What kind of metadata are we talking about here? Just a fixed text to be inserted into every new CSS file?

Or some other kind of template stuff asking/querying for values?

Thinking out loud this would require a setting section for the plugin having:

  • A template text to insert at the head of any newly created CSS file
  • Some means to insert the date into that text, potentially with a format setting as a separate field
  • Define a source link, or ask for source link?
  • A field for defining the author, or asking for author?

This could possibly require a simple template engine, where we defined:

  • {Date}
  • {Author}
  • {Source}
  • {filename} (the newly assigned filename)

And one could then choose in the settings whether to use a fixed value, or ask for values when creating the new files.


Am I way off, or is it something like this you're imagening @maggaou ?

@maggaou
Copy link
Author

maggaou commented Apr 13, 2024

What kind of metadata are we talking about here? Just a fixed text to be inserted into every new CSS file?

From implementation point of view that would suffice however life would be slightly easier with keyboard navigation between input fields and possibly with some predetermined values like date. Modal form may provide the desired functionality.

In more general point of view the idea is to promote describing source information. This would in turn promote github repositories, subreddits, discord servers, other discussion forums and individual users. This one simple feature would do a favor to various parties.

@holroy
Copy link
Contributor

holroy commented Apr 13, 2024

I don't think it's realistic to have a modal form within a CSS editor, that's what the rest of Obsidian is for, so the question should rather be what would truly be the necessity to contain within the CSS file itself and what should be kept on the outside.

And possibly a better extension, which I'm not sure if it can be done, would be to create a working link from within the CSS file back into the vault where one could have all the information in the world about this given CSS file.

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

3 participants