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
12 changes: 9 additions & 3 deletions .github/actions/base-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
using: "composite"
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
with:
run_install: false

Expand All @@ -25,7 +25,13 @@ runs:
path: |
${{ steps.pnpm-cache.outputs.STORE_PATH }}
**/node_modules
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
${{ runner.os }}-pnpm-store-v2-

# Always reconcile node_modules with the lockfile: a restore-keys fallback
# can hand us modules from an older lockfile, which pnpm repairs quickly here.
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile

13 changes: 8 additions & 5 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,31 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Add pnpm store path to env var
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
# Restore the cache BEFORE installing: restoring afterwards can extract a
# stale node_modules (via restore-keys) on top of a fresh install and then
# save that poisoned state under the new lockfile's cache key.
- name: Cache node modules
uses: actions/cache@v4
with:
path: |
${{ steps.pnpm-cache.outputs.STORE_PATH }}
**/node_modules
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
${{ runner.os }}-pnpm-store-v2-
- name: Install dependencies
run: pnpm install --frozen-lockfile

js-lint:
needs: install_modules
Expand Down
3 changes: 3 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const config = withNextra({
eslint: {
ignoreDuringBuilds: true,
},
// Keep plain .ts out of pageExtensions so Next 15's route-export validation
// doesn't treat Nextra's _meta.ts files as pages (Nextra discovers them itself).
pageExtensions: ["tsx"],
images: {
unoptimized: true,
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"next": "15.5.24",
"next-sitemap": "4.2.3",
"next-themes": "0.4.6",
"nextra": "2.13.4",
"nextra-theme-docs": "2.13.4",
"nextra": "3.3.1",
"nextra-theme-docs": "3.3.1",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
2,568 changes: 1,343 additions & 1,225 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/components/Head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { useConfig } from "nextra-theme-docs";

export const Head = () => {
const { asPath, defaultLocale, locale } = useRouter();
const { frontMatter } = useConfig();
const { frontMatter, title: pageTitle } = useConfig();
const baseUrl = "https://docs.inkonchain.com";
const url =
baseUrl + (defaultLocale === locale ? asPath : `/${locale}${asPath}`);
const documentTitle =
asPath === "/"
? "Ink Docs - The Official Developer Guide for Ink"
: `${pageTitle} | Ink Docs`;
const title =
frontMatter.title || "Ink Docs - The Official Developer Guide for Ink";
const description =
Expand All @@ -16,6 +20,8 @@ export const Head = () => {

return (
<>
<title>{documentTitle}</title>

{/* Basic Meta Tags */}
<meta name="title" content={title} />
<meta name="description" content={description} />
Expand Down
39 changes: 0 additions & 39 deletions src/components/SidebarTitleComponent.tsx

This file was deleted.

12 changes: 4 additions & 8 deletions src/components/Toc.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import Link from "next/link";
import type { Heading } from "nextra";

import { PencilIcon } from "@/icons/Pencil";
import { ThumbUpIcon } from "@/icons/ThumbUp";
import { URLS } from "@/utils/urls";

interface Heading {
id: string;
depth: number;
value: string;
}

interface TocProps {
headings: Heading[];
toc: Heading[];
filePath: string;
}

export const Toc: React.FC<TocProps> = ({ headings }) => {
export const Toc: React.FC<TocProps> = ({ toc: headings }) => {
return (
<div className="flex flex-col items-start justify-start py-5 sticky top-14">
{headings.length > 0 && (
Expand Down
7 changes: 0 additions & 7 deletions src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@

/* We need to override the underline for nav links and sidebar items */
nav > a,
a:has(div.ink-sidebar-item),
.toc-link {
@apply no-underline;
}
Expand All @@ -66,12 +65,6 @@
display: none !important ;
}

/* Remove the padding from the sidebar link, so that we can pply our own style */
a:has(div.ink-sidebar-item) {
padding: 0 !important;
background-color: transparent !important;
}

/* Target both the banner container and its text */
.nextra-banner-container {
@apply text-white !important;
Expand Down
6 changes: 0 additions & 6 deletions src/pages/500.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Unexpected Error

![500 Error Warning.](/img/icons/500-page.svg)

## Something isn't quite right. Let's start again on the [homepage](index).

#### Please help by [submitting an issue](https://github.com/inkonchain/docs/issues/new) for the broken link. ❤️

# CHANGE

\n
7 changes: 5 additions & 2 deletions src/pages/_app.mdx → src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { ThemeProvider } from "next-themes";
import type { AppProps } from "next/app";
import Script from "next/script";
import { ThemeProvider } from "next-themes";

import { inter, plus_jakarta_sans } from "../fonts";

import "../globals.css";

export default function App({ Component, pageProps }) {
export default function App({ Component, pageProps }: AppProps) {
return (
<ThemeProvider attribute="class">
<Script

Check warning on line 12 in src/pages/_app.tsx

View workflow job for this annotation

GitHub Actions / js-lint

`next/script`'s `beforeInteractive` strategy should not be used outside of `pages/_document.js`. See: https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
id="schema-markup"
type="application/ld+json"
strategy="beforeInteractive"
Expand Down
133 changes: 0 additions & 133 deletions src/pages/_meta.json

This file was deleted.

Loading
Loading