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

Global Tag Management #33

Open
ganevdev opened this issue Feb 5, 2020 · 2 comments
Open

Global Tag Management #33

ganevdev opened this issue Feb 5, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@ganevdev
Copy link
Member

ganevdev commented Feb 5, 2020

Create an opportunity for global site tag management. In its raw form, it may look something like this (in gatsby-config.js):

gatsby-config.js in gatsby-theme-chronoblog plugin options

tagsManagement: [{
  tagName: "post", // main name of the tag
  replacement: ["posts", "blog-posts"], // all tags matching those listed in this array will be replaced with the one specified in tagName
  hide: true, // if true, this tag will not be displayed to site visitors, but technically it will continue to exist
  textColor: "white", // any css color for text in a tag
  backgroundColor: "#a7d0e0" // any css color for tag background
}]

Since this is an array with objects, you can list any number of tags here (including if such tags do not yet exist on the site). The most important option is the tagName.

This option allows developers to give tags a style (see this: #26)

It will also allow developers to hide any tags from view, but at the same time, technically, they will continue to exist, so that developers can use these hidden tags to, say, filter content. This issue was mentioned here: #32

@ganevdev ganevdev added the enhancement New feature or request label Feb 5, 2020
@ganevdev
Copy link
Member Author

ganevdev commented Feb 5, 2020

It will also allow developers to use emoji in tags, without having to remember which emoji were used, something like this:

tagsManagement: [{
  tagName: "🖊️ post",
  replacement: ["post"]
}]

Each time the post tag is used, it is replaced by 🖊️ post.

@gethari
Copy link

gethari commented Feb 18, 2020

Awesome. Exicited for this feature

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