Skip to content

Commit

Permalink
fix: broken og (#1881)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az authored May 9, 2024
2 parents 1852e69 + 2f66511 commit 1678a47
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 40 deletions.
10 changes: 2 additions & 8 deletions site/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,11 @@ export default defineConfig({
},
{
tag: "meta",
attrs: {
name: "og:image",
content: "/og.png"
}
attrs: { property: "og:image", content: `${SITE_URL}/og.png` }
},
{
tag: "meta",
attrs: {
name: "twitter:image",
content: "/og.png"
}
attrs: { property: "twitter:image", content: `${SITE_URL}/og.png` }
},
{
tag: "script",
Expand Down
51 changes: 26 additions & 25 deletions site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@astrojs/starlight-tailwind": "^2.0.2",
"@astrojs/svelte": "^5.4.0",
"@astrojs/tailwind": "^5.1.0",
"@expressive-code/plugin-collapsible-sections": "^0.34.1",
"@expressive-code/plugin-collapsible-sections": "^0.35.3",
"@splinetool/runtime": "^1.0.93",
"@splinetool/viewer": "^1.0.93",
"@urql/svelte": "^4.1.1",
Expand Down Expand Up @@ -50,7 +50,6 @@
"@astrojs/check": "^0.5.10",
"@astrojs/language-server": "^2.8.4",
"@astrojs/ts-plugin": "^1.6.1",
"@cloudflare/workers-types": "^4.20240405.0",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/container-queries": "^0.1.1",
"@tailwindcss/typography": "^0.5.12",
Expand Down
2 changes: 1 addition & 1 deletion site/site.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
packages = {
site = unstablePkgs.buildNpmPackage {
npmDepsHash = "sha256-dd0rU/5WHM0NVxJWjGLM34VS3Y4Hmc4vRIot49E+NuE=";
npmDepsHash = "sha256-iacabyQyragOOO1AsWc0+N14e9cyl2p3Kq+egRaSGYc=";
src = ./.;
srcs = [ ./. ./../evm/. ./../networks/genesis/. ./../versions/. ];
sourceRoot = "site";
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/graphs/ValidatorPerformance.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function seriesValue(value: any, name: string): string {
}
}
const hiddenData = Array(128 / 4)
const hiddenData = new Array(128 / 4)
.fill(0)
.map((_, i) => [i * 4, "-"])
Expand Down
2 changes: 1 addition & 1 deletion site/src/lib/utilities.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const arraySizeN = (n: number) => Array.from(Array(n).keys())
export const arraySizeN = (n: number) => Array.from(new Array(n).keys())

export const sleep = (ms: number): Promise<void> => new Promise(resolve => setTimeout(resolve, ms))

Expand Down
9 changes: 8 additions & 1 deletion site/src/pages/openapi/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ const openApiSchemaUrl = `/openapi/${slug}.json`
<body>
<script id="api-reference" is:inline></script>
<script is:inline define:vars={{ openApiSchemaUrl }}>

const url = new URL(window.location.href)
const [, queryParametersString] = url.href.split('?')
const queryParameters = new URLSearchParams(queryParametersString)

const configuration = {
theme: 'default',
theme: queryParameters.get('theme') || 'default',
layout: queryParameters.get('layout') || 'classic',
darkMode: queryParameters.get('dark') !== 'false',
}
const apiReference = document.querySelector('script#api-reference')
if (apiReference) {
Expand Down
2 changes: 1 addition & 1 deletion site/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"name": "@astrojs/ts-plugin"
}
],
"types": ["node", "bun", "@cloudflare/workers-types", "typed-query-selector/strict"]
"types": ["node", "bun", "typed-query-selector/strict"]
},
"include": ["src", "public", "scripts"],
"files": [
Expand Down

0 comments on commit 1678a47

Please sign in to comment.