Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 58 additions & 3 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

const siteUrl = 'https://rep-protocol.dev';
const ogImagePath = '/og-image.png';
const ogImageUrl = `${siteUrl}${ogImagePath}`;
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constructing URLs via string concatenation is brittle if siteUrl ever gains a trailing slash or ogImagePath changes (can lead to double slashes or missing slashes). Prefer constructing the URL via the URL constructor (e.g., new URL(ogImagePath, siteUrl).toString()) to make this resilient to future edits.

Suggested change
const ogImageUrl = `${siteUrl}${ogImagePath}`;
const ogImageUrl = new URL(ogImagePath, siteUrl).toString();

Copilot uses AI. Check for mistakes.
const ogImageAlt =
'REP social card showing Runtime Environment Protocol for secure runtime environment variables in browser apps';

export default defineConfig({
site: 'https://rep-protocol.dev',
site: siteUrl,
integrations: [
starlight({
title: 'REP',
Expand Down Expand Up @@ -46,7 +52,42 @@ export default defineConfig({
tag: 'meta',
attrs: {
property: 'og:image',
content: 'https://rep-protocol.dev/og-image.png',
content: ogImageUrl,
},
},
{
tag: 'meta',
attrs: {
property: 'og:image:secure_url',
content: ogImageUrl,
},
},
{
tag: 'meta',
attrs: {
property: 'og:image:type',
content: 'image/png',
},
},
{
tag: 'meta',
attrs: {
property: 'og:image:width',
content: '1200',
},
},
{
tag: 'meta',
attrs: {
property: 'og:image:height',
content: '630',
},
},
{
tag: 'meta',
attrs: {
property: 'og:image:alt',
content: ogImageAlt,
},
},
{
Expand All @@ -60,7 +101,21 @@ export default defineConfig({
tag: 'meta',
attrs: {
name: 'twitter:image',
content: 'https://rep-protocol.dev/og-image.png',
content: ogImageUrl,
},
},
{
tag: 'meta',
attrs: {
name: 'twitter:image:alt',
content: ogImageAlt,
},
},
{
tag: 'link',
attrs: {
rel: 'image_src',
href: ogImageUrl,
},
},
{
Comment on lines +115 to 121
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link[rel=\"image_src\"] hint is non-standard/deprecated and is ignored by most modern crawlers in favor of Open Graph/Twitter tags. Consider removing it (or documenting why it’s needed) to avoid validator/linter warnings and reduce head noise.

Suggested change
tag: 'link',
attrs: {
rel: 'image_src',
href: ogImageUrl,
},
},
{

Copilot uses AI. Check for mistakes.
Expand Down
1 change: 0 additions & 1 deletion spec/INTEGRATION-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Document: REP Integration Guide
Version: 0.1.0
Status: Active
Authors: Olamide Adebayo (Ruach Tech)
Created: 2026-02-18
```

Expand Down
1 change: 0 additions & 1 deletion spec/SECURITY-MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Document: REP Security Model
Version: 0.1.0
Status: Active
Authors: Olamide Olayinka (Ruach Tech)
Created: 2026-02-18
```

Expand Down
Loading