Skip to content

Commit bf6a729

Browse files
authored
Merge pull request #12 from textwire/vitepress
Vitepress
2 parents a60b568 + ef12fd9 commit bf6a729

146 files changed

Lines changed: 4053 additions & 20042 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.

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
node_modules
22
.git
3+
.github
34
.gitignore
5+
.prettierrc
46
*.md
57
Dockerfile
6-
.github
7-
.prettierrc

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
uses: JamesIves/github-pages-deploy-action@v4
2525
with:
2626
# The folder the action should deploy.
27-
folder: build
27+
folder: docs/.vitepress/dist

.gitignore

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
# Dependencies
2-
/node_modules
3-
4-
# Production
5-
/build
6-
7-
# Generated files
8-
.docusaurus
9-
.cache-loader
10-
11-
# Misc
1+
node_modules
2+
.temp
3+
.cache
4+
.vscode
125
.DS_Store
13-
.env.local
14-
.env.development.local
15-
.env.test.local
16-
.env.production.local
17-
18-
npm-debug.log*
19-
yarn-debug.log*
20-
yarn-error.log*
21-
6+
dist
7+
/docs/.vitepress/dist
8+
/docs/.vitepress/cache
9+
yarn.lock
2210
Session.vim

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Textwire Documentation
2+
3+
## Project Overview
4+
5+
VitePress documentation site for Textwire.
6+
7+
## Directory Structure
8+
9+
- Theme files: `docs/.vitepress/theme/`
10+
- Syntax highlighting: `docs/.vitepress/textwire.tmLanguage.json`
11+
- VitePress config: `docs/.vitepress/config.mts`
12+
- Versioned docs: `docs/versions/`
13+
- Blog articles: `docs/.vitepress/blog/`
14+
- Blog registry: `docs/.vitepress/theme/modules/blogPosts.ts`
15+
16+
## Development
17+
18+
- No tests needed
19+
- Build: `npm run build`

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM node:24-alpine
22

3+
RUN apk add --no-cache git
4+
35
WORKDIR /app
46

57
COPY package*.json .
@@ -9,6 +11,6 @@ RUN npm install && \
911

1012
COPY . .
1113

12-
EXPOSE 3000
14+
EXPOSE 5173
1315

14-
CMD ["npm", "start"]
16+
CMD ["npm", "run", "dev"]

README.md

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,105 @@
11
# Textwire Documentation
2-
Docs build with [Docusaurus](https://docusaurus.io/).
32

4-
## Contribute
5-
### NPM Commands
6-
#### Install Dependencies
7-
```bash
8-
npm install
9-
```
3+
Documentation website for [Textwire](https://github.com/textwire/textwire) templating language for Go (Golang) written with [VitePress](https://vitepress.dev/)
104

11-
#### Watch File Changes
12-
```bash
13-
npm start
14-
```
5+
## Contribute
156

16-
Navigate to `http://localhost:3000` to see your documentation.
7+
### Build an Image
178

18-
### With Container Engine
19-
#### Build an Image
209
To build an image, navigate to the root of the project and run this command.
2110

22-
For Podman:
11+
With Podman:
12+
2313
```bash
2414
podman-compose build
2515
```
2616

27-
For Docker:
17+
With Docker:
18+
2819
```bash
2920
docker compose build
3021
```
3122

32-
#### Create `node_modules`
23+
### Create `node_modules`
24+
3325
Run this command to install npm packages and generate a `node_modules` directory on your local machine.
3426

35-
For Podman:
27+
With Podman:
28+
3629
```bash
3730
podman-compose run --rm app npm i
3831
```
3932

40-
For Docker:
33+
With Docker:
34+
4135
```bash
4236
docker compose run --rm app npm i
4337
```
4438

45-
#### Run the Container
39+
### Run the Container
40+
4641
To run a container, navigate to the root of the project and run this command.
4742

48-
For Podman:
43+
With Podman:
44+
4945
```bash
50-
podman-compose up -d
46+
podman-compose up
5147
```
5248

53-
For Docker:
49+
With Docker:
50+
5451
```bash
55-
docker compose up -d
52+
docker compose up
5653
```
5754

58-
You can visit `http://localhost:3000` to see your documentation. Your files will be auto-compiled to plain JavaScript as you change them.
55+
You can visit [localhost:3000](http://localhost:3000) to see your documentation.
56+
57+
### Enter the Container
5958

60-
#### Enter the Container
6159
To enter inside of the container, run this command.
6260

63-
For Podman:
61+
With Podman:
62+
6463
```bash
65-
podman-compose exec app sh
64+
podman-compose app sh
6665
```
6766

68-
For Docker:
67+
With Docker:
68+
6969
```bash
70-
docker compose exec app sh
70+
docker compose app sh
7171
```
7272

7373
You'll be able to run NPM commands inside of the container.
7474

75-
> [!TIP]
76-
> You don't need to run `npm start` because it's already running after you created a container.
75+
### Remove the Container
7776

78-
#### Delete the Container
79-
After you are done working on a project, you can cleanup by stopping and removing all the running containers for this project.
77+
After you are done working on a project, you can cleanup by removing running containers.
78+
79+
With Podman:
8080

81-
For Podman:
8281
```bash
8382
podman-compose down
8483
```
8584

86-
For Docker:
85+
With Docker:
86+
8787
```bash
8888
docker compose down
8989
```
90+
91+
## NPM Commands
92+
93+
### Install Dependencies
94+
95+
```bash
96+
npm i
97+
```
98+
99+
### Watch File Changes
100+
101+
```bash
102+
npm run dev
103+
```
104+
105+
Navigate to [localhost:5173](http://localhost:5173) to see your documentation if you run this project locally. With container engines it's going to be [localhost:3000](http://localhost:3000).

babel.config.js

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

blog/authors.yml

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

blog/tags.yml

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

compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ services:
88
volumes:
99
- .:/app:z
1010
ports:
11-
- 3000:3000
11+
- 3000:5173

0 commit comments

Comments
 (0)