-
Notifications
You must be signed in to change notification settings - Fork 10
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
As a user I would like to configure my projects metadata #5
Comments
Can certainly accomplish 1-2, 5-6, but I'm not sure how we can do 3-4. Maybe we can add those var in meta tags during serialization, in the jsdom, right after it renders? |
@hutchgrant <title>{{title}}</title> If a user wants to create their own index.html, they can, and we can provide a more robust solution to that via #17 where we can document / define what compilation information is available at build time, and at what point it can be accessed / injected. |
The problem is we need it to be dynamic per page, and when our SPA is generated, there is only a single html file. Meaning, if we have many pages, each with different, dynamic, meta data, with only a single html being compiled, that won't suffice. However, when we're serializing, there is an opportunity to manage each page's index.html file with JSDOM before they're written to file. Unless, we could build a component of some kind that can be rendered within each page-template(custom templates will have to add it as well), which could force updating the document head with route based meta tags. That's one way to get it to render the meta tags dynamically pre-serialization(something like helmet but a web component). |
Good point and yeah, figured there are a couple ways we might accomplish this given a particular use case. For my primary inspiration on this, checkout helmet / gatsby-helmet. 🏈 |
Much of the meta data should be consolidated in config file and that file needs to be imported across multiple libs as per #11 IMO. |
I have built a simple helmet-like component that we can use within the wc-markdown-loader and page/app-template. However there will be some issues to figure out. For example, some meta we will want to be site-wide and should be set from a site config file which will be used in app-template. Others, we may prefer to be set from specific page-templates. As well I want dynamic titles/descriptions so those have to be set within wc-markdown-loader via front-matter var(or extracted by parsing md titles/text). Plus, we want some of these(from any of these 3 methods) to be default. |
Type of Change
Summary
Basic site metadata will be needed in order to let application's configure the display of their site's information to crawlers and bots.
Details
url
(nice to have, could be its own issue)The text was updated successfully, but these errors were encountered: