diff --git a/.editorconfig b/.editorconfig new file mode 100755 index 00000000..7aa72618 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +# editorconfig.org +root = true + +[*] +indent_size = 2 +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = off diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..8f0079ca --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +# Production license for @nuxt/ui-pro, get one at https://ui.nuxt.com/pro/purchase +NUXT_UI_PRO_LICENSE= + +# Public URL, used for OG Image when running nuxt generate +NUXT_PUBLIC_SITE_URL= diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..22be4917 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,8 @@ +.output +.nuxt +*.d.ts +**/node_modules/** +**/build/** +**/dist/** +**/coverage/** +**/.*/** diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..e9fca7d4 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,22 @@ +{ + "env": { + "browser": true, + "es2021": true, + "node": true + }, + "extends": ["eslint:recommended", "plugin:vue/vue3-essential", "@nuxt/eslint-config"], + "plugins": ["vue"], + "rules": { + "quote-props": ["error", "as-needed"], + "vue/html-self-closing": [ + "error", + { + "html": { + "void": "always" + } + } + ], + "vue/singleline-html-element-content-newline": "off", + "vue/html-self-closing": "off" + } +} diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 00000000..cad1450e --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "community-cookbook-staging" + } +} diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..776f6694 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +# This CODEOWNERS file sets the individuals responsible for code in the era-test-node repository. + +# These users are the default owners for everything in the repo. +# They will be requested for review when someone opens a pull request. +* @zkSync-Community-Hub/zksync-devrel + +# You can also specify code owners for specific directories or files. +# For example: +# /src/ @developer1 @developer2 +# /docs/ @documenter diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..d9c0f6da --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,44 @@ +--- +name: Bug report +about: Use this template for reporting issues +title: "" +labels: bug +assignees: '' + +--- + +### 🐛 Bug Report for zkSync Docs + +#### 📝 Description + +Provide a clear and concise description of the bug. + +#### 🔄 Reproduction Steps + +1. Step 1 +2. Step 2 +3. ... + +#### 🤔 Expected Behavior + +Describe what you expected to happen. + +#### 😯 Current Behavior + +Describe what actually happened. + +#### 🖥️ Environment + +- **Node version**: [e.g., v18.17.0] +- **Operating System & Version**: [e.g., Ubuntu 20.04] +- **Other relevant environment details**: + +#### 📋 Additional Context + +Add any other context about the problem here. If applicable, add screenshots to help explain. + +#### 📎 Log Output + +``` +Paste any relevant log output here. +``` \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..61fd4b71 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: zksync-developers Discussion + url: https://github.com/zkSync-Community-Hub/zkync-developers/discussions + about: Please provide feedback, and ask questions here. diff --git a/.github/ISSUE_TEMPLATE/feature_report.md b/.github/ISSUE_TEMPLATE/feature_report.md new file mode 100644 index 00000000..4e30b239 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_report.md @@ -0,0 +1,26 @@ +--- +name: Feature request +about: Use this template for requesting features +title: "" +labels: feat +assignees: '' + +--- + +### 🌟 Feature Request + +#### 📝 Description + +Provide a clear and concise description of the feature you'd like to see. + +#### 🤔 Rationale + +Explain why this feature is important and how it benefits the project. + +#### 🖼️ Mockups/Examples + +If applicable, provide mockups or examples of how the feature would work. + +#### 📋 Additional Context + +Add any other context or information about the feature request here. \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..9edb5bc9 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,17 @@ +# What :computer: +* First thing updated with this PR +* Second thing updated with this PR +* Third thing updated with this PR + +# Why :hand: +* Reason why first thing was added to PR +* Reason why second thing was added to PR +* Reason why third thing was added to PR + +# Evidence :camera: +Include screenshots, screen recordings, or `console` output here demonstrating that your changes work as intended + + + + diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml new file mode 100644 index 00000000..7482ab35 --- /dev/null +++ b/.github/workflows/checks.yaml @@ -0,0 +1,51 @@ +name: check 🕵️ + +on: + pull_request: + branches: [main, staging] + workflow_dispatch: + +jobs: + format: + name: code_format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + - name: Install Dependencies + run: bun install + - name: Runs Prettier Formatter + run: bun run lint:prettier + + # spelling: + # name: spelling + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: oven-sh/setup-bun@v1 + # - name: Install Dependencies + # run: bun install + # - name: Runs cSpell Spell Checker + # run: bun run lint:spelling + + markdown-lint: + name: markdown_lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + - name: Install Dependencies + run: bun install + - name: Runs Markdown Linter + run: bun run lint:markdown + + eslint: + name: code_lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + - name: Install Dependencies + run: bun install + - name: Runs ESLint + run: bun run lint:eslint diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml new file mode 100644 index 00000000..b625be62 --- /dev/null +++ b/.github/workflows/deploy-preview.yml @@ -0,0 +1,35 @@ +name: "preview builder 👀" +on: + pull_request: + workflow_dispatch: + +jobs: + build_and_preview: + env: + NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} + NUXT_PUBLIC_SITE_URL: ${{ secrets.NUXT_PUBLIC_SITE_URL }} + if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository }} + runs-on: ubuntu-latest + outputs: + output_urls: "${{ steps.preview_deploy.outputs.urls }}" + steps: + - uses: actions/checkout@v4 # v4 + + - uses: oven-sh/setup-bun@v1 + + - name: "Install dependencies" + run: bun install + + - name: "Deploy target: preview" + run: bun run generate + + - uses: untitaker/hyperlink@0.1.32 + with: + args: .output/public/ --sources content/ + + - name: "Deploy preview" + uses: matter-labs/action-hosting-deploy@main + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_COMMUNITY_COOKBOOK_STAGING }}" + projectId: community-cookbook-staging diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 00000000..25ca469f --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,56 @@ +name: "deploy 🚀" +on: + push: + branches: [main] + +jobs: + build_and_deploy: + env: + NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} + if: ${{ github.event.repository.full_name == github.repository }} + runs-on: ubuntu-latest + environment: prod + steps: + - uses: actions/checkout@v4 # v4 + with: + fetch-depth: 0 + # Whether to configure the token or SSH key with the local git config + # Default: true + persist-credentials: false # <--- checking this in commit context + + - uses: oven-sh/setup-bun@v1 + + - name: "Install dependencies" + run: bun install + - name: "Deploy target: production 🚀" + run: bun run generate + # TODO: ask about below + # env: + # RUDDERSTACK_WRITE_KEY: "${{ secrets.RUDDERSTACK_WRITE_KEY }}" + # RUDDERSTACK_DATA_PLANE_URL: "${{ secrets.RUDDERSTACK_DATA_PLANE_URL }}" + + - uses: matter-labs/action-hosting-deploy@main + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_COMMUNITY_COOKBOOK }}" + target: prod + projectId: community-cookbook + channelId: live + + # TODO: re-enable once we are closer to production deployment + # - name: Purge cf cache + # uses: nathanvaughn/actions-cloudflare-purge@db8c58f61ba4c3ec77229c8fa14ddebb3b59932f # v3.1.0 + # with: + # cf_zone: ${{ secrets.CLOUDFLARE_ZONE }} + # cf_auth: ${{ secrets.CLOUDFLARE_AUTH_KEY }} + # hosts: | + # docs.zksync.io + # era.zksync.io + # v2-docs.zksync.io + + # TODO: Implement reindex task tracking instead of blindly exiting on task submit + # - name: Trigger Algolia reindex + # run: | + # curl -X POST "${{ secrets.ALGOLIA_CRAWLER_BASE_URL }}/crawlers/${{ secrets.ALGOLIA_CRAWLER_ID }}/reindex" \ + # -H "Content-Type: application/json" \ + # --user "${{ secrets.ALGOLIA_CRAWLER_USER_ID }}:${{ secrets.ALGOLIA_CRAWLER_API_KEY }}" diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml new file mode 100644 index 00000000..19ef57fa --- /dev/null +++ b/.github/workflows/deploy-staging.yml @@ -0,0 +1,30 @@ +name: "deploy staging 🏗️" +on: + push: + branches: [staging] + +jobs: + build_and_deploy: + env: + NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }} + NUXT_PUBLIC_SITE_URL: ${{ secrets.NUXT_PUBLIC_SITE_URL }} + if: ${{ github.event.repository.full_name == github.repository }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 # v4 + with: + ref: "${{ github.event.inputs.ref }}" + + - uses: oven-sh/setup-bun@v1 + + - name: "Install dependencies" + run: bun install + - name: "Deploy target: staging" + run: bun run generate + + - uses: matter-labs/action-hosting-deploy@main + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_COMMUNITY_COOKBOOK_STAGING }}" + projectId: community-cookbook-staging + channelId: live diff --git a/.github/workflows/secrets_scanner.yaml b/.github/workflows/secrets_scanner.yaml new file mode 100644 index 00000000..8904a999 --- /dev/null +++ b/.github/workflows/secrets_scanner.yaml @@ -0,0 +1,19 @@ +name: scan 🔍 +on: + pull_request: + merge_group: +jobs: + secrets: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + - name: TruffleHog OSS + uses: trufflesecurity/trufflehog@f2a0ea0b70288cf25ba46d906034417555a207a8 # v3.69.0 + with: + path: ./ + base: ${{ github.event.repository.default_branch }} + head: HEAD + extra_args: --debug --only-verified diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..ec3ec23e --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + +# Logs +logs +*.log + +# Misc +.DS_Store +.fleet +.idea + +# Local env files +.env +.env.* +!.env.example + +# VSC +.history + +.firebase +.unlighthouse diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 00000000..a9e61989 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json", + "default": true, + "MD001": false, + "MD007": { + "indent": 2 + }, + "MD013": { + "code_blocks": false, + "line_length": 150, + "tables": false + }, + "MD033": false, + "MD003": false, + "MD034": false, + "MD024": false, + "MD022": false, + "MD023": false, + "MD046": false +} diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..bf2e7648 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +shamefully-hoist=true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..3f5a5547 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +node_modules +.github +.idea +public +**/*.md diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..2bebcd86 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,14 @@ +{ + "plugins": ["prettier-plugin-tailwindcss"], + "bracketSameLine": false, + "printWidth": 120, + "useTabs": false, + "tabWidth": 2, + "semi": true, + "trailingComma": "es5", + "singleQuote": true, + "bracketSpacing": true, + "vueIndentScriptAndStyle": false, + "proseWrap": "always", + "singleAttributePerLine": true +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..12c3eb1e --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,19 @@ +{ + "recommendations": [ + "bradlc.vscode-tailwindcss", + "christian-kohler.npm-intellisense", + "christian-kohler.path-intellisense", + "DavidAnson.vscode-markdownlint", + "dbaeumer.vscode-eslint", + "editorconfig.editor", + "esbenp.prettier-vscode", + "mikestead.dotenv", + "nuxt.mdc", + "rvest.vs-code-prettier-eslint", + "simonsiefke.svg-preview", + "streetsidesoftware.code-spell-checker", + "vue.volar", + "yoavbls.pretty-ts-errors" + ], + "unwantedRecommendations": ["vue.vscode-typescript-vue-plugin"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7cbd388d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,22 @@ +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnType": false, + "editor.formatOnPaste": false, + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "file", + "editor.tabSize": 2, + "editor.insertSpaces": true, + "files.eol": "\n", + "[markdown]": { + "editor.wordWrap": "on", + "editor.defaultFormatter": "DavidAnson.vscode-markdownlint", + "editor.formatOnSave": true, + "editor.suggest.showWords": false, + "editor.quickSuggestions": { + "other": "on", + "comments": "off", + "strings": "off" + }, + "editor.tabCompletion": "onlySnippets" + } +} diff --git a/.vscode/snippets.code-snippets b/.vscode/snippets.code-snippets new file mode 100644 index 00000000..3467bf9d --- /dev/null +++ b/.vscode/snippets.code-snippets @@ -0,0 +1,46 @@ +{ + // Place your zksync-docs workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. + // Placeholders with the same ids are connected. + // Example: + // "Print to console": { + // "scope": "javascript,typescript", + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "ZK Snippet": { + "scope": "markdown", + "prefix": "@zk", + "body": ["%%zk_$1%%$0"], + }, + "Callout": { + "scope": "markdown", + "prefix": "@callout", + "body": ["::callout{icon=\"$1\" color=\"$2\"}", "$0", "::"], + "description": "Callout component", + }, + "AlertCallout": { + "scope": "markdown", + "prefix": "@alert", + "body": ["::callout{icon=\"i-heroicons-exclamation-triangle\" color=\"amber\"}", "$0", "::"], + "description": "Callout component", + }, + "InfoCallout": { + "scope": "markdown", + "prefix": "@info", + "body": ["::callout{icon=\"i-heroicons-information-circle\" color=\"blue\"}", "$0", "::"], + "description": "Callout component", + }, + "CodeGroup": { + "scope": "markdown", + "prefix": "@codegroup", + "body": ["::code-group", "", "```bash [yarn]", "", "```", "", "```bash [npm]", "", "```", "", "::"], + }, +} diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 4a1f4ca2..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 zkSync Community Hub - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..ebf90395 --- /dev/null +++ b/README.md @@ -0,0 +1,125 @@ +![nuxt-ui-docs-social-card](https://github.com/nuxt-ui-pro/docs/assets/739984/f64e13d9-9ae0-4e03-bf7f-6be4c36cd9ba) + +# Nuxt UI Pro - Docs template + +[![Nuxt UI Pro](https://img.shields.io/badge/Made%20with-Nuxt%20UI%20Pro-00DC82?logo=nuxt.js&labelColor=020420)](https://ui.nuxt.com/pro) +[![Nuxt Studio](https://img.shields.io/badge/Open%20in%20Nuxt%20Studio-18181B?&logo=nuxt.js&logoColor=3BB5EC)](https://nuxt.studio/themes/docs) + +- [Live demo](https://docs-template.nuxt.dev/) +- [Play on Stackblitz](https://stackblitz.com/github/nuxt-ui-pro/docs) +- [Documentation](https://ui.nuxt.com/pro/getting-started) +- [Clone on Nuxt Studio](https://nuxt.studio/themes/docs) + +## Quick Start + +```bash [Terminal] +npx nuxi init -t github:nuxt-ui-pro/docs +``` + +## Setup + +Make sure to install the dependencies: + +```bash +# npm +npm install + +# pnpm +pnpm install + +# yarn +yarn install + +# bun +bun install +``` + +## Development Server + +Start the development server on `http://localhost:3000`: + +```bash +# npm +npm run dev + +# pnpm +pnpm run dev + +# yarn +yarn dev + +# bun +bun run dev +``` + +## Production + +Build the application for production: + +```bash +# npm +npm run build + +# pnpm +pnpm run build + +# yarn +yarn build + +# bun +bun run build +``` + +Locally preview production build: + +```bash +# npm +npm run preview + +# pnpm +pnpm run preview + +# yarn +yarn preview + +# bun +bun run preview +``` + +Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. + +## Nuxt Studio integration + +Add `@nuxthq/studio` dependency to your package.json: + +```bash +# npm +npm install --save-dev @nuxthq/studio + +# pnpm +pnpm add -D @nuxthq/studio + +# yarn +yarn add -D @nuxthq/studio + +# bun +bun add -d @nuxthq/studio +``` + +Add this module to your `nuxt.config.ts`: + +```ts +export default defineNuxtConfig({ + ... + modules: [ + ... + '@nuxthq/studio' + ] +}) +``` + +Read more on [Nuxt Studio docs](https://nuxt.studio/docs/projects/setup). + +## Renovate integration + +Install [Renovate GitHub app](https://github.com/apps/renovate/installations/select_target) on your repository and you are good to go. diff --git a/app.config.ts b/app.config.ts new file mode 100644 index 00000000..bec4bd3e --- /dev/null +++ b/app.config.ts @@ -0,0 +1,96 @@ +export default defineAppConfig({ + ui: { + variables: { + light: { + background: '255 252 255', + // foreground: '147 68 68', + }, + dark: { + background: '17 20 43', + // foreground: 'var(--color-gray-200)', + }, + // header: { + // height: '1rem', + // }, + }, + primary: 'zkPurple', + gray: 'zkSlate', + footer: { + bottom: { + left: 'text-sm text-gray-500 dark:text-gray-400', + wrapper: 'border-t border-gray-200 dark:border-gray-800', + }, + }, + content: { + prose: { + code: { + icon: { + go: 'vscode-icons:file-type-go', + vyper: 'devicon:vyper', + sol: 'vscode-icons:file-type-solidity', + }, + }, + }, + }, + }, + seo: { + siteName: 'zkSync Community Cookbook', + }, + header: { + logo: { + alt: '', + light: '/logos/zksync_logo_black.svg', + dark: '/logos/zksync_logo.svg', + }, + search: false, + colorMode: true, + links: [ + { + icon: 'i-simple-icons-github', + to: 'https://github.com/matter-labs/zksync-docs', + target: '_blank', + 'aria-label': 'zkSync Docs on GitHub', + title: 'zkSync Docs on GitHub', + }, + ], + }, + footer: { + credits: 'Made with ❤️ by Matter Labs & Community', + colorMode: false, + links: [ + { + icon: 'i-zksync-matterlabs-logo', + to: 'https://matter-labs.io', + target: '_blank', + 'aria-label': 'MatterLabs Website', + }, + { + icon: 'i-simple-icons-x', + to: 'https://x.com/zksync', + target: '_blank', + 'aria-label': 'zkSync on X', + }, + { + icon: 'i-simple-icons-github', + to: 'https://github.com/matter-labs', + target: '_blank', + 'aria-label': 'zkSync on GitHub', + }, + { + icon: 'i-simple-icons-discord', + to: 'https://join.zksync.dev/', + target: '_blank', + 'aria-label': 'zkSync on Discord', + }, + ], + }, + toc: { + title: 'Table of Contents', + bottom: { + title: '', + edit: 'https://github.com/matter-labs/zksync-docs/edit/staging/content', + feedback: 'https://github.com/matter-labs/zksync-docs/issues/new?labels=documentation', + links: [], + }, + }, +}); diff --git a/app.vue b/app.vue new file mode 100644 index 00000000..32eb2557 --- /dev/null +++ b/app.vue @@ -0,0 +1,75 @@ + + + diff --git a/assets/zksync-icons.ts b/assets/zksync-icons.ts new file mode 100644 index 00000000..5b347a6b --- /dev/null +++ b/assets/zksync-icons.ts @@ -0,0 +1,35 @@ +export const zksyncIcons = { + icons: { + logo: { + body: '', + }, + 'matterlabs-logo': { + // svg body + body: '', + // svg width and height, optional + width: 24, + height: 24, + }, + 'atlas-zk-logo': { + body: ` + + + `, + }, + 'remix-logo': { + body: ` + + + + `, + }, + }, +}; diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 00000000..fe221d5e Binary files /dev/null and b/bun.lockb differ diff --git a/components/AppFooter.vue b/components/AppFooter.vue new file mode 100644 index 00000000..a5dc4a5f --- /dev/null +++ b/components/AppFooter.vue @@ -0,0 +1,23 @@ + + + diff --git a/components/AppHeader.vue b/components/AppHeader.vue new file mode 100644 index 00000000..8d83e6c4 --- /dev/null +++ b/components/AppHeader.vue @@ -0,0 +1,54 @@ + + + diff --git a/components/OgImage/OgImageDocs.vue b/components/OgImage/OgImageDocs.vue new file mode 100644 index 00000000..f91283fd --- /dev/null +++ b/components/OgImage/OgImageDocs.vue @@ -0,0 +1,1704 @@ + + + diff --git a/components/content/CheckIcon.vue b/components/content/CheckIcon.vue new file mode 100644 index 00000000..6c9f6ca0 --- /dev/null +++ b/components/content/CheckIcon.vue @@ -0,0 +1,17 @@ + + + diff --git a/components/content/ContentSwitcher.vue b/components/content/ContentSwitcher.vue new file mode 100644 index 00000000..19e1ab7c --- /dev/null +++ b/components/content/ContentSwitcher.vue @@ -0,0 +1,41 @@ + + + diff --git a/components/content/DisplayPartial.vue b/components/content/DisplayPartial.vue new file mode 100644 index 00000000..7eead62f --- /dev/null +++ b/components/content/DisplayPartial.vue @@ -0,0 +1,16 @@ + + + diff --git a/components/content/DropPanel/DropPanel.vue b/components/content/DropPanel/DropPanel.vue new file mode 100644 index 00000000..cc788770 --- /dev/null +++ b/components/content/DropPanel/DropPanel.vue @@ -0,0 +1,58 @@ + + + diff --git a/components/content/DropPanel/Panel.vue b/components/content/DropPanel/Panel.vue new file mode 100644 index 00000000..251e2f20 --- /dev/null +++ b/components/content/DropPanel/Panel.vue @@ -0,0 +1,18 @@ + + + diff --git a/components/content/ImgPreview.vue b/components/content/ImgPreview.vue new file mode 100644 index 00000000..4a9b7694 --- /dev/null +++ b/components/content/ImgPreview.vue @@ -0,0 +1,86 @@ + + + diff --git a/components/content/ProseA.vue b/components/content/ProseA.vue new file mode 100644 index 00000000..007793fc --- /dev/null +++ b/components/content/ProseA.vue @@ -0,0 +1,36 @@ + + + diff --git a/components/content/ProseCodeInline.vue b/components/content/ProseCodeInline.vue new file mode 100644 index 00000000..5e85672e --- /dev/null +++ b/components/content/ProseCodeInline.vue @@ -0,0 +1,18 @@ + + + diff --git a/components/content/ProseImg.vue b/components/content/ProseImg.vue new file mode 100644 index 00000000..dc8c0790 --- /dev/null +++ b/components/content/ProseImg.vue @@ -0,0 +1,48 @@ + + + diff --git a/content/_zksync.json b/content/_zksync.json new file mode 100644 index 00000000..968972f8 --- /dev/null +++ b/content/_zksync.json @@ -0,0 +1,53 @@ +{ + "zkevm": { + "label": "zkSync VM" + }, + "mainnet": { + "name": "zkSync Era Mainnet", + "identifier": "mainnet", + "rpc_url": "https://mainnet.era.zksync.io", + "websocket_url": "wss://mainnet.era.zksync.io/ws", + "chain_id": 324, + "currency_symbol": "ETH", + "block_explorer_url": "https://explorer.zksync.io" + }, + "testnet": { + "name": "zkSync Era Testnet", + "identifier": "sepolia", + "rpc_url": "https://sepolia.era.zksync.dev", + "websocket_url": "wss://sepolia.era.zksync.dev/ws", + "chain_id": 280, + "currency_symbol": "ETH", + "block_explorer_url": "https://sepolia.explorer.zksync.io" + }, + "git_repo": { + "block-explorer": "https://github.com/matter-labs/block-explorer", + "era-boojum": "https://github.com/matter-labs/era-boojum", + "era-compiler-llvm": "https://github.com/matter-labs/era-compiler-llvm", + "era-compiler-llvm-context": "https://github.com/matter-labs/era-compiler-llvm-context", + "era-compiler-solidity": "https://github.com/matter-labs/era-compiler-solidity", + "era-compiler-vyper": "https://github.com/matter-labs/era-compiler-vyper", + "era-contracts": "https://github.com/matter-labs/era-contracts", + "era-hardhat-with-plugins": "https://github.com/matter-labs/era-hardhat-with-plugins", + "era-test-node": "https://github.com/matter-labs/era-test-node", + "era-solidity": "https://github.com/matter-labs/era-solidity", + "era-zkEVM-assembly": "https://github.com/matter-labs/era-zkEVM-assembly", + "era-zkevm_circuits": "https://github.com/matter-labs/era-zkevm_circuits", + "era-zkevm_test_harness": "https://github.com/matter-labs/era-zkevm_test_harness", + "eravm-spec": "https://matter-labs.github.io/eravm-spec", + "foundry-zksync": "https://github.com/matter-labs/foundry-zksync", + "franklin-crypto": "https://github.com/matter-labs/franklin-crypto", + "hardhat-zksync": "https://github.com/matter-labs/hardhat-zksync", + "local-setup": "https://github.com/matter-labs/local-setup", + "matter-labs-github-io": "https://matter-labs.github.io", + "zksolc-bin": "https://github.com/matter-labs/zksolc-bin", + "zksync-cli": "https://github.com/matter-labs/zksync-cli", + "zksync-contract-templates": "https://github.com/matter-labs/zksync-contract-templates", + "zksync-developers": "https://github.com/zkSync-Community-Hub/zksync-developers", + "zksync-docs": "https://github.com/matter-labs/zksync-docs", + "zksync-era": "https://github.com/matter-labs/zksync-era", + "zksync-frontend-templates": "https://github.com/matter-labs/zksync-frontend-templates", + "zksync-scripting-templates": "https://github.com/matter-labs/zksync-scripting-templates", + "zkvyper-bin": "https://github.com/matter-labs/zkvyper-bin" + } +} diff --git a/content/index.yml b/content/index.yml new file mode 100644 index 00000000..a59aaee6 --- /dev/null +++ b/content/index.yml @@ -0,0 +1,13 @@ +title: 'zkSync Community Cookbook' +description: + Nuxt UI Pro is a collection of premium Vue components built on top of Nuxt UI to create beautiful & responsive Nuxt + applications in minutes. +navigation: false +features: + title: 'All-in-one docs template' + links: + - label: 'Explore community guides' + trailingIcon: 'i-heroicons-arrow-right-20-solid' + color: 'gray' + to: '/tutorials' + size: lg diff --git a/content/tutorials/another-guide/10.index.md b/content/tutorials/another-guide/10.index.md new file mode 100644 index 00000000..e42dc98e --- /dev/null +++ b/content/tutorials/another-guide/10.index.md @@ -0,0 +1,53 @@ +--- +title: Another Guide +description: Another guide to learn things. +--- + +## Avidi deceptam precesque struxisse + +Lorem **markdownum quacumque**, ait pectore lacu. Unda exerceor, ille lacrimis +ardent, non factus Laurentes equo aequora, mater aura? Ausorum fruge moturaque +fama: intellecta subiere erat laborem. Est fallente, procorum, sospes? + +1. Quicumque nisi petuntur +2. Tecta fuga tabuerit +3. Vigor exitium ad maior bracchia Seriphi dubites +4. Nympha per puerum quotiensque mihi +5. Quaerere sum socer +6. Ea vocant dextra lurida dicemur Phaethon cultros + +## Rogant et acervo hausta cognoscit diversa + +Procul ruitis quaecumque natus; corpore rettulit Telephus totius et Actaeon +utraque, deciperetur. Nobis congerie lentaque, [ut paene +loquendo](http://www.opertosnon.org/matrescorpora) lapidoso te utque erat +densetur tonitruque et. Fila hinc quibus increscere osse pariter! + +> Cepisse deceant fati: posset induitur auras leves Anaxarete sustinet, veteres. +> Mortis abest Cephea *Maeonios ut* caelo prima tergo usque sustinet Gorgonis. +> Fefellerat *fecit*, Ennomon figura. + +## Iuveni opus + +Sagittis capillos, super ante omnia undas: frater ecce tyranni novis. Ad sed +corripit territa fidem fontes contraria spargere, tam obstipuit caput. Fert +datis positaque Cybeleia [fida se refugerat](http://talia.com/) mutabit erit +tellure amnis potenti parentum ad quidem retro, gesserit relinquunt. Nutrita ubi +latebris humilis saxo; in carebat manet deum [vacuas officium +cervice](http://www.suus-visa.com/corpusqueprofanus.html) sideribus terrebant +manente. + + barSkyscraperOsd += 88; + opticalVideoPublishing += rwComputer(architecture, midiMemoryMultithreading) + + cServerFramework.rss(ocr_property_emulation) * nuiSoftware; + var dma_motion_pitch = server; + +Trabibus tenebant edita! Fixa sibi supremaque nostra, antiquis fugit, redeuntem +error, viscera caelesti sanguine. Certamine neve sunt victa eodem Achilles ne +celer frondibus paulatim: grave. Pars mox Argos, humo [ille quoque +referam](http://arva.com/plumbo-ferendo.php) deprendit nullum. Reliquit ut ter +et videbar liceret pinum. + +Ut quoque, relictus *inplevi* prius [Parnasia plura +ingemuit](http://www.divinae.io/spiritus.html) mane. Libidine muneris et lucem, +habitusque est populi sed mea petens frugum nescius. diff --git a/content/tutorials/another-guide/20.lets-do-something.md b/content/tutorials/another-guide/20.lets-do-something.md new file mode 100644 index 00000000..f0991f34 --- /dev/null +++ b/content/tutorials/another-guide/20.lets-do-something.md @@ -0,0 +1,45 @@ +--- +title: Step 2 +description: The next step in the guide +--- + +## Pede si diva cruentat et non patri + +Lorem markdownum illud **si**, boum gelidis ab limite, pallore poenam +navifragumque filo: vectus in. Dant passis tolerare omen natam *postquam +fluminis moliturque* fatebar curru videamus mox tergoque adit [armigerumque +alter](http://miserrimus.io/cedere.html) tandem, erat conata. Draconibus +transtra. + +- Ducit frigus consequitur alimentaque Eurydicenque virgineos Abantiades +- Saepe tollens contemptor corpora tuam +- Loricamque utque neu non loquerentur acui +- Extremis aequantur cognoscit qui orbis spumantia pariter +- Muta utque patitur verti vetustas forma + +Tenebat Pelops Rhenum vacantem hinc plumbo subito quae via annos populari inviso +equos, volucres Lampetie Delius. Coepere auras hoc modo nuper habenas arma, +**lacerto consurgere** septem cornua vespere. Crescendo his, est coniunx umeris! + +## Viscera optima matrona prehensis quaerit inmurmurat divino + +Perdere et iamque, habent in Thaumantias emicuit, ipse perque vultus iuvat, +dextera quae, flamma utraque. Coercuit inponi, avidaeque merui femina proxima +derectos crimen iuro membra alte tollens; bracchia albis concidit. + +> Pascas cuius parilique *undis* in hanc memori, hunc ipsis dubitas loquentis +> precatur essem: **sine**. Non [satis](http://www.sospite.net/nec-et), abstinet +> tumulus. Diffidunt sacrifica si aether umbras quasi, fatis saepe *favete*. +> Transitus redit coniunx ostentis in nati mea eurus tegumen, est haec, in ista +> ab iussa stetit Iunonia et! + +Tenuisse regni, [tepente caecoque Mopsopium](http://per.com/notissima.html), +corripiens vulgus; est [dies](http://precor.com/) est terrae collo ad mandabat +*conclamat movere vocem*. Concipiunt enim. Te fulvum **sortes** in neque, agendo +mihi Phoebus. Facies et simillima titubare: Erasinus *oras*. + +Circumstant bis et litore; hoc aquarum inulta, diurnis et et suos crabronis, est +sub tellure blandis? Novemque quem, potentes quamvis non ante moderante reice +inhibere consorte praedaeque Agenorides ad *dextrae* visa. In **corpore**: et +fatemur, resides contraxit Athamanta novum. Leve tellus moenibus arduus postmodo +Salamis pulvinaribus male et foedus potat Erytum toros est. diff --git a/content/tutorials/another-guide/30.last-step.md b/content/tutorials/another-guide/30.last-step.md new file mode 100644 index 00000000..aa10fc80 --- /dev/null +++ b/content/tutorials/another-guide/30.last-step.md @@ -0,0 +1,45 @@ +--- +title: Final Step +description: The last step to this guide. +--- + +## Pede si diva cruentat et non patri + +Lorem markdownum illud **si**, boum gelidis ab limite, pallore poenam +navifragumque filo: vectus in. Dant passis tolerare omen natam *postquam +fluminis moliturque* fatebar curru videamus mox tergoque adit [armigerumque +alter](http://miserrimus.io/cedere.html) tandem, erat conata. Draconibus +transtra. + +- Ducit frigus consequitur alimentaque Eurydicenque virgineos Abantiades +- Saepe tollens contemptor corpora tuam +- Loricamque utque neu non loquerentur acui +- Extremis aequantur cognoscit qui orbis spumantia pariter +- Muta utque patitur verti vetustas forma + +Tenebat Pelops Rhenum vacantem hinc plumbo subito quae via annos populari inviso +equos, volucres Lampetie Delius. Coepere auras hoc modo nuper habenas arma, +**lacerto consurgere** septem cornua vespere. Crescendo his, est coniunx umeris! + +## Viscera optima matrona prehensis quaerit inmurmurat divino + +Perdere et iamque, habent in Thaumantias emicuit, ipse perque vultus iuvat, +dextera quae, flamma utraque. Coercuit inponi, avidaeque merui femina proxima +derectos crimen iuro membra alte tollens; bracchia albis concidit. + +> Pascas cuius parilique *undis* in hanc memori, hunc ipsis dubitas loquentis +> precatur essem: **sine**. Non [satis](http://www.sospite.net/nec-et), abstinet +> tumulus. Diffidunt sacrifica si aether umbras quasi, fatis saepe *favete*. +> Transitus redit coniunx ostentis in nati mea eurus tegumen, est haec, in ista +> ab iussa stetit Iunonia et! + +Tenuisse regni, [tepente caecoque Mopsopium](http://per.com/notissima.html), +corripiens vulgus; est [dies](http://precor.com/) est terrae collo ad mandabat +*conclamat movere vocem*. Concipiunt enim. Te fulvum **sortes** in neque, agendo +mihi Phoebus. Facies et simillima titubare: Erasinus *oras*. + +Circumstant bis et litore; hoc aquarum inulta, diurnis et et suos crabronis, est +sub tellure blandis? Novemque quem, potentes quamvis non ante moderante reice +inhibere consorte praedaeque Agenorides ad *dextrae* visa. In **corpore**: et +fatemur, resides contraxit Athamanta novum. Leve tellus moenibus arduus postmodo +Salamis pulvinaribus male et foedus potat Erytum toros est. diff --git a/content/tutorials/another-guide/_info.yml b/content/tutorials/another-guide/_info.yml new file mode 100644 index 00000000..6f1b5a03 --- /dev/null +++ b/content/tutorials/another-guide/_info.yml @@ -0,0 +1,28 @@ +title: Another Guide +author: + name: Jane Doe + url: https://example.com + avatar: https://avatars.githubusercontent.com/u/812331?v=4 +github_repo: https://github.com/zkSync-Community-Hub +tags: + - web3 + - vyper +summary: This is a short description of the guide that will show up on tweets or previews. +description: + This is an extra long description that goes into more detail about the guide. It can be as long as you want, but it + should be a few sentences long. This is an extra long description that goes into more detail about the guide. It can + be as long as you want, but it should be a few sentences long. This is an extra long description that goes into more + detail about the guide. It can be as long as you want, but it should be a few sentences long. +what_you_will_learn: + - You'll learn how to make an example app + - You'll learn new tools + - ??? + - Profit! +updated: 2024-04-25 +tools: + - Git + - Docker + - zksync-cli + - Hardhat +related_tutorials: + - /tutorials/another-tutorial diff --git a/content/tutorials/best-tutorial/10.index.md b/content/tutorials/best-tutorial/10.index.md new file mode 100644 index 00000000..d4086c5c --- /dev/null +++ b/content/tutorials/best-tutorial/10.index.md @@ -0,0 +1,53 @@ +--- +title: Best Tutorial +description: The best tutorial to learn from. +--- + +## Avidi deceptam precesque struxisse + +Lorem **markdownum quacumque**, ait pectore lacu. Unda exerceor, ille lacrimis +ardent, non factus Laurentes equo aequora, mater aura? Ausorum fruge moturaque +fama: intellecta subiere erat laborem. Est fallente, procorum, sospes? + +1. Quicumque nisi petuntur +2. Tecta fuga tabuerit +3. Vigor exitium ad maior bracchia Seriphi dubites +4. Nympha per puerum quotiensque mihi +5. Quaerere sum socer +6. Ea vocant dextra lurida dicemur Phaethon cultros + +## Rogant et acervo hausta cognoscit diversa + +Procul ruitis quaecumque natus; corpore rettulit Telephus totius et Actaeon +utraque, deciperetur. Nobis congerie lentaque, [ut paene +loquendo](http://www.opertosnon.org/matrescorpora) lapidoso te utque erat +densetur tonitruque et. Fila hinc quibus increscere osse pariter! + +> Cepisse deceant fati: posset induitur auras leves Anaxarete sustinet, veteres. +> Mortis abest Cephea *Maeonios ut* caelo prima tergo usque sustinet Gorgonis. +> Fefellerat *fecit*, Ennomon figura. + +## Iuveni opus + +Sagittis capillos, super ante omnia undas: frater ecce tyranni novis. Ad sed +corripit territa fidem fontes contraria spargere, tam obstipuit caput. Fert +datis positaque Cybeleia [fida se refugerat](http://talia.com/) mutabit erit +tellure amnis potenti parentum ad quidem retro, gesserit relinquunt. Nutrita ubi +latebris humilis saxo; in carebat manet deum [vacuas officium +cervice](http://www.suus-visa.com/corpusqueprofanus.html) sideribus terrebant +manente. + + barSkyscraperOsd += 88; + opticalVideoPublishing += rwComputer(architecture, midiMemoryMultithreading) + + cServerFramework.rss(ocr_property_emulation) * nuiSoftware; + var dma_motion_pitch = server; + +Trabibus tenebant edita! Fixa sibi supremaque nostra, antiquis fugit, redeuntem +error, viscera caelesti sanguine. Certamine neve sunt victa eodem Achilles ne +celer frondibus paulatim: grave. Pars mox Argos, humo [ille quoque +referam](http://arva.com/plumbo-ferendo.php) deprendit nullum. Reliquit ut ter +et videbar liceret pinum. + +Ut quoque, relictus *inplevi* prius [Parnasia plura +ingemuit](http://www.divinae.io/spiritus.html) mane. Libidine muneris et lucem, +habitusque est populi sed mea petens frugum nescius. diff --git a/content/tutorials/best-tutorial/20.next.md b/content/tutorials/best-tutorial/20.next.md new file mode 100644 index 00000000..c91dbdde --- /dev/null +++ b/content/tutorials/best-tutorial/20.next.md @@ -0,0 +1,45 @@ +--- +title: Finish +description: We finish up the guide here. +--- + +## Pede si diva cruentat et non patri + +Lorem markdownum illud **si**, boum gelidis ab limite, pallore poenam +navifragumque filo: vectus in. Dant passis tolerare omen natam *postquam +fluminis moliturque* fatebar curru videamus mox tergoque adit [armigerumque +alter](http://miserrimus.io/cedere.html) tandem, erat conata. Draconibus +transtra. + +- Ducit frigus consequitur alimentaque Eurydicenque virgineos Abantiades +- Saepe tollens contemptor corpora tuam +- Loricamque utque neu non loquerentur acui +- Extremis aequantur cognoscit qui orbis spumantia pariter +- Muta utque patitur verti vetustas forma + +Tenebat Pelops Rhenum vacantem hinc plumbo subito quae via annos populari inviso +equos, volucres Lampetie Delius. Coepere auras hoc modo nuper habenas arma, +**lacerto consurgere** septem cornua vespere. Crescendo his, est coniunx umeris! + +## Viscera optima matrona prehensis quaerit inmurmurat divino + +Perdere et iamque, habent in Thaumantias emicuit, ipse perque vultus iuvat, +dextera quae, flamma utraque. Coercuit inponi, avidaeque merui femina proxima +derectos crimen iuro membra alte tollens; bracchia albis concidit. + +> Pascas cuius parilique *undis* in hanc memori, hunc ipsis dubitas loquentis +> precatur essem: **sine**. Non [satis](http://www.sospite.net/nec-et), abstinet +> tumulus. Diffidunt sacrifica si aether umbras quasi, fatis saepe *favete*. +> Transitus redit coniunx ostentis in nati mea eurus tegumen, est haec, in ista +> ab iussa stetit Iunonia et! + +Tenuisse regni, [tepente caecoque Mopsopium](http://per.com/notissima.html), +corripiens vulgus; est [dies](http://precor.com/) est terrae collo ad mandabat +*conclamat movere vocem*. Concipiunt enim. Te fulvum **sortes** in neque, agendo +mihi Phoebus. Facies et simillima titubare: Erasinus *oras*. + +Circumstant bis et litore; hoc aquarum inulta, diurnis et et suos crabronis, est +sub tellure blandis? Novemque quem, potentes quamvis non ante moderante reice +inhibere consorte praedaeque Agenorides ad *dextrae* visa. In **corpore**: et +fatemur, resides contraxit Athamanta novum. Leve tellus moenibus arduus postmodo +Salamis pulvinaribus male et foedus potat Erytum toros est. diff --git a/content/tutorials/best-tutorial/_info.yml b/content/tutorials/best-tutorial/_info.yml new file mode 100644 index 00000000..702ff497 --- /dev/null +++ b/content/tutorials/best-tutorial/_info.yml @@ -0,0 +1,27 @@ +title: Best Tutorial +author: + name: Jane Doe + url: https://example.com + avatar: https://avatars.githubusercontent.com/u/812331?v=4 +github_repo: https://github.com/zkSync-Community-Hub +tags: + - hardhat + - viem + - solidity +summary: This is a short description of the guide that will show up on tweets or previews. +description: + This is an extra long description that goes into more detail about the guide. It can be as long as you want, but it + should be a few sentences long. +what_you_will_learn: + - You'll learn how to make an example app + - You'll learn new tools + - ??? + - Profit! +updated: 2024-04-25 +tools: + - Git + - Docker + - zksync-cli + - Hardhat +related_tutorials: + - /tutorials/another-tutorial diff --git a/content/tutorials/cool-guide/10.index.md b/content/tutorials/cool-guide/10.index.md new file mode 100644 index 00000000..b452adbd --- /dev/null +++ b/content/tutorials/cool-guide/10.index.md @@ -0,0 +1,53 @@ +--- +title: Cool Guide +description: Learn from the coolest guide. +--- + +## Avidi deceptam precesque struxisse + +Lorem **markdownum quacumque**, ait pectore lacu. Unda exerceor, ille lacrimis +ardent, non factus Laurentes equo aequora, mater aura? Ausorum fruge moturaque +fama: intellecta subiere erat laborem. Est fallente, procorum, sospes? + +1. Quicumque nisi petuntur +2. Tecta fuga tabuerit +3. Vigor exitium ad maior bracchia Seriphi dubites +4. Nympha per puerum quotiensque mihi +5. Quaerere sum socer +6. Ea vocant dextra lurida dicemur Phaethon cultros + +## Rogant et acervo hausta cognoscit diversa + +Procul ruitis quaecumque natus; corpore rettulit Telephus totius et Actaeon +utraque, deciperetur. Nobis congerie lentaque, [ut paene +loquendo](http://www.opertosnon.org/matrescorpora) lapidoso te utque erat +densetur tonitruque et. Fila hinc quibus increscere osse pariter! + +> Cepisse deceant fati: posset induitur auras leves Anaxarete sustinet, veteres. +> Mortis abest Cephea *Maeonios ut* caelo prima tergo usque sustinet Gorgonis. +> Fefellerat *fecit*, Ennomon figura. + +## Iuveni opus + +Sagittis capillos, super ante omnia undas: frater ecce tyranni novis. Ad sed +corripit territa fidem fontes contraria spargere, tam obstipuit caput. Fert +datis positaque Cybeleia [fida se refugerat](http://talia.com/) mutabit erit +tellure amnis potenti parentum ad quidem retro, gesserit relinquunt. Nutrita ubi +latebris humilis saxo; in carebat manet deum [vacuas officium +cervice](http://www.suus-visa.com/corpusqueprofanus.html) sideribus terrebant +manente. + + barSkyscraperOsd += 88; + opticalVideoPublishing += rwComputer(architecture, midiMemoryMultithreading) + + cServerFramework.rss(ocr_property_emulation) * nuiSoftware; + var dma_motion_pitch = server; + +Trabibus tenebant edita! Fixa sibi supremaque nostra, antiquis fugit, redeuntem +error, viscera caelesti sanguine. Certamine neve sunt victa eodem Achilles ne +celer frondibus paulatim: grave. Pars mox Argos, humo [ille quoque +referam](http://arva.com/plumbo-ferendo.php) deprendit nullum. Reliquit ut ter +et videbar liceret pinum. + +Ut quoque, relictus *inplevi* prius [Parnasia plura +ingemuit](http://www.divinae.io/spiritus.html) mane. Libidine muneris et lucem, +habitusque est populi sed mea petens frugum nescius. diff --git a/content/tutorials/cool-guide/20.next.md b/content/tutorials/cool-guide/20.next.md new file mode 100644 index 00000000..e58f0ad1 --- /dev/null +++ b/content/tutorials/cool-guide/20.next.md @@ -0,0 +1,45 @@ +--- +title: Second Cool Step +description: The next step in the guide +--- + +## Pede si diva cruentat et non patri + +Lorem markdownum illud **si**, boum gelidis ab limite, pallore poenam +navifragumque filo: vectus in. Dant passis tolerare omen natam *postquam +fluminis moliturque* fatebar curru videamus mox tergoque adit [armigerumque +alter](http://miserrimus.io/cedere.html) tandem, erat conata. Draconibus +transtra. + +- Ducit frigus consequitur alimentaque Eurydicenque virgineos Abantiades +- Saepe tollens contemptor corpora tuam +- Loricamque utque neu non loquerentur acui +- Extremis aequantur cognoscit qui orbis spumantia pariter +- Muta utque patitur verti vetustas forma + +Tenebat Pelops Rhenum vacantem hinc plumbo subito quae via annos populari inviso +equos, volucres Lampetie Delius. Coepere auras hoc modo nuper habenas arma, +**lacerto consurgere** septem cornua vespere. Crescendo his, est coniunx umeris! + +## Viscera optima matrona prehensis quaerit inmurmurat divino + +Perdere et iamque, habent in Thaumantias emicuit, ipse perque vultus iuvat, +dextera quae, flamma utraque. Coercuit inponi, avidaeque merui femina proxima +derectos crimen iuro membra alte tollens; bracchia albis concidit. + +> Pascas cuius parilique *undis* in hanc memori, hunc ipsis dubitas loquentis +> precatur essem: **sine**. Non [satis](http://www.sospite.net/nec-et), abstinet +> tumulus. Diffidunt sacrifica si aether umbras quasi, fatis saepe *favete*. +> Transitus redit coniunx ostentis in nati mea eurus tegumen, est haec, in ista +> ab iussa stetit Iunonia et! + +Tenuisse regni, [tepente caecoque Mopsopium](http://per.com/notissima.html), +corripiens vulgus; est [dies](http://precor.com/) est terrae collo ad mandabat +*conclamat movere vocem*. Concipiunt enim. Te fulvum **sortes** in neque, agendo +mihi Phoebus. Facies et simillima titubare: Erasinus *oras*. + +Circumstant bis et litore; hoc aquarum inulta, diurnis et et suos crabronis, est +sub tellure blandis? Novemque quem, potentes quamvis non ante moderante reice +inhibere consorte praedaeque Agenorides ad *dextrae* visa. In **corpore**: et +fatemur, resides contraxit Athamanta novum. Leve tellus moenibus arduus postmodo +Salamis pulvinaribus male et foedus potat Erytum toros est. diff --git a/content/tutorials/cool-guide/_info.yml b/content/tutorials/cool-guide/_info.yml new file mode 100644 index 00000000..644b9512 --- /dev/null +++ b/content/tutorials/cool-guide/_info.yml @@ -0,0 +1,28 @@ +title: Cool Guide +author: + name: Jane Doe + url: https://example.com + avatar: https://avatars.githubusercontent.com/u/812331?v=4 +github_repo: https://github.com/zkSync-Community-Hub +tags: + - foundry + - solidity +summary: This is a short description of the guide that will show up on tweets or previews. +description: + This is an extra long description that goes into more detail about the guide. It can be as long as you want, but it + should be a few sentences long. This is an extra long description that goes into more detail about the guide. It can + be as long as you want, but it should be a few sentences long. This is an extra long description that goes into more + detail about the guide. It can be as long as you want, but it should be a few sentences long. +what_you_will_learn: + - You'll learn how to make an example app + - You'll learn new tools + - ??? + - Profit! +updated: 2024-04-25 +tools: + - Git + - Docker + - zksync-cli + - Hardhat +related_tutorials: + - /tutorials/another-tutorial diff --git a/content/tutorials/example-guide/10.index.md b/content/tutorials/example-guide/10.index.md new file mode 100644 index 00000000..b5a96a28 --- /dev/null +++ b/content/tutorials/example-guide/10.index.md @@ -0,0 +1,53 @@ +--- +title: Example Guide +description: Learn how to do something with this example guide. +--- + +## Avidi deceptam precesque struxisse + +Lorem **markdownum quacumque**, ait pectore lacu. Unda exerceor, ille lacrimis +ardent, non factus Laurentes equo aequora, mater aura? Ausorum fruge moturaque +fama: intellecta subiere erat laborem. Est fallente, procorum, sospes? + +1. Quicumque nisi petuntur +2. Tecta fuga tabuerit +3. Vigor exitium ad maior bracchia Seriphi dubites +4. Nympha per puerum quotiensque mihi +5. Quaerere sum socer +6. Ea vocant dextra lurida dicemur Phaethon cultros + +## Rogant et acervo hausta cognoscit diversa + +Procul ruitis quaecumque natus; corpore rettulit Telephus totius et Actaeon +utraque, deciperetur. Nobis congerie lentaque, [ut paene +loquendo](http://www.opertosnon.org/matrescorpora) lapidoso te utque erat +densetur tonitruque et. Fila hinc quibus increscere osse pariter! + +> Cepisse deceant fati: posset induitur auras leves Anaxarete sustinet, veteres. +> Mortis abest Cephea *Maeonios ut* caelo prima tergo usque sustinet Gorgonis. +> Fefellerat *fecit*, Ennomon figura. + +## Iuveni opus + +Sagittis capillos, super ante omnia undas: frater ecce tyranni novis. Ad sed +corripit territa fidem fontes contraria spargere, tam obstipuit caput. Fert +datis positaque Cybeleia [fida se refugerat](http://talia.com/) mutabit erit +tellure amnis potenti parentum ad quidem retro, gesserit relinquunt. Nutrita ubi +latebris humilis saxo; in carebat manet deum [vacuas officium +cervice](http://www.suus-visa.com/corpusqueprofanus.html) sideribus terrebant +manente. + + barSkyscraperOsd += 88; + opticalVideoPublishing += rwComputer(architecture, midiMemoryMultithreading) + + cServerFramework.rss(ocr_property_emulation) * nuiSoftware; + var dma_motion_pitch = server; + +Trabibus tenebant edita! Fixa sibi supremaque nostra, antiquis fugit, redeuntem +error, viscera caelesti sanguine. Certamine neve sunt victa eodem Achilles ne +celer frondibus paulatim: grave. Pars mox Argos, humo [ille quoque +referam](http://arva.com/plumbo-ferendo.php) deprendit nullum. Reliquit ut ter +et videbar liceret pinum. + +Ut quoque, relictus *inplevi* prius [Parnasia plura +ingemuit](http://www.divinae.io/spiritus.html) mane. Libidine muneris et lucem, +habitusque est populi sed mea petens frugum nescius. diff --git a/content/tutorials/example-guide/20.next.md b/content/tutorials/example-guide/20.next.md new file mode 100644 index 00000000..f0991f34 --- /dev/null +++ b/content/tutorials/example-guide/20.next.md @@ -0,0 +1,45 @@ +--- +title: Step 2 +description: The next step in the guide +--- + +## Pede si diva cruentat et non patri + +Lorem markdownum illud **si**, boum gelidis ab limite, pallore poenam +navifragumque filo: vectus in. Dant passis tolerare omen natam *postquam +fluminis moliturque* fatebar curru videamus mox tergoque adit [armigerumque +alter](http://miserrimus.io/cedere.html) tandem, erat conata. Draconibus +transtra. + +- Ducit frigus consequitur alimentaque Eurydicenque virgineos Abantiades +- Saepe tollens contemptor corpora tuam +- Loricamque utque neu non loquerentur acui +- Extremis aequantur cognoscit qui orbis spumantia pariter +- Muta utque patitur verti vetustas forma + +Tenebat Pelops Rhenum vacantem hinc plumbo subito quae via annos populari inviso +equos, volucres Lampetie Delius. Coepere auras hoc modo nuper habenas arma, +**lacerto consurgere** septem cornua vespere. Crescendo his, est coniunx umeris! + +## Viscera optima matrona prehensis quaerit inmurmurat divino + +Perdere et iamque, habent in Thaumantias emicuit, ipse perque vultus iuvat, +dextera quae, flamma utraque. Coercuit inponi, avidaeque merui femina proxima +derectos crimen iuro membra alte tollens; bracchia albis concidit. + +> Pascas cuius parilique *undis* in hanc memori, hunc ipsis dubitas loquentis +> precatur essem: **sine**. Non [satis](http://www.sospite.net/nec-et), abstinet +> tumulus. Diffidunt sacrifica si aether umbras quasi, fatis saepe *favete*. +> Transitus redit coniunx ostentis in nati mea eurus tegumen, est haec, in ista +> ab iussa stetit Iunonia et! + +Tenuisse regni, [tepente caecoque Mopsopium](http://per.com/notissima.html), +corripiens vulgus; est [dies](http://precor.com/) est terrae collo ad mandabat +*conclamat movere vocem*. Concipiunt enim. Te fulvum **sortes** in neque, agendo +mihi Phoebus. Facies et simillima titubare: Erasinus *oras*. + +Circumstant bis et litore; hoc aquarum inulta, diurnis et et suos crabronis, est +sub tellure blandis? Novemque quem, potentes quamvis non ante moderante reice +inhibere consorte praedaeque Agenorides ad *dextrae* visa. In **corpore**: et +fatemur, resides contraxit Athamanta novum. Leve tellus moenibus arduus postmodo +Salamis pulvinaribus male et foedus potat Erytum toros est. diff --git a/content/tutorials/example-guide/_info.yml b/content/tutorials/example-guide/_info.yml new file mode 100644 index 00000000..142b45a0 --- /dev/null +++ b/content/tutorials/example-guide/_info.yml @@ -0,0 +1,28 @@ +title: Example Guide +author: + name: Jane Doe + url: https://example.com + avatar: https://avatars.githubusercontent.com/u/812331?v=4 +github_repo: https://github.com/zkSync-Community-Hub +tags: + - account-abstraction + - solidity +summary: This is a short description of the guide that will show up on tweets or previews. +description: + This is an extra long description that goes into more detail about the guide. It can be as long as you want, but it + should be a few sentences long. This is an extra long description that goes into more detail about the guide. It can + be as long as you want, but it should be a few sentences long. This is an extra long description that goes into more + detail about the guide. It can be as long as you want, but it should be a few sentences long. +what_you_will_learn: + - You'll learn how to make an example app + - You'll learn new tools + - ??? + - Profit! +updated: 2024-04-25 +tools: + - Git + - Docker + - zksync-cli + - Hardhat +related_tutorials: + - /tutorials/another-tutorial diff --git a/content/tutorials/simple-tutorial/10.index.md b/content/tutorials/simple-tutorial/10.index.md new file mode 100644 index 00000000..30d9e8be --- /dev/null +++ b/content/tutorials/simple-tutorial/10.index.md @@ -0,0 +1,53 @@ +--- +title: Simple Tutorial +description: This one is a simple tutorial for beginners. +--- + +## Avidi deceptam precesque struxisse + +Lorem **markdownum quacumque**, ait pectore lacu. Unda exerceor, ille lacrimis +ardent, non factus Laurentes equo aequora, mater aura? Ausorum fruge moturaque +fama: intellecta subiere erat laborem. Est fallente, procorum, sospes? + +1. Quicumque nisi petuntur +2. Tecta fuga tabuerit +3. Vigor exitium ad maior bracchia Seriphi dubites +4. Nympha per puerum quotiensque mihi +5. Quaerere sum socer +6. Ea vocant dextra lurida dicemur Phaethon cultros + +## Rogant et acervo hausta cognoscit diversa + +Procul ruitis quaecumque natus; corpore rettulit Telephus totius et Actaeon +utraque, deciperetur. Nobis congerie lentaque, [ut paene +loquendo](http://www.opertosnon.org/matrescorpora) lapidoso te utque erat +densetur tonitruque et. Fila hinc quibus increscere osse pariter! + +> Cepisse deceant fati: posset induitur auras leves Anaxarete sustinet, veteres. +> Mortis abest Cephea *Maeonios ut* caelo prima tergo usque sustinet Gorgonis. +> Fefellerat *fecit*, Ennomon figura. + +## Iuveni opus + +Sagittis capillos, super ante omnia undas: frater ecce tyranni novis. Ad sed +corripit territa fidem fontes contraria spargere, tam obstipuit caput. Fert +datis positaque Cybeleia [fida se refugerat](http://talia.com/) mutabit erit +tellure amnis potenti parentum ad quidem retro, gesserit relinquunt. Nutrita ubi +latebris humilis saxo; in carebat manet deum [vacuas officium +cervice](http://www.suus-visa.com/corpusqueprofanus.html) sideribus terrebant +manente. + + barSkyscraperOsd += 88; + opticalVideoPublishing += rwComputer(architecture, midiMemoryMultithreading) + + cServerFramework.rss(ocr_property_emulation) * nuiSoftware; + var dma_motion_pitch = server; + +Trabibus tenebant edita! Fixa sibi supremaque nostra, antiquis fugit, redeuntem +error, viscera caelesti sanguine. Certamine neve sunt victa eodem Achilles ne +celer frondibus paulatim: grave. Pars mox Argos, humo [ille quoque +referam](http://arva.com/plumbo-ferendo.php) deprendit nullum. Reliquit ut ter +et videbar liceret pinum. + +Ut quoque, relictus *inplevi* prius [Parnasia plura +ingemuit](http://www.divinae.io/spiritus.html) mane. Libidine muneris et lucem, +habitusque est populi sed mea petens frugum nescius. diff --git a/content/tutorials/simple-tutorial/_info.yml b/content/tutorials/simple-tutorial/_info.yml new file mode 100644 index 00000000..c7c298f6 --- /dev/null +++ b/content/tutorials/simple-tutorial/_info.yml @@ -0,0 +1,28 @@ +title: Simple Tutorial +author: + name: Jane Doe + url: https://example.com + avatar: https://avatars.githubusercontent.com/u/812331?v=4 +github_repo: https://github.com/zkSync-Community-Hub +tags: + - smart-contracts + - solidity +summary: This is a short description of the guide that will show up on tweets or previews. +description: + This is an extra long description that goes into more detail about the guide. It can be as long as you want, but it + should be a few sentences long. This is an extra long description that goes into more detail about the guide. It can + be as long as you want, but it should be a few sentences long. This is an extra long description that goes into more + detail about the guide. It can be as long as you want, but it should be a few sentences long. +what_you_will_learn: + - You'll learn how to make an example app + - You'll learn new tools + - ??? + - Profit! +updated: 2024-04-25 +tools: + - Git + - Docker + - zksync-cli + - Hardhat +related_tutorials: + - /tutorials/another-tutorial diff --git a/cspell-config/cspell-misc.txt b/cspell-config/cspell-misc.txt new file mode 100644 index 00000000..0af76212 --- /dev/null +++ b/cspell-config/cspell-misc.txt @@ -0,0 +1,3 @@ +Nuxt +nuxt +nuxthq diff --git a/cspell-config/cspell-zksync.txt b/cspell-config/cspell-zksync.txt new file mode 100644 index 00000000..1cee5f54 --- /dev/null +++ b/cspell-config/cspell-zksync.txt @@ -0,0 +1,15 @@ +// zkSync-related words +boojum +MatterLabs +Zeek +zkcast +ZKEVM +zkevm +zkforge +zkout +zksolc +zkstack +zkSync +zksync +zksync-cli +zkvyper diff --git a/cspell.json b/cspell.json new file mode 100644 index 00000000..72ddaa53 --- /dev/null +++ b/cspell.json @@ -0,0 +1,62 @@ +{ + "language": "en", + "ignorePaths": [ + "bun.lockb", + "*.css", + "*.config.*", + "node_modules/**", + ".github/**", + ".firebase/**", + ".yarn/**", + "dist/**", + ".vscode/**", + "cspell-config/**", + "package.json", + ".**.**" + ], + "caseSensitive": true, + "dictionaries": [ + "bash", + "cpp", + "cryptocurrencies", + "docker", + "css", + "csharp", + "en_GB", + "en_US", + "filetypes", + "fullstack", + "git", + "golang", + "go", + "html", + "java", + "latext", + "misc", + "node", + "npm", + "npm", + "nuxt", + "python", + "rust", + "softwareTerms", + "swift", + "typescript", + "dict-zksync", + "dict-misc" + ], + "dictionaryDefinitions": [ + { + "name": "dict-zksync", + "addWords": true, + "path": "./cspell-config/cspell-zksync.txt" + }, + { + "name": "dict-misc", + "addWords": true, + "path": "./cspell-config/cspell-misc.txt" + } + ], + "allowCompoundWords": true, + "flagWords": ["hte", "hve", "teh", "cna"] +} diff --git a/error.vue b/error.vue new file mode 100644 index 00000000..a6c0ca61 --- /dev/null +++ b/error.vue @@ -0,0 +1,55 @@ + + + diff --git a/firebase.json b/firebase.json new file mode 100644 index 00000000..7dd16c19 --- /dev/null +++ b/firebase.json @@ -0,0 +1,6 @@ +{ + "hosting": { + "public": ".output/public", + "ignore": ["firebase.json", "**/.*", "**/node_modules/**"] + } +} diff --git a/layouts/docs.vue b/layouts/docs.vue new file mode 100644 index 00000000..884c1c23 --- /dev/null +++ b/layouts/docs.vue @@ -0,0 +1,7 @@ + + + diff --git a/layouts/tutorials.vue b/layouts/tutorials.vue new file mode 100644 index 00000000..3e822ecd --- /dev/null +++ b/layouts/tutorials.vue @@ -0,0 +1,94 @@ + + + diff --git a/nuxt.config.ts b/nuxt.config.ts new file mode 100644 index 00000000..7be5590a --- /dev/null +++ b/nuxt.config.ts @@ -0,0 +1,81 @@ +import { getIconCollections } from '@egoist/tailwindcss-icons'; +import { zksyncIcons } from './assets/zksync-icons'; + +// https://nuxt.com/docs/api/configuration/nuxt-config +export default defineNuxtConfig({ + extends: ['@nuxt/ui-pro'], + modules: ['@nuxt/content', '@nuxt/ui', '@nuxt/fonts', '@nuxthq/studio', 'nuxt-og-image', '@nuxt/image'], + app: { + head: { + link: [{ rel: 'stylesheet', href: '/main.css' }], + }, + }, + hooks: { + // Define `@nuxt/ui` components as global to use them in `.md` (feel free to add those you need) + 'components:extend': (components) => { + const globals = components.filter((c) => ['UButton', 'UIcon'].includes(c.pascalName)); + + globals.forEach((c) => (c.global = true)); + }, + }, + ui: { + icons: { + collections: { + zksync: zksyncIcons, + ...getIconCollections(['heroicons', 'simple-icons', 'logos', 'devicon']), + }, + }, + }, + image: { + quality: 90, + format: ['avif', 'webp'], + }, + fonts: { + families: [ + { name: 'Raleway', provider: 'google' }, + { name: 'Montserrat', provider: 'google' }, + { name: 'Fira Mono', provider: 'google' }, + ], + }, + // routeRules: { + // '/api/search.json': { prerender: true }, + // }, + devtools: { + enabled: true, + }, + typescript: { + strict: false, + }, + content: { + highlight: { + langs: [ + 'asm', + 'c++', + 'go', + 'graphql', + 'groovy', + 'java', + 'jsx', + 'python', + 'rust', + 'solidity', + 'swift', + 'toml', + 'xml', + ], + theme: { + default: 'github-light', + light: 'github-light', + dark: 'github-dark', + sepia: 'monokai', + }, + }, + }, + runtimeConfig: { + public: { + mdc: { + useNuxtImage: true, + }, + }, + }, +}); diff --git a/nuxt.schema.ts b/nuxt.schema.ts new file mode 100644 index 00000000..b173c97c --- /dev/null +++ b/nuxt.schema.ts @@ -0,0 +1,241 @@ +import { field, group } from '@nuxthq/studio/theme'; + +export default defineNuxtSchema({ + appConfig: { + ui: group({ + title: 'UI', + description: 'UI Customization.', + icon: 'i-mdi-palette-outline', + fields: { + icons: group({ + title: 'Icons', + description: 'Manage icons used in UI Pro.', + icon: 'i-mdi-application-settings-outline', + fields: { + search: field({ + type: 'icon', + title: 'Search Bar', + description: 'Icon to display in the search bar.', + icon: 'i-mdi-magnify', + default: 'i-heroicons-magnifying-glass-20-solid', + }), + dark: field({ + type: 'icon', + title: 'Dark mode', + description: 'Icon of color mode button for dark mode.', + icon: 'i-mdi-moon-waning-crescent', + default: 'i-heroicons-moon-20-solid', + }), + light: field({ + type: 'icon', + title: 'Light mode', + description: 'Icon of color mode button for light mode.', + icon: 'i-mdi-white-balance-sunny', + default: 'i-heroicons-sun-20-solid', + }), + external: field({ + type: 'icon', + title: 'External Link', + description: 'Icon for external link.', + icon: 'i-mdi-arrow-top-right', + default: 'i-heroicons-arrow-up-right-20-solid', + }), + chevron: field({ + type: 'icon', + title: 'Chevron', + description: 'Icon for chevron.', + icon: 'i-mdi-chevron-down', + default: 'i-heroicons-chevron-down-20-solid', + }), + hash: field({ + type: 'icon', + title: 'Hash', + description: 'Icon for hash anchors.', + icon: 'i-ph-hash', + default: 'i-heroicons-hashtag-20-solid', + }), + }, + }), + primary: field({ + type: 'string', + title: 'Primary', + description: 'Primary color of your UI.', + icon: 'i-mdi-palette-outline', + default: 'green', + required: [ + 'sky', + 'mint', + 'rose', + 'amber', + 'violet', + 'emerald', + 'fuchsia', + 'indigo', + 'lime', + 'orange', + 'pink', + 'purple', + 'red', + 'teal', + 'yellow', + 'green', + 'blue', + 'cyan', + 'gray', + 'white', + 'black', + ], + }), + gray: field({ + type: 'string', + title: 'Gray', + description: 'Gray color of your UI.', + icon: 'i-mdi-palette-outline', + default: 'slate', + required: ['slate', 'cool', 'zinc', 'neutral', 'stone'], + }), + }, + }), + seo: group({ + title: 'SEO', + description: 'SEO configuration.', + icon: 'i-ph-app-window', + fields: { + siteName: field({ + type: 'string', + title: 'Site Name', + description: + 'Name used in ogSiteName and used as second part of your page title (My page title - Nuxt UI Pro).', + icon: 'i-mdi-web', + default: [], + }), + }, + }), + header: group({ + title: 'Header', + description: 'Header configuration.', + icon: 'i-mdi-page-layout-header', + fields: { + logo: group({ + title: 'Logo', + description: 'Header logo configuration.', + icon: 'i-mdi-image-filter-center-focus-strong-outline', + fields: { + light: field({ + type: 'media', + title: 'Light Mode Logo', + description: 'Pick an image from your gallery.', + icon: 'i-mdi-white-balance-sunny', + default: '', + }), + dark: field({ + type: 'media', + title: 'Dark Mode Logo', + description: 'Pick an image from your gallery.', + icon: 'i-mdi-moon-waning-crescent', + default: '', + }), + alt: field({ + type: 'string', + title: 'Alt', + description: 'Alt to display for accessibility.', + icon: 'i-mdi-alphabet-latin', + default: '', + }), + }, + }), + search: field({ + type: 'boolean', + title: 'Search Bar', + description: 'Hide or display the search bar.', + icon: 'i-mdi-magnify', + default: true, + }), + colorMode: field({ + type: 'boolean', + title: 'Color Mode', + description: 'Hide or display the color mode button in your header.', + icon: 'i-mdi-moon-waning-crescent', + default: true, + }), + links: field({ + type: 'array', + title: 'Links', + description: 'Array of link object displayed in header.', + icon: 'i-mdi-link-variant', + default: [], + }), + }, + }), + footer: group({ + title: 'Footer', + description: 'Footer configuration.', + icon: 'i-mdi-page-layout-footer', + fields: { + credits: field({ + type: 'string', + title: 'Footer credits section', + description: 'Text to display as credits in the footer.', + icon: 'i-mdi-circle-edit-outline', + default: '', + }), + colorMode: field({ + type: 'boolean', + title: 'Color Mode', + description: 'Hide or display the color mode button in the footer.', + icon: 'i-mdi-moon-waning-crescent', + default: false, + }), + links: field({ + type: 'array', + title: 'Links', + description: 'Array of link object displayed in footer.', + icon: 'i-mdi-link-variant', + default: [], + }), + }, + }), + toc: group({ + title: 'Table of contents', + description: 'TOC configuration.', + icon: 'i-mdi-table-of-contents', + fields: { + title: field({ + type: 'string', + title: 'Title', + description: 'Text to display as title of the main toc.', + icon: 'i-mdi-format-title', + default: '', + }), + bottom: group({ + title: 'Bottom', + description: 'Bottom TOC configuration.', + icon: 'i-mdi-table-of-contents', + fields: { + title: field({ + type: 'string', + title: 'Title', + description: 'Text to display as title of the bottom toc.', + icon: 'i-mdi-format-title', + default: '', + }), + edit: field({ + type: 'string', + title: 'Edit Page Link', + description: 'URL of your repository content folder.', + icon: 'i-ph-note-pencil', + default: '', + }), + links: field({ + type: 'array', + title: 'Links', + description: 'Array of link object displayed in bottom toc.', + icon: 'i-mdi-link-variant', + default: [], + }), + }, + }), + }, + }), + }, +}); diff --git a/package.json b/package.json new file mode 100644 index 00000000..074797b2 --- /dev/null +++ b/package.json @@ -0,0 +1,54 @@ +{ + "name": "nuxt-ui-pro-template-docs", + "private": true, + "type": "module", + "scripts": { + "build": "nuxt build", + "dev": "nuxt dev", + "generate": "nuxt generate", + "preview": "nuxt preview", + "lint": "eslint .", + "typecheck": "nuxt typecheck", + "lint:spelling": "cspell **/*.md --config=./cspell.json", + "lint:markdown": "markdownlint-cli2 \"content/**/*.md\" --config \".markdownlint.json\"", + "lint:eslint": "eslint .", + "lint:prettier": "prettier --check .", + "fix:prettier": "prettier --write .", + "prepare": "husky", + "postinstall": "nuxt prepare", + "ci:check": "bun run lint:eslint && bun run lint:prettier && bun run lint:spelling && bun run lint:markdown" + }, + "dependencies": { + "@iconify-json/devicon": "^1.1.40", + "@iconify-json/heroicons": "^1.1.20", + "@iconify-json/simple-icons": "^1.1.97", + "@nuxt/content": "^2.12.1", + "@nuxt/fonts": "^0.5.1", + "@nuxt/image": "^1.6.0", + "@nuxt/ui-pro": "^1.1.0", + "dayjs": "^1.11.10", + "nuxt": "^3.11.2", + "nuxt-og-image": "^3.0.0-rc" + }, + "devDependencies": { + "@nuxt/eslint-config": "^0.2.0", + "@nuxthq/studio": "^1.0.13", + "@typescript-eslint/eslint-plugin": "^7.7.1", + "@typescript-eslint/parser": "^7.7.1", + "@vue/eslint-config-prettier": "^9.0.0", + "@vue/eslint-config-typescript": "^13.0.0", + "@vue/test-utils": "^2.4.5", + "cspell": "^8.7.0", + "eslint": "^8.57.0", + "eslint-plugin-vue": "^9.25.0", + "husky": "^9.0.11", + "markdownlint": "^0.34.0", + "markdownlint-cli2": "^0.13.0", + "nuxt-headlessui": "^1.2.0", + "prettier": "^3.2.5", + "prettier-eslint": "^16.3.0", + "prettier-plugin-tailwindcss": "^0.5.14", + "vue-eslint-parser": "^9.4.2", + "vue-tsc": "^2.0.7" + } +} diff --git a/pages/index.vue b/pages/index.vue new file mode 100644 index 00000000..3004638f --- /dev/null +++ b/pages/index.vue @@ -0,0 +1,62 @@ + + + diff --git a/pages/tutorials/[...slug].vue b/pages/tutorials/[...slug].vue new file mode 100644 index 00000000..e25d443d --- /dev/null +++ b/pages/tutorials/[...slug].vue @@ -0,0 +1,241 @@ + + + diff --git a/pages/tutorials/index.vue b/pages/tutorials/index.vue new file mode 100644 index 00000000..f3077fe0 --- /dev/null +++ b/pages/tutorials/index.vue @@ -0,0 +1,40 @@ + + + diff --git a/public/favicon copy.ico b/public/favicon copy.ico new file mode 100644 index 00000000..a8ff125c Binary files /dev/null and b/public/favicon copy.ico differ diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png new file mode 100644 index 00000000..3f32357c Binary files /dev/null and b/public/favicon-16x16.png differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png new file mode 100644 index 00000000..08d65d03 Binary files /dev/null and b/public/favicon-32x32.png differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 00000000..18993ad9 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/logos/matterlabs-logo.svg b/public/logos/matterlabs-logo.svg new file mode 100644 index 00000000..f3a75975 --- /dev/null +++ b/public/logos/matterlabs-logo.svg @@ -0,0 +1 @@ + diff --git a/public/logos/zksync_logo.svg b/public/logos/zksync_logo.svg new file mode 100644 index 00000000..eb0b3e66 --- /dev/null +++ b/public/logos/zksync_logo.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/logos/zksync_logo_black.svg b/public/logos/zksync_logo_black.svg new file mode 100644 index 00000000..46481a8e --- /dev/null +++ b/public/logos/zksync_logo_black.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/main.css b/public/main.css new file mode 100644 index 00000000..3131d8f1 --- /dev/null +++ b/public/main.css @@ -0,0 +1,5 @@ +body { + -webkit-font-smoothing: auto !important; + text-rendering: optimizeLegibility; + letter-spacing: 0.1px; +} diff --git a/public/social-card.png b/public/social-card.png new file mode 100644 index 00000000..8cd50a17 Binary files /dev/null and b/public/social-card.png differ diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..ba754ea3 --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "extends": ["github>nuxt/renovate-config-nuxt"] +} diff --git a/server/api/search.json.get.ts b/server/api/search.json.get.ts new file mode 100644 index 00000000..e075d921 --- /dev/null +++ b/server/api/search.json.get.ts @@ -0,0 +1,7 @@ +import { serverQueryContent } from '#content/server'; + +export default eventHandler(async (event) => { + return serverQueryContent(event) + .where({ _type: 'markdown', navigation: { $ne: false } }) + .find(); +}); diff --git a/server/plugins/parse-zk-tags.ts b/server/plugins/parse-zk-tags.ts new file mode 100644 index 00000000..c5f39638 --- /dev/null +++ b/server/plugins/parse-zk-tags.ts @@ -0,0 +1,29 @@ +import zkSyncConfig from '../../content/_zksync.json'; + +const tags: { [key: string]: string } = {}; + +export default defineNitroPlugin((nitroApp) => { + parseConfig(zkSyncConfig, 'zk'); + + nitroApp.hooks.hook('content:file:beforeParse', (file: { _id: string; body: string }) => { + if (file._id.endsWith('.md')) { + Object.keys(tags).forEach((key) => { + file.body = file.body.replace(new RegExp(`%%${key}%%`, 'g'), tags[key]); + }); + } + }); +}); + +function parseConfig(config: any, prefix: string) { + Object.keys(config).forEach((key) => { + const value = config[key]; + const newPrefix = `${prefix}_${key}`; + if (typeof value === 'object' && value !== null) { + parseConfig(value, newPrefix); + } else { + tags[newPrefix] = value; + } + }); + + return tags; +} diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 00000000..b9ed69c1 --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../.nuxt/tsconfig.server.json" +} diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 00000000..121dcad8 --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,68 @@ +import type { Config } from 'tailwindcss'; +import defaultTheme from 'tailwindcss/defaultTheme'; + +export default >{ + theme: { + extend: { + fontFamily: { + sans: ['Raleway', ...defaultTheme.fontFamily.sans], + serif: ['Montserrat', ...defaultTheme.fontFamily.serif], + mono: ['Fira Mono', ...defaultTheme.fontFamily.mono], + }, + colors: { + zkSlate: { + 50: '#f6f6f9', + 100: '#ebebf3', + 200: '#d3d4e4', + 300: '#adafcc', + 400: '#8084b0', + 500: '#606597', + 600: '#4c4f7d', + 700: '#3e4066', + 800: '#363856', + 900: '#313249', + 950: '#0a0a0f', + }, + zkPurple: { + 50: '#edefff', + 100: '#dee2ff', + 200: '#c4caff', + 300: '#a0a7ff', + 400: '#8c8aff', + 500: '#695bf9', + 600: '#5a3dee', + 700: '#4e2fd3', + 800: '#3f29aa', + 900: '#362986', + 950: '#22184e', + }, + zkBlue: { + 50: '#edf6ff', + 100: '#d7eaff', + 200: '#b9dbff', + 300: '#88c6ff', + 400: '#50a7ff', + 500: '#2881ff', + 600: '#1e69ff', + 700: '#0a4aeb', + 800: '#0f3cbe', + 900: '#133895', + 950: '#11235a', + }, + green: { + 50: '#EFFDF5', + 100: '#D9FBE8', + 200: '#B3F5D1', + 300: '#75EDAE', + 400: '#00DC82', + 500: '#00C16A', + 600: '#00A155', + 700: '#007F45', + 800: '#016538', + 900: '#0A5331', + 950: '#052e16', + }, + }, + }, + }, +}; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..a746f2a7 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,4 @@ +{ + // https://nuxt.com/docs/guide/concepts/typescript + "extends": "./.nuxt/tsconfig.json" +}