-
Notifications
You must be signed in to change notification settings - Fork 3
Docs: Initial tutorial site scaffold with SDK tutorials, program layout, and interactive components #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DiegoCarpenter
wants to merge
6
commits into
DASMAC-com:main
Choose a base branch
from
DiegoCarpenter:docs/initial-scaffold
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Docs: Initial tutorial site scaffold with SDK tutorials, program layout, and interactive components #111
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a4f71a2
docs: The initial stub for vitepress tutorial page
DiegoCarpenter a2dcae6
chore: ignore nested dropset-alpha directory
DiegoCarpenter ab05752
docs: add SDK tutorial pages for connect, post-order, and price utils
DiegoCarpenter 7f45972
docs: add interactive components and updated config
DiegoCarpenter 3e46784
ci: fix checkout action version
DiegoCarpenter c5d2fc6
fix: remove accidental submodule entry
DiegoCarpenter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| jobs: | ||
| build-docs: | ||
| name: 'Build docs' | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - uses: 'actions/checkout@v4' | ||
| - uses: 'actions/setup-node@v6' | ||
| with: | ||
| cache: 'npm' | ||
| cache-dependency-path: 'docs/package-lock.json' | ||
| node-version: 24 | ||
| - run: 'npm ci' | ||
| working-directory: 'docs' | ||
| - run: 'npm run format:check' | ||
| working-directory: 'docs' | ||
| - run: 'npm run build' | ||
| working-directory: 'docs' | ||
| name: 'Build docs' | ||
| 'on': | ||
| pull_request: null | ||
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # From https://vitepress.dev/guide/deploy#github-pages. | ||
| concurrency: | ||
| cancel-in-progress: false | ||
| group: 'pages' | ||
| jobs: | ||
| build: | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - name: 'Checkout' | ||
| uses: 'actions/checkout@v4' | ||
| with: | ||
| fetch-depth: null | ||
| - name: 'Setup Node' | ||
| uses: 'actions/setup-node@v6' | ||
| with: | ||
| cache: 'npm' | ||
| cache-dependency-path: 'docs/package-lock.json' | ||
| node-version: 24 | ||
| - name: 'Setup Pages' | ||
| uses: 'actions/configure-pages@v4' | ||
| - name: 'Install dependencies' | ||
| run: 'npm ci' | ||
| working-directory: 'docs' | ||
| - name: 'Build with VitePress' | ||
| run: 'npm run build' | ||
| working-directory: 'docs' | ||
| - name: 'Upload artifact' | ||
| uses: 'actions/upload-pages-artifact@v3' | ||
| with: | ||
| path: 'docs/.vitepress/dist' | ||
| deploy: | ||
| environment: | ||
| name: 'github-pages' | ||
| url: '${{ steps.deployment.outputs.page_url }}' | ||
| name: 'Deploy' | ||
| needs: 'build' | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - id: 'deployment' | ||
| name: 'Deploy to GitHub Pages' | ||
| uses: 'actions/deploy-pages@v4' | ||
| name: 'Deploy VitePress site to GitHub Pages' | ||
| 'on': | ||
| push: | ||
| branches: | ||
| - 'main' | ||
| permissions: | ||
| contents: 'read' | ||
| id-token: 'write' | ||
| pages: 'write' | ||
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| jobs: | ||
| quick-lint: | ||
| name: 'Quick lint' | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - uses: 'actions/checkout@v4' | ||
| - uses: 'actions/setup-node@v6' | ||
| with: | ||
| cache: 'npm' | ||
| cache-dependency-path: 'docs/package-lock.json' | ||
| node-version: 24 | ||
| - run: 'npm ci' | ||
| working-directory: 'docs' | ||
| - run: 'npm run format:check' | ||
| working-directory: 'docs' | ||
| name: 'Quick lint' | ||
| 'on': | ||
| pull_request: null | ||
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| jobs: | ||
| semantic-pr: | ||
| name: 'Validate PR title' | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - name: 'Validate semantic PR title' | ||
| uses: 'amannn/action-semantic-pull-request@v5' | ||
| env: | ||
| GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
| name: 'Semantic PR' | ||
| 'on': | ||
| pull_request_target: | ||
| types: | ||
| - 'edited' | ||
| - 'opened' | ||
| - 'synchronize' | ||
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ target | |
| test-ledger | ||
| .turbo | ||
|
|
||
| dropset-alpha/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| FROM rust:latest | ||
|
|
||
| # Install Solana CLI and platform tools | ||
| RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)" | ||
|
|
||
| # Add Solana to PATH permanently | ||
| ENV PATH="/root/.local/share/solana/install/active_release/bin:${PATH}" | ||
|
|
||
| # Verify solana is found then install platform tools | ||
| RUN solana --version && \ | ||
| cargo install cargo-build-sbf | ||
|
|
||
| # Set working directory | ||
| WORKDIR /app | ||
|
|
||
| # Copy repo in | ||
| COPY . . | ||
|
|
||
| # Build the program | ||
| RUN cargo build-sbf | ||
|
|
||
| CMD ["cargo", "test"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| .PHONY: docs | ||
| .PHONY: docs-build | ||
| .PHONY: docs-links | ||
| .PHONY: docs-prettier | ||
| .PHONY: docs-prod | ||
|
|
||
| # Build the docs locally | ||
| docs: | ||
| cd docs && npm install \ | ||
| && rm -rf .vitepress/cache .vitepress/dist node_modules/.vite \ | ||
| && npx vitepress dev --open | ||
|
|
||
| # Build the docs for production | ||
| docs-build: | ||
| cd docs \ | ||
| && rm -rf .vitepress/cache .vitepress/dist node_modules/.vite \ | ||
| && npm ci \ | ||
| && npx vitepress build | ||
|
|
||
| # Check for any broken links | ||
| docs-links: docs-build | ||
| lychee --config cfg/lychee.toml --include-fragments \ | ||
| --root-dir docs/.vitepress/dist 'docs/.vitepress/dist/**/*.html' | ||
|
|
||
| # Format docs with Prettier | ||
| docs-prettier: | ||
| cd docs && npm install && npx prettier --write . | ||
|
|
||
| # Serve docs in production mode | ||
| docs-prod: docs-build | ||
| cd docs && (sleep 1 && open http://localhost:4173 &) && npx vitepress preview |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Lychee link checker configuration. | ||
| # Run via: make docs-links | ||
|
|
||
| # Ignore localhost links (used in examples). | ||
| exclude = [ | ||
| "http://localhost", | ||
| "https://localhost", | ||
| ] | ||
|
|
||
| # Don't fail on these status codes (some sites block bots). | ||
| accept = [200, 206, 429] | ||
|
|
||
| # Timeout per request in seconds. | ||
| timeout = 20 | ||
|
|
||
| # Max retries per link. | ||
| max_retries = 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| node_modules | ||
| .vitepress/cache | ||
| .vitepress/dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| export default { | ||
| title: "Dropset", | ||
| description: | ||
| "Courtesy of Distributed Atomic State Machine Algorithms Corporation (DASMAC)", | ||
| head: [ | ||
| [ | ||
| "link", | ||
| { | ||
| rel: "icon", | ||
| href: "/favicon-light.png", | ||
| media: "(prefers-color-scheme: light)", | ||
| }, | ||
| ], | ||
| [ | ||
| "link", | ||
| { | ||
| rel: "icon", | ||
| href: "/favicon-dark.png", | ||
| media: "(prefers-color-scheme: dark)", | ||
| }, | ||
| ], | ||
| ["link", { rel: "apple-touch-icon", href: "/favicon-light.png" }], | ||
| ["meta", { property: "og:site_name", content: "DASMAC" }], | ||
| ["meta", { property: "og:type", content: "website" }], | ||
| ["meta", { property: "og:url", content: "https://docs.dropset.io/" }], | ||
| ["meta", { property: "og:title", content: "Dropset Docs" }], | ||
| [ | ||
| "meta", | ||
| { | ||
| property: "og:description", | ||
| content: | ||
| "Courtesy of Distributed Atomic State Machine Algorithms Corporation (DASMAC)", | ||
| }, | ||
| ], | ||
| [ | ||
| "meta", | ||
| { | ||
| property: "og:image", | ||
| content: "https://docs.dropset.io/dasmac-banner.png", | ||
| }, | ||
| ], | ||
| ["meta", { name: "twitter:card", content: "summary_large_image" }], | ||
| ["meta", { name: "twitter:title", content: "Dropset Docs" }], | ||
| [ | ||
| "meta", | ||
| { | ||
| name: "twitter:description", | ||
| content: | ||
| "Courtesy of Distributed Atomic State Machine Algorithms Corporation (DASMAC)", | ||
| }, | ||
| ], | ||
| [ | ||
| "meta", | ||
| { | ||
| name: "twitter:image", | ||
| content: "https://docs.dropset.io/dasmac-banner.png", | ||
| }, | ||
| ], | ||
| ], | ||
| srcDir: "src", | ||
| themeConfig: { | ||
| outline: "deep", | ||
| editLink: { | ||
| pattern: | ||
| "https://github.com/DASMAC-com/dropset-alpha/blob/main/docs/src/:path", | ||
| text: "Contribute to this page", | ||
| }, | ||
| sidebar: [ | ||
| { text: "Welcome", link: "/" }, | ||
| { | ||
| collapsed: false, | ||
| text: "Introduction", | ||
| items: [ | ||
| { text: "What is Dropset?", link: "/introduction/what-is-dropset" }, | ||
| { text: "Core Concepts", link: "/introduction/core-concepts" }, | ||
| ], | ||
| }, | ||
| { | ||
| collapsed: false, | ||
| text: "Architecture", | ||
| items: [ | ||
| { text: "Overview", link: "/architecture/overview" }, | ||
| { | ||
| text: "Program Structure", | ||
| link: "/architecture/program-structure", | ||
| }, | ||
| { text: "On-Chain Accounts", link: "/architecture/accounts" }, | ||
| ], | ||
| }, | ||
| { | ||
| collapsed: false, | ||
| text: "Program Reference", | ||
| items: [ | ||
| { text: "Instruction Cards", link: "/program/instructions" }, | ||
| { text: "Order Book Visualizer", link: "/program/order-book-viz" }, | ||
| ], | ||
| }, | ||
| { | ||
| collapsed: false, | ||
| text: "Quickstart", | ||
| items: [ | ||
| { text: "Getting Started", link: "/quickstart/getting-started" }, | ||
| ], | ||
| }, | ||
| { | ||
| collapsed: false, | ||
| text: "TypeScript SDK", | ||
| items: [ | ||
| { text: "Overview", link: "/sdk/overview" }, | ||
| { text: "Connect to a Market", link: "/sdk/connect-to-market" }, | ||
| { text: "Post an Order", link: "/sdk/post-order" }, | ||
| { text: "Price Utilities", link: "/sdk/price-utils" }, | ||
| ], | ||
| }, | ||
| { | ||
| collapsed: false, | ||
| text: "Benchmarks", | ||
| items: [{ text: "CU Cost Explorer", link: "/benchmarks/" }], | ||
| }, | ||
| { | ||
| collapsed: false, | ||
| text: "Services", | ||
| items: [{ text: "Faucet, Maker & Taker", link: "/services/overview" }], | ||
| }, | ||
| ], | ||
| }, | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?