-
Notifications
You must be signed in to change notification settings - Fork 60
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
Feat: Adds generated-at metatag to identify build time #2417
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's good!
It's important to map the generated at
time for better debugging during crises and incidents, like the one we experienced on Aug 15. 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, but I'll wait to test it afterward and approve :)
|
||
// Retrieves the package manager based on the developer lockfile, using `ni`. | ||
export function getPreferredPackageManager() { | ||
const agent = spawnSync("na", ['\?'], { encoding: 'utf8', shell: true }).stdout.trim() | ||
const agent = spawnSync('na', ['?'], { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the \
removal intentional?
packages/core/next-seo.config.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file adding the default additionalMetaTags
to all places with NextSeo
, right?
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
question: I tried looking for the tag in the starter, but I couldn't find it in the preview link. Was I supposed to find it there? |
@hellofanny After the build error was fixed, the preview shows the tag? |
@emersonlaurentino I couldn't see
@emersonlaurentino I've searched again and still couldn't find it |
Okay, I'll fix it |
212cf35
to
5254323
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag with build time info testing in this preview 🚀
#2417 follow-up. Adds generated-at metatag on source code to identify when the build was created.
## What's the purpose of this pull request? Using the next metadata to define the SEO tags. |before: NextSeo | After: fs-next-update | |-|-| |<img width="513" alt="image" src="https://github.com/user-attachments/assets/bdeef211-d9eb-4fb8-9015-7566eb9c1659">|<img width="468" alt="image" src="https://github.com/user-attachments/assets/7c66bbea-9e1a-4cc8-81b7-1a24bc79c971">| todo: - [ ] check duplicate tags related issue: vercel/next.js#63489 It didn't work for me, I couldn't fix it :/ - [ ] after updating the `feat/next-13` branch with `main`, we need to consider #2417 changes Regarding the JSON-LD, I added it as recommended in the [documentation](https://nextjs.org/docs/app/building-your-application/optimizing/metadata#json-ld): by rendering the structured data as a <script> tag. I've checked that the generated schema was the same as before and still valid. <img width="1520" alt="image" src="https://github.com/user-attachments/assets/2c01efd0-0110-43c5-b95c-655e24cf0167"> |before: SiteLinksSearchBoxJsonLd | After: fs-next-update | |-|-| |<img width="909" alt="image" src="https://github.com/user-attachments/assets/fda08173-3efa-4317-ab50-d52ca8e640c4">|<img width="916" alt="image" src="https://github.com/user-attachments/assets/a1b2af2e-bf53-4a61-9333-c16ba7ffd76b">| **Question/Curiosity**: Does anyone know how this is being used? ## How to test it? Navigate to packages/core, run `yarn dev` **Metatags** 1. Open the [homepage](https://starter.vtex.app/) and inspect the page, if using chrome, in the `Elements` tab, search for `meta`. 2. In another tab open the homepage: localhost:3000/fs-next-update , do the same. Inspect and search for `meta`. Compare the tags, you should be able to see all the tags in the stater here. ___ **JsonLd** 1. Open the [homepage](https://starter.vtex.app/) and inspect the page, if using chrome, in the `Elements` tab, search for `SearchAction`. <img width="200" alt="image" src="https://github.com/user-attachments/assets/9ee2f3d8-cbb4-4183-a979-cc49ece55194"> 2. In another tab open the homepage: localhost:3000/fs-next-update , do the same. Inspect and search for `SearchAction`. Compare the script, it should the same. ## References - [SFS 815](https://vtex-dev.atlassian.net/browse/SFS-815?atlOrigin=eyJpIjoiZDMxYTJjYzY0MWZiNDAxZjllYWM1YTVkYWJmMmQ3MjEiLCJwIjoiaiJ9) - [Nextjs Optimizing Metadata]( https://nextjs.org/docs/app/building-your-application/optimizing/metadata)
What's the purpose of this pull request?
create a metatag in build time in order to know when the build was created.
How it works?
using the faststore cli we generate a date and insert on store html
How to test it?
finding the
generated-at
metatag on source code.Starters Deploy Preview
References