Skip to content

Commit

Permalink
feat!: use nextra (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
antond15 authored Apr 18, 2024
1 parent 97341a2 commit 92e7d44
Show file tree
Hide file tree
Showing 68 changed files with 418 additions and 9,938 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.lockb binary diff=lockb
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ko_fi: antond
ko_fi: antond
15 changes: 5 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
bun-version: latest

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile

- name: Run build script
run: pnpm run build
run: bun run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
Expand Down
12 changes: 1 addition & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
.next
node_modules
pnpm-debug.log*

build

.docusaurus

.env
.env.development

.vscode
.idea
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.md
*.mdx
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 130
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Shu Ding

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.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# docs
Documentation for AC Scripts resources.
# Nextra Docs Template

This is a template for creating documentation with [Nextra](https://nextra.site).

[**Live Demo →**](https://nextra-docs-template.vercel.app)

[![](.github/screenshot.png)](https://nextra-docs-template.vercel.app)

## Quick Start

Click the button to clone this repository and deploy it on Vercel:

[![](https://vercel.com/button)](https://vercel.com/new/clone?s=https%3A%2F%2Fgithub.com%2Fshuding%2Fnextra-docs-template&showOptionalTeamCreation=false)

## Local Development

First, run `pnpm i` to install the dependencies.

Then, run `pnpm dev` to start the development server and visit localhost:3000.

## License

This project is licensed under the MIT License.
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

Binary file added bun.lockb
Binary file not shown.
11 changes: 11 additions & 0 deletions components/kofi/index.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.badge {
display: flex;
align-items: center;
width: fit-content;
background-color: #ce2b29;
padding: 0.2rem 1rem;
/* margin: 0.5rem 0; */
border-radius: 0.2rem;
gap: 0.7rem;
font-size: 1rem;
}
15 changes: 15 additions & 0 deletions components/kofi/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styles from './index.module.css';

export default function Badge(props: any) {
return (
<a target="_blank" rel="noopener noreferrer" href={props.link} className={styles.badge}>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path
fill="#fff"
d="M23.881 8.948c-.773-4.085-4.859-4.593-4.859-4.593H.723c-.604 0-.679.798-.679.798s-.082 7.324-.022 11.822c.164 2.424 2.586 2.672 2.586 2.672s8.267-.023 11.966-.049c2.438-.426 2.683-2.566 2.658-3.734c4.352.24 7.422-2.831 6.649-6.916m-11.062 3.511c-1.246 1.453-4.011 3.976-4.011 3.976s-.121.119-.31.023c-.076-.057-.108-.09-.108-.09c-.443-.441-3.368-3.049-4.034-3.954c-.709-.965-1.041-2.7-.091-3.71c.951-1.01 3.005-1.086 4.363.407c0 0 1.565-1.782 3.468-.963s1.832 3.011.723 4.311m6.173.478c-.928.116-1.682.028-1.682.028V7.284h1.77s1.971.551 1.971 2.638c0 1.913-.985 2.667-2.059 3.015"
/>
</svg>
Support me on Ko-fi
</a>
);
}
9 changes: 0 additions & 9 deletions docs/index.md

This file was deleted.

85 changes: 0 additions & 85 deletions docusaurus.config.js

This file was deleted.

10 changes: 10 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.ac-footer {
display: flex;
align-items: center;
gap: 0.5rem;
}

.ac-item-images {
display: flex;
margin-top: 0.5rem;
}
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
});

module.exports = withNextra();
36 changes: 11 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
{
"name": "docs",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
"dev": "next dev",
"build": "next build",
"start": "next start",
"format": "prettier . --write"
},
"dependencies": {
"@algolia/client-search": "^4.14.2",
"@docusaurus/core": "2.2.0",
"@docusaurus/plugin-content-docs": "^2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"next": "^13.0.6",
"nextra": "latest",
"nextra-theme-docs": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.2.0",
"@docusaurus/types": "^2.2.0",
"@types/node": "18.11.10",
"prettier": "^3.2.5",
"typescript": "^4.9.3"
},
"engines": {
"node": ">=16.14"
}
}
5 changes: 5 additions & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import '../index.css';

export default function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />;
}
6 changes: 6 additions & 0 deletions pages/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"index": "Home",
"radio": "ac_radio",
"documents": "ac_documents",
"gifts": "ac_gifts"
}
8 changes: 8 additions & 0 deletions pages/documents/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"index": "Introduction",
"presets": "Creating presets",
"bridge": "Bridge",
"exports-and-events": "Exports and events",
"config": "Configuration",
"issues": "Common issues"
}
Loading

0 comments on commit 92e7d44

Please sign in to comment.