Skip to content

Commit b4fa360

Browse files
authored
Merge pull request #328 from rokubop/feat/repository-explorer
Add repository explorer
2 parents 13ea6b2 + 8585cc8 commit b4fa360

File tree

13 files changed

+1811
-27
lines changed

13 files changed

+1811
-27
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

README.md

Lines changed: 136 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,136 @@
1-
This is the source repo for the [Talon wiki](https://talon.wiki), a community maintained wiki for [Talon voice](https://talonvoice.com/). For information on how to contribute, see our [Contributing](https://github.com/TalonCommunity/Wiki/blob/main/CONTRIBUTING.md) documentation.
1+
# Talon Wiki
2+
3+
This is the source repo for the [https://talon.wiki/](https://talon.wiki), a community maintained wiki for [Talon voice](https://talonvoice.com/).
4+
5+
Join the [Talon Slack](https://talonvoice.com/chat) to find other folks interested in or using Talon. If you want to support the project, consider donating to the [Patreon](https://www.patreon.com/lunixbochs).
6+
7+
## Who can Contribute
8+
9+
This wiki belongs to the Talon Community, and contributions are welcome from anyone.
10+
11+
## Development Setup for Contributors
12+
13+
### Prerequisites
14+
15+
- [Node.js](https://nodejs.org/) (version 18 or higher)
16+
- npm (comes with Node.js)
17+
- A GitHub account
18+
19+
### Getting Started
20+
21+
1. **Fork the repository** on GitHub by clicking the "Fork" button at the top of the [TalonCommunity/Wiki](https://github.com/TalonCommunity/Wiki) repository page.
22+
23+
2. **Clone your fork** (replace `YOUR_USERNAME` with your GitHub username):
24+
25+
```bash
26+
git clone https://github.com/YOUR_USERNAME/Wiki.git
27+
cd Wiki
28+
```
29+
30+
3. **Add the upstream remote** to keep your fork in sync:
31+
32+
```bash
33+
git remote add upstream https://github.com/TalonCommunity/Wiki.git
34+
```
35+
36+
4. **Install dependencies**:
37+
38+
```bash
39+
npm install
40+
```
41+
42+
5. **Start the development server**:
43+
```bash
44+
npm start
45+
```
46+
47+
The site will open at `http://localhost:3000` and automatically reload when you make changes.
48+
49+
### Contributing Workflow
50+
51+
1. **Create a new branch** for your changes:
52+
53+
```bash
54+
git checkout -b your-feature-branch
55+
```
56+
57+
2. **Make your changes** and test them locally
58+
59+
3. **Commit your changes**:
60+
61+
```bash
62+
git add .
63+
git commit -m "Description of your changes"
64+
```
65+
66+
4. **Push to your fork**:
67+
68+
```bash
69+
git push origin your-feature-branch
70+
```
71+
72+
5. **Create a Pull Request** from your fork to the main repository
73+
74+
### Keeping Your Fork Updated
75+
76+
Before starting new work, sync your fork with the upstream repository:
77+
78+
```bash
79+
git checkout main
80+
git fetch upstream
81+
git merge upstream/main
82+
git push origin main
83+
```
84+
85+
### Checklist for Contributors
86+
87+
- [ ] Fork the repository and create a feature branch
88+
- [ ] Use relative markdown links
89+
- [ ] Run `npm run build` and ensure the build is successful (no broken links)
90+
- [ ] Test your changes locally before submitting a pull request
91+
- [ ] Create a pull request with a clear description of your changes
92+
93+
## Available Commands
94+
95+
| Command | Description |
96+
| ---------------------- | ----------------------------------------------- |
97+
| `npm start` | Start the development server with hot reloading |
98+
| `npm run build` | Build the static site for production |
99+
| `npm run serve` | Serve the production build locally |
100+
| `npm run update-repos` | Fetch fresh repository data from GitHub API |
101+
| `npm run clear` | Clear Docusaurus cache |
102+
| `npm run typecheck` | Run TypeScript type checking |
103+
104+
## Repository Explorer
105+
106+
The wiki includes a [Repository Explorer](https://talon.wiki/explorer/) that automatically displays Talon-related repositories from GitHub tagged with `talonvoice` topic.
107+
108+
The repository data is cached locally to avoid hitting GitHub's API rate limits (60 requests per hour for unauthenticated users, 5,000 for authenticated users). To update the cached data, you can run:
109+
110+
```bash
111+
npm run update-repos
112+
# or
113+
npm run build --fetch-repos
114+
```
115+
116+
Otherwise, the explorer will use the cached data until the next production build or scheduled update.
117+
118+
### Omitting Repositories from the Explorer
119+
120+
To exclude specific repositories from the explorer:
121+
122+
1. Edit `plugins/repo-data-omit-list.json`
123+
2. Add repository full names to the `omitRepos` array:
124+
```json
125+
{
126+
"omitRepos": ["owner/repo-name", "another-owner/another-repo"]
127+
}
128+
```
129+
3. Changes take effect on the next build
130+
131+
## Technology Stack
132+
133+
- [Docusaurus](https://docusaurus.io/) - Static site generator
134+
- [React](https://reactjs.org/) - Component framework
135+
- [TypeScript](https://www.typescriptlang.org/) - Type safety
136+
- [Shiki](https://shiki.style/) - Syntax highlighting

docs/Integrations/talon_user_file_sets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The main Talon user file set for Talon is [Talon Community](https://github.com/t
55
If intended for public consumption, these Talon user file sets are mostly annouced via the [Slack channel](https://talonvoice.com/chat). Aside from that there are a few ways you can discover them:
66

77
- You can make use of the [Talon code search](https://search.talonvoice.com/search/). This aims to search all known github repositories containing Talon related code. If you're looking for integration with a particular application this is a good option.
8-
- You can browse the [github talonvoice topic](https://github.com/topics/talonvoice). Repositories can optionally tag themselves with this to aid discoverability.
8+
- You can browse the [Repository Explorer](/explorer) for Talon user file sets tagged with `talonvoice`. Repositories can tag themselves with this to aid discoverability.
99
- You can take a look at the manually curated list below.
1010

1111
## Voice controlled hands free mouse replacements

docusaurus.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const config: Config = {
6969
} satisfies Preset.Options,
7070
],
7171
],
72+
plugins: ["./plugins/repo-data-plugin.js"],
7273
markdown: {
7374
mermaid: true,
7475
},
@@ -145,6 +146,11 @@ const config: Config = {
145146
position: "left",
146147
label: "Resource Hub",
147148
},
149+
{
150+
to: "/explorer",
151+
position: "left",
152+
label: "Repository Explorer",
153+
},
148154
{
149155
type: "docSidebar",
150156
sidebarId: "HelpSidebar",

package-lock.json

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"docusaurus": "docusaurus",
77
"start": "docusaurus start",
88
"build": "docusaurus build && cp _redirects build/_redirects",
9+
"update-repos": "cross-env FETCH_REPOS=true npm run build",
910
"swizzle": "docusaurus swizzle",
1011
"deploy": "docusaurus deploy",
1112
"deploy:ghpages": "docusaurus deploy --config docusaurus.ghpages.config.js",
@@ -25,6 +26,7 @@
2526
"clsx": "^2.0.0",
2627
"estree-util-value-to-estree": "^3.4.0",
2728
"mermaid": "^11.10.1",
29+
"node-fetch": "^2.7.0",
2830
"prism-react-renderer": "^2.3.0",
2931
"react": "^18.0.0",
3032
"react-dom": "^18.0.0",
@@ -36,6 +38,7 @@
3638
"@docusaurus/types": "^3.7.0",
3739
"@shikijs/colorized-brackets": "^3.1.0",
3840
"@shikijs/transformers": "^3.1.0",
41+
"cross-env": "^7.0.3",
3942
"typescript": "~5.2.2"
4043
},
4144
"browserslist": {

plugins/repo-data-omit-list.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"description": "List of repositories to exclude from the Repository Explorer. Add repository full names (e.g., 'owner/repo-name') to the omitRepos array.",
3+
"omitRepos": ["voqal/voqal"]
4+
}

0 commit comments

Comments
 (0)