chore: add doc-kit configs for title, favicon, og:image, description#125
chore: add doc-kit configs for title, favicon, og:image, description#125TusharThakur04 wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| const Webpack_Description = | ||
| 'Webpack is the build tool for modern web applications run on NodeJS. Webpack is a module bundler and its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. '; | ||
|
|
|
|
||
| htmlContent = htmlContent.replace('content=" | Webpack"', 'content="Webpack"'); | ||
|
|
||
| await writeFile(indexPath, htmlContent, 'utf-8'); |
d6ed556 to
d7f200d
Compare
| }, | ||
| { | ||
| property: 'og:image', | ||
| content: 'webpack.vercel.app/assets/og_preview.png', |
There was a problem hiding this comment.
| content: 'webpack.vercel.app/assets/og_preview.png', | |
| content: '/assets/og_preview.png', |
Does this work? If not, use baseURL
There was a problem hiding this comment.
i think it wont work on sharing on social media apps as they need the whole url
also it has to be webpack-doc-kit.vercle.app/...
There was a problem hiding this comment.
Okay, then can you use the value we use in baseURL?
| }, | ||
| { | ||
| property: 'og:image', | ||
| content: `https://${process.env.VERCEL_URL}/assets/og_preview.png`, |
There was a problem hiding this comment.
Can this be modified per document? That would be great, because I'd like us to have the ability to change it on a per-document basis (especially for the blog).
There was a problem hiding this comment.
Hmmm, I think so? If not, a simple doc-kit change can allow it to be.
| }, | ||
| { | ||
| property: 'og:image', | ||
| content: `https://${process.env.VERCEL_URL}/assets/og_preview.png`, |
There was a problem hiding this comment.
Can we store base url as BASE_URL, and re use it here so that localhost is also included
Closes: #121
Summary
This PR adds doc-kit configs for title, favicon, og:image, description
What kind of change does this PR introduce?
chore
Did you add tests for your changes?
no
Does this PR introduce a breaking change?
no
If relevant, what needs to be documented once your changes are merged or what have you already documented?
n/a
Use of AI
for discussion