docs meta tags and registry url (#2010)

This commit is contained in:
Italo Casas 2022-06-28 18:01:14 -04:00 committed by GitHub
parent e4dfd34dc5
commit a1bb494631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 47 additions and 5 deletions

View File

@ -296,7 +296,7 @@ pub struct RegistryConfig {
impl Default for RegistryConfig {
fn default() -> Self {
Self {
url: "https://anchor.projectserum.com".to_string(),
url: "https://api.apr.dev".to_string(),
}
}
}

View File

@ -10,6 +10,7 @@ const nextConfig = withMarkdoc()({
newNextLinkBehavior: true,
scrollRestoration: true,
legacyBrowsers: false,
images: { allowFutureImage: true },
},
})

21
docs/package-lock.json generated
View File

@ -3797,6 +3797,21 @@
"engines": {
"node": ">= 6"
}
},
"node_modules/@next/swc-freebsd-x64": {
"version": "12.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.0.tgz",
"integrity": "sha512-gRiAw8g3Akf6niTDLEm1Emfa7jXDjvaAj/crDO8hKASKA4Y1fS4kbi/tyWw5VtoFI4mUzRmCPmZ8eL0tBSG58A==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">= 10"
}
}
},
"dependencies": {
@ -6427,6 +6442,12 @@
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
},
"@next/swc-freebsd-x64": {
"version": "12.2.0",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.0.tgz",
"integrity": "sha512-gRiAw8g3Akf6niTDLEm1Emfa7jXDjvaAj/crDO8hKASKA4Y1fS4kbi/tyWw5VtoFI4mUzRmCPmZ8eL0tBSG58A==",
"optional": true
}
}
}

View File

@ -19,7 +19,7 @@
"autoprefixer": "^10.4.7",
"clsx": "^1.1.1",
"focus-visible": "^5.2.0",
"next": "12.1.6",
"next": "12.2.0",
"next-plausible": "^3.2.0",
"postcss-focus-visible": "^6.0.4",
"postcss-import": "^14.1.0",
@ -31,7 +31,7 @@
},
"devDependencies": {
"eslint": "8.18.0",
"eslint-config-next": "12.1.6",
"eslint-config-next": "12.2.0",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.11"
}

View File

@ -94,7 +94,7 @@ const navigation = [
},
{
title: 'Common Security Exploits',
links: [{ title: 'Sealevel Attacks', href: '/docs/security-exploits' }]
links: [{ title: 'Sealevel Attacks', href: '/docs/security-exploits' }],
},
]
@ -154,6 +154,26 @@ export default function App({ Component, pageProps }) {
<Head>
<title>{pageTitle}</title>
{description && <meta name="description" content={description} />}
{/* Open Graph */}
<meta property="og:type" content="website" />
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
<meta
property="og:image"
content="https://www.anchor-lang.com/logo.png"
/>
<meta property="og:image:width" content="250" />
<meta property="og:image:height" content="214" />
{/* Twitter */}
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content={pageTitle} />
<meta name="twitter:description" content={description} />
<meta
name="twitter:image"
content="https://www.anchor-lang.com/logo.png"
/>
</Head>
<Layout
navigation={navigation}

View File

@ -13,7 +13,7 @@ export async function verifiedBuild(
programId: PublicKey,
limit: number = 5
): Promise<Build | null> {
const url = `https://anchor.projectserum.com/api/v0/program/${programId.toString()}/latest?limit=${limit}`;
const url = `https://api.apr.dev/api/v0/program/${programId.toString()}/latest?limit=${limit}`;
const [programData, latestBuildsResp] = await Promise.all([
fetchData(connection, programId),
fetch(url),