lektor / lektor-website

The main lektor website.
https://www.getlektor.com/
Other
160 stars 134 forks source link

Add tags to blogs #184

Open nixjdm opened 6 years ago

nixjdm commented 6 years ago

Adding another way for users to navigate blogs, see tags

nixjdm commented 6 years ago

Some tags could be the plugin events. With this, we could add links to the event pages in the docs, so that you could see a list of which plugins are built with which event hooks. This would be handy as a reference when making plugins, because you could more easily find relevant examples.

goanpeca commented 6 years ago

@nixjdm was looking at the tags plugin. We would need to use it globally since there is no way to have

plugin-tags and blog-tags it would a mix of both, which might not be so useful ?

nixjdm commented 6 years ago

You're correct. That plugin is not quite as feature-rich as I want. We'd need to add to it. I want it to be able to handle multiple independent sets if tags, and be able to query for each set for pages like /plugins/tags and /blog/tags.

On Mon, May 7, 2018, 8:18 PM Gonzalo Peña-Castellanos < notifications@github.com> wrote:

@nixjdm https://github.com/nixjdm was looking at the tags plugin. We would need to use it globally since there is no way to have

plugin-tags and blog-tags it would a mix of both, which might not be so useful ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lektor/lektor-website/issues/184#issuecomment-387254496, or mute the thread https://github.com/notifications/unsubscribe-auth/ADRb8sCFNN_CDLGEQoSNka-Kh5udOppyks5twPJXgaJpZM4TTwgy .

goanpeca commented 6 years ago

Hmmm that would require a major refactor effort I believe. Having separate models for blog-tags and pulgin-tags would probably be much faster (and arguably easier) to implement

nixjdm commented 6 years ago

If my understanding of lektor-tags is right, the limitation is that it can't handle multiple parent dirs. I can't remember what the plugin tags models look like (and I'm in mobile) but I don't have a problem basically copying them instead of literally reusing them in-place. Either way, it might be some effort to get it done. I don't see a super easy way.

On Mon, May 7, 2018, 8:41 PM Gonzalo Peña-Castellanos < notifications@github.com> wrote:

Hmmm that would require a major refactor effort I believe. Having separate models for blog-tags and pulgin-tags would probably be much faster (and arguably easy) to implement

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lektor/lektor-website/issues/184#issuecomment-387257958, or mute the thread https://github.com/notifications/unsubscribe-auth/ADRb8n6jDScPudmEWyLoK2L8N3t33qW_ks5twPfIgaJpZM4TTwgy .

goanpeca commented 6 years ago

@nixjdm it is using virtual object paths to generate the tags (like pagination does :-p ), no real model

nixjdm commented 6 years ago

Ah, you're right about that. I was confusing the models for the categories that I added.

tariquesani commented 6 years ago

If someone is developing this further, I would like to suggest convert it to allow for custom tag taxonomies. That is, tags need not be called tags always. I have tags, categories, recipe - they all do the same thing.

goanpeca commented 6 years ago

@tariquesani I think that is possible at the moment, but there is no support for multiple parent locations, but I think it is something workable. I am also interested in looking at how loalization works for theses virtual paths.

nixjdm commented 6 years ago

You can change /blog/tag to /blog/somethingelse with tags_field I think, so you can relabel the 'taxonomy', but you still only have one taxonomy. It's in a 1-1 relation with the only parent. I think @tariquesani is looking for the ability to do something like

/blog/A
/blog/B
/separate-blog/A
/separate-blog/C

Perhaps that's even more general, but here, A, B, and C, are all separate taxonomies ('tag' groups), with possibly different parents. A even has two parents (because why not?)

goanpeca commented 6 years ago

but in thise case A on parent 1, is not the same as A on parent 2 right? or ?

nixjdm commented 6 years ago

I guess, ideally, it could be either and configurable.

So then each taxon would have a parent, url slug, and taxon group. If you wanted both As to be the same taxa group, you could, or if you wanted them to be different, you could do that as well.

The terminology may need more flushing out... I'm trying to be clear.

Edit: This is definitely getting more into "what we want", and less "how to work with what we have." That's fine though, just pointing it out.