Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tags improvements - non-url characters#48

Merged
tesar-tech merged 5 commits into
masterfrom
tags-improvements
Oct 29, 2024
Merged

tags improvements - non-url characters#48
tesar-tech merged 5 commits into
masterfrom
tags-improvements

Conversation

@tesar-tech

Copy link
Copy Markdown
Collaborator

closes #46

  • now the tags with non-url characters are converted by WebUtility.UrlEncode..
  • The encoder can be changed, since it's just a Func<string, string> that can be set by opt.TagEncodeFunc in program.cs.

to discussion:

  • shouldn't we also provide a class for tag itself? Currently Tags are defined as List of strings, but maybe it would be more convenient to keep them as List<Tag> Tags where:
public class Tag
{
prop Name;
prop EncodedName;
}

This would force users to use correct version when working with tag..

That would be quite a breaking change since the Tags are defined in IFrontMatter.

@tesar-tech

Copy link
Copy Markdown
Collaborator Author

Please do add your authorship to the beta.14 blog post if you want.

@netlify

netlify Bot commented Oct 27, 2024

Copy link
Copy Markdown

Deploy Preview for blazorstatic ready!

Name Link
🔨 Latest commit ae7d963
🔍 Latest deploy log https://app.netlify.com/sites/blazorstatic/deploys/671eaf42be35d80008aacd38
😎 Deploy Preview https://deploy-preview-48--blazorstatic.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@patricktcoakley

Copy link
Copy Markdown
Contributor

Have you thought about the idea of taxonomies instead of just having tags, such as how Hugo handles this? I think to just get Tags working well you could stick to this implementation and add a Tag class, but it might make sense to consider a higher level abstraction like Taxonomy that defaults to having Tag and Category classes, but could be extended to have user-implemented ones as well.

@tesar-tech

Copy link
Copy Markdown
Collaborator Author

Merging this for now and will finish it it other pr that goes bit deeper into the structure.. The tags are bit wrong with all the ContentService and options, so I am fixing it.

@tesar-tech tesar-tech merged commit 7c1fde1 into master Oct 29, 2024
@tesar-tech tesar-tech deleted the tags-improvements branch October 29, 2024 08:47
@patricktcoakley patricktcoakley mentioned this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow non url characters in tags

2 participants