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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
out/
pnpm-lock.yaml
dist/
# ignore below md since they are fetched from GitHub
# fetched files
website/src/openApi/*.json
website/src/pages/*/subgraphs/developing/creating/graph-ts/*.md
website/src/pages/*/subgraphs/querying/graph-client/*.md
website/src/pages/*/subgraphs/querying/graph-client/*.md
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ENV ENVIRONMENT=$ENVIRONMENT
ENV ORIGIN=$ORIGIN

ENV PNPM_HOME="/usr/bin"
ENV NODE_OPTIONS="--max_old_space_size=8192"

RUN apk add --no-cache git
RUN npm install -g corepack@latest
Expand Down
8 changes: 5 additions & 3 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ http {
rewrite ^/docs/([a-zA-Z][a-zA-Z])/cookbook/quick-start/$ $scheme://$http_host/docs/$1/subgraphs/quick-start/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/cookbook/subgraph-debug-forking/$ $scheme://$http_host/docs/$1/subgraphs/cookbook/subgraph-debug-forking/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/cookbook/subgraph-uncrashable/$ $scheme://$http_host/docs/$1/subgraphs/cookbook/subgraph-uncrashable/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/cookbook/substreams-powered-subgraphs/$ $scheme://$http_host/docs/$1/sps/introduction/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/cookbook/substreams-powered-subgraphs/$ $scheme://$http_host/docs/$1/sps/introduction/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/subgraphs/cookbook/substreams-powered-subgraphs/$ $scheme://$http_host/docs/$1/sps/introduction/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/cookbook/timeseries/$ $scheme://$http_host/docs/$1/subgraphs/best-practices/timeseries/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/subgraphs/cookbook/timeseries/$ $scheme://$http_host/docs/$1/subgraphs/best-practices/timeseries/ permanent;
Expand Down Expand Up @@ -140,6 +140,7 @@ http {
rewrite ^/docs/([a-zA-Z][a-zA-Z])/resources/release-notes/assemblyscript-migration-guide/$ $scheme://$http_host/docs/$1/resources/migration-guides/assemblyscript-migration-guide/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/release-notes/graphql-validations-migration-guide/$ $scheme://$http_host/docs/$1/resources/migration-guides/graphql-validations-migration-guide/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/resources/release-notes/graphql-validations-migration-guide/$ $scheme://$http_host/docs/$1/resources/migration-guides/graphql-validations-migration-guide/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/sps/$ $scheme://$http_host/docs/$1/sps/introduction/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/sps/triggers-example/$ $scheme://$http_host/docs/$1/sps/tutorial/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/studio/billing/$ $scheme://$http_host/docs/$1/subgraphs/billing/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/studio/deploy-subgraph-studio/$ $scheme://$http_host/docs/$1/subgraphs/developing/deploying/using-subgraph-studio/ permanent;
Expand All @@ -148,8 +149,8 @@ http {
rewrite ^/docs/([a-zA-Z][a-zA-Z])/studio/studio-faq/$ $scheme://$http_host/docs/$1/resources/subgraph-studio-faq/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/studio/subgraph-studio/$ $scheme://$http_host/docs/$1/subgraphs/developing/deploying/using-subgraph-studio/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/studio/transferring-subgraph-ownership/$ $scheme://$http_host/docs/$1/subgraphs/developing/managing/transferring-a-subgraph/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/subgraphs/$ $scheme://$http_host/docs/$1/subgraphs/developing/subgraphs/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/substreams/$ $scheme://$http_host/docs/$1/substreams/introduction/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/subgraphs/$ $scheme://$http_host/docs/$1/subgraphs/quick-start/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/substreams/$ $scheme://$http_host/docs/$1/substreams/quick-start/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/substreams/sps/(.*)$ $scheme://$http_host/docs/$1/sps/$2 permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/substreams/developing/sinks/sinks/$ $scheme://$http_host/docs/$1/substreams/developing/sinks/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/sunrise/$ $scheme://$http_host/docs/$1/archived/sunrise/ permanent;
Expand All @@ -158,6 +159,7 @@ http {
rewrite ^/docs/([a-zA-Z][a-zA-Z])/supported-networks/near/$ $scheme://$http_host/docs/$1/subgraphs/cookbook/near/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/tap/$ $scheme://$http_host/docs/$1/indexing/tap/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/tokenomics/$ $scheme://$http_host/docs/$1/resources/tokenomics/ permanent;
rewrite ^/docs/([a-zA-Z][a-zA-Z])/token-api/$ $scheme://$http_host/docs/$1/token-api/quick-start/ permanent;

# Temporary redirects (302)
rewrite ^/docs/en/querying/graph-client/$ $scheme://$http_host/docs/en/subgraphs/querying/graph-client/README/ redirect;
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "graph-docs",
"private": true,
"version": "1.0.0",
"packageManager": "pnpm@10.6.5",
"packageManager": "pnpm@10.7.0",
"scripts": {
"dev": "turbo run dev",
"build": "NODE_OPTIONS='--max_old_space_size=4096' turbo run build",
"build": "NODE_OPTIONS='--max_old_space_size=8192' turbo run build",
"check": "pnpm typecheck && pnpm lint && pnpm prettier:check",
"check:fix": "pnpm lint:fix; pnpm prettier",
"lint": "eslint . --ignore-path .gitignore --max-warnings 0",
Expand All @@ -20,9 +20,9 @@
},
"devDependencies": {
"@edgeandnode/eslint-config": "^2.0.3",
"@types/node": "^22.13.11",
"@types/node": "^22.13.14",
"eslint": "^8.57.1",
"eslint-plugin-mdx": "^3.2.0",
"eslint-plugin-mdx": "^3.3.1",
"prettier": "^3.5.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"remark-frontmatter": "^5.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/og-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"yoga-wasm-web": "^0.3.3"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20250320.0",
"@types/react": "^18.3.19",
"@cloudflare/workers-types": "^4.20250321.0",
"@types/react": "^18.3.20",
"jest-image-snapshot": "^6.4.0",
"tsx": "^4.19.3",
"typescript": "^5.8.2",
"vitest": "^2.1.9",
"wrangler": "^3.114.2"
"wrangler": "^3.114.3"
},
"sideEffects": false
}
37 changes: 37 additions & 0 deletions packages/remark-callouts/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { visit } from 'unist-util-visit'

export default function remarkCallouts() {
return (tree) => {
visit(tree, 'blockquote', (node) => {
if (
node.children &&
node.children.length > 0 &&
node.children[0].type === 'paragraph' &&
node.children[0].children &&
node.children[0].children.length > 0 &&
node.children[0].children[0].type === 'text'
) {
const firstText = node.children[0].children[0]
// Look for a callout marker like [!NOTE] or [!WARNING]
const calloutRegex = /^\s*\[!([a-zA-Z]+)\]\s*(.*)/
const match = calloutRegex.exec(firstText.value)
if (match) {
// Extract the callout type (e.g., "note") and remove the marker from the text
const calloutType = match[1].toLowerCase()
firstText.value = match[2]

// Attach the callout type as a data attribute
node.data = node.data || {}
node.data.hProperties = node.data.hProperties || {}
node.data.hProperties['data-callout-type'] = calloutType

// If the remaining text is empty (or only whitespace), remove the first paragraph and show a default title instead
if (firstText.value.trim() === '') {
node.children.shift()
node.data.hProperties['data-callout-type-show-title'] = true
}
}
}
})
}
}
12 changes: 12 additions & 0 deletions packages/remark-callouts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "remark-callouts",
"private": true,
"version": "0.0.0",
"type": "module",
"main": "index.js",
"author": "Benoît Rouleau <[email protected]>",
"dependencies": {
"unist-util-visit": "^5.0.0"
},
"sideEffects": false
}
Loading