-
Notifications
You must be signed in to change notification settings - Fork 1
fix(site): add reCAPTCHA v3, main landmark, and docs sitemap #469
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
Changes from 1 commit
8998642
70b3d0b
8bea55a
778c465
4d6e317
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| User-agent: * | ||
| Allow: / | ||
| Disallow: /_assets/ | ||
|
|
||
| Sitemap: https://synthorg.io/sitemap-index.xml | ||
| Sitemap: https://synthorg.io/docs/sitemap.xml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,8 +64,12 @@ const canonicalUrl = Astro.url; | |
| </noscript> | ||
| </head> | ||
| <body class="bg-[#0F1219] text-white font-['Inter',sans-serif] antialiased"> | ||
| <slot /> | ||
| <main> | ||
| <slot /> | ||
| </main> | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| <!-- GitHub buttons (https://buttons.github.io/) --> | ||
| <script async defer src="https://buttons.github.io/buttons.js"></script> | ||
| <!-- Google reCAPTCHA v3 (contact form spam protection) --> | ||
| <script async defer src="https://www.google.com/recaptcha/api.js?render=6LdQkossAAAAADwxZo5bt8p6az7P3M6I_8k4_ypu"></script> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoding API keys, even public ones like a reCAPTCHA site key, is not recommended. It makes managing keys across different environments (e.g., development, production) difficult and error-prone. Please store this key in an environment variable and access it using Astro's
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Consider extracting the reCAPTCHA site key to a shared constant. The site key Consider defining it once (e.g., in an environment variable or a shared config) and referencing it in both places. 🤖 Prompt for AI Agents |
||
| </body> | ||
| </html> | ||
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.
This reCAPTCHA site key is hardcoded. To improve security and maintainability, it's best to avoid hardcoding keys. Instead, you should load it from an environment variable and pass it to this client-side script.
A common pattern in Astro is to:
const recaptchaSiteKey = import.meta.env.PUBLIC_RECAPTCHA_SITE_KEY;).<form data-recaptcha-key={recaptchaSiteKey} ...>.form.dataset.recaptchaKey.Remember to also add a check to ensure
form.dataset.recaptchaKeyis available before using it.