Skip to content

Commit 716f22a

Browse files
authored
Merge pull request #17 from Vanshbordia/TeamsInfo
Updated Docs and Release v1.1
2 parents b03abfe + 4276367 commit 716f22a

121 files changed

Lines changed: 21316 additions & 542 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy BetterDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'betterdocs/**'
9+
- '.github/workflows/deploy-betterdocs.yml'
10+
pull_request:
11+
paths:
12+
- 'betterdocs/**'
13+
- '.github/workflows/deploy-betterdocs.yml'
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '18'
40+
cache: 'npm'
41+
cache-dependency-path: 'betterdocs/package-lock.json'
42+
43+
- name: Install dependencies
44+
working-directory: ./betterdocs
45+
run: npm ci
46+
47+
- name: Build documentation
48+
working-directory: ./betterdocs
49+
run: npm run build
50+
51+
- name: Setup Pages
52+
uses: actions/configure-pages@v4
53+
54+
- name: Upload artifact
55+
uses: actions/upload-pages-artifact@v3
56+
with:
57+
path: './betterdocs/out'
58+
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
run: |
2828
python -m pip install --upgrade pip
2929
pip install -e .[test]
30+
pip install httpx[http2,brotli]
3031
3132
- name: Run tests
3233
run: pytest tests/lib/ -v
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Validate BetterDocs Code Snippets
2+
permissions:
3+
contents: read
4+
on:
5+
pull_request:
6+
paths:
7+
- 'betterdocs/**'
8+
- 'scripts/validate_betterdocs_snippets.py'
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'betterdocs/**'
14+
- 'scripts/validate_betterdocs_snippets.py'
15+
16+
jobs:
17+
validate-betterdocs:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.11'
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -e .[test,dev]
33+
pip install httpx[http2,brotli]
34+
35+
- name: Validate betterdocs snippets
36+
run: |
37+
python scripts/validate_betterdocs_snippets.py --timeout 30 --skip-pattern "(while\s+True|time\.sleep\(|input\(|monitor_live_matches|track_tournament)"
38+
env:
39+
PYTHONPATH: ${{ github.workspace }}/src
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Validate Documentation Code Snippets
2+
permissions:
3+
contents: read
4+
on:
5+
pull_request:
6+
paths:
7+
- 'docs/**'
8+
- 'scripts/validate_doc_snippets.py'
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'docs/**'
14+
- 'scripts/validate_doc_snippets.py'
15+
16+
jobs:
17+
validate-docs:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.11'
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -e .[test,dev]
33+
pip install httpx[http2,brotli]
34+
35+
- name: Validate documentation snippets
36+
run: |
37+
python scripts/validate_doc_snippets.py --timeout 30 --skip-pattern "(while\s+True|time\.sleep\(|input\(|monitor_live_matches|track_tournament)"
38+
env:
39+
PYTHONPATH: ${{ github.workspace }}/src

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,25 @@ wheels/
88
.pytest_cache/
99
# Virtual environments
1010
.venv/
11+
# Validation cache
12+
.validation_cache.json
13+
14+
# Node.js
15+
node_modules/
16+
.next/
17+
.npm/
18+
.yarn/
19+
.pnpm-store/
20+
.vercel/
21+
22+
# Node/Yarn/NPM/Pnpm logs
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
pnpm-debug.log*
27+
28+
# Additional Python (pip/uv)
29+
venv/
30+
env/
31+
pip-wheel-metadata/
32+
pip-log.txt

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ print(f"Found {results.total_results} results")
3636
# Get upcoming matches
3737
matches = vlr.matches.upcoming(limit=5)
3838
for match in matches:
39-
print(f"{match.teams[0]} vs {match.teams[1]}")
39+
print(f"{match.team1.name} vs {match.team2.name}")
4040

4141
# Player stats
4242
profile = vlr.players.profile(player_id=4164)

betterdocs/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# deps
2+
/node_modules
3+
4+
# generated content
5+
.contentlayer
6+
.content-collections
7+
.source
8+
9+
# test & build
10+
/coverage
11+
/.next/
12+
/out/
13+
/build
14+
*.tsbuildinfo
15+
16+
# misc
17+
.DS_Store
18+
*.pem
19+
/.pnp
20+
.pnp.js
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# others
26+
.env*.local
27+
.vercel
28+
next-env.d.ts

betterdocs/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# betterdocs
2+
3+
This is a Next.js application generated with
4+
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
5+
6+
Run development server:
7+
8+
```bash
9+
npm run dev
10+
# or
11+
pnpm dev
12+
# or
13+
yarn dev
14+
```
15+
16+
Open http://localhost:3000 with your browser to see the result.
17+
18+
## Explore
19+
20+
In the project, you can see:
21+
22+
- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
23+
- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.
24+
25+
| Route | Description |
26+
| ------------------------- | ------------------------------------------------------ |
27+
| `app/(home)` | The route group for your landing page and other pages. |
28+
| `app/docs` | The documentation layout and pages. |
29+
| `app/api/search/route.ts` | The Route Handler for search. |
30+
31+
### Fumadocs MDX
32+
33+
A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.
34+
35+
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.
36+
37+
## Learn More
38+
39+
To learn more about Next.js and Fumadocs, take a look at the following
40+
resources:
41+
42+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
43+
features and API.
44+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
45+
- [Fumadocs](https://fumadocs.dev) - learn about Fumadocs

betterdocs/app/(home)/layout.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { HomeLayout } from 'fumadocs-ui/layouts/home';
2+
import { baseOptions } from '@/lib/layout.shared';
3+
4+
export default function Layout({ children }: LayoutProps<'/'>) {
5+
return <HomeLayout {...baseOptions()}>{children}</HomeLayout>;
6+
}

betterdocs/app/(home)/page.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import Link from 'next/link';
2+
3+
export default function HomePage() {
4+
return (
5+
<main className="flex flex-1 flex-col justify-center text-center">
6+
<h1 className="mb-4 text-2xl font-bold">Hello World</h1>
7+
<p className="text-fd-muted-foreground">
8+
You can open{' '}
9+
<Link
10+
href="/docs"
11+
className="text-fd-foreground font-semibold underline"
12+
>
13+
/docs
14+
</Link>{' '}
15+
and see the documentation.
16+
</p>
17+
</main>
18+
);
19+
}

0 commit comments

Comments
 (0)