Skip to content

Port to Astro #160

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

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
77 changes: 77 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Development build
run-name: 🚀 ${{ github.actor }} - ${{ github.event.head_commit.message }}

on:
push:
branches:
- dev**
paths-ignore:
- '**/README.md'

env:
VERSION_NODE: 22.x
IMAGE_NAME: cesbo/cesbo-help
IMAGE_REGISTRY_URL: 103.249.134.120:5000

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
name: Build

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.VERSION_NODE }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

publish-docker:
runs-on: ubuntu-latest
name: Publish to Docker
env:
BRANCH_NAME: ${{ github.ref_name }}
steps:
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Configure Docker to use insecure registry
run: |
echo '{"insecure-registries": ["${{ env.IMAGE_REGISTRY_URL }}"]}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker

- name: Checkout repository
uses: actions/checkout@v4

- name: Prepare the image tag
run: |
export IMAGE_TAG=$(echo "$BRANCH_NAME" | sed 's/[\/\\]/-/g')
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV

- name: 🛠️ Build Docker image
run: |
docker build \
--load \
--file ./deploy/Dockerfile \
--tag ${{ env.IMAGE_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \
--tag ${{ env.IMAGE_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:latest \
.
- name: Check Docker Registry
run: curl -v ${{ env.IMAGE_REGISTRY_URL }}/v2/
- name: Push Docker image
run: |
docker push ${{ env.IMAGE_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker push ${{ env.IMAGE_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:latest
26 changes: 20 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
node_modules
.nuxt
.nitro
.cache
.output
# build output
dist/
# generated types
.astro/
.vscode

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
dist
.env.production

# macOS-specific files
.DS_Store
42 changes: 0 additions & 42 deletions CLAUDE.md

This file was deleted.

133 changes: 35 additions & 98 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,117 +1,54 @@
# Cesbo Docs
# Starlight Starter Kit: Basics

All docs separated by language and category.

Categories:

- `astra` - Cesbo Astra
- `misc` - Tools, Utilities, System Administration, etc

## Formatting rules

### Heading

Only 2 levels is available:

- `##` - second-level heading
- `###` - third-level heading

### Lists

Nested lists is illegal

### Text decoration

Bold - names:

- Form field
- Button
- Menu item
- Application name

Code - examples and example parts:

- Part of the log
- Command
- Example URL

### General note

Used for additional information
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)

```
::note
New feature now available! Check it out
::
npm create astro@latest -- --template starlight
```

### Alert block
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)

For attention
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!

```
::alert
Please update your password immediately
::
```
## 🚀 Project Structure

### Spoiler block

For hidden content like examples
Inside of your Astro + Starlight project, you'll see the following folders and files:

```
::spoiler{title="Example"}
Spoiler content in markdown format
::
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ └── content.config.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```

### Badge
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.

```
:badge[Version]
:badge[Warning]{type="warning"}
:badge[Error]{type="error"}
```

### YouTube

```
:youtube[Description]{id="video-id"}
```


## Search Index

### Configure Language

1. Go to Algolia dashboard and select your index
2. Click the **Configuration** tab, then click on **Language**
3. Select required language in **Index Languages**
Images can be added to `src/assets/` and embedded in Markdown with a relative link.

### Configure Grouping
Static assets, like favicons, can be placed in the `public/` directory.

1. Go to Algolia dashboard and select your index
2. Click the **Configuration** tab, then click on **Facets**
3. Append attribute `category` to the **Attributes for faceting** list
4. Save changes
## 🧞 Commands

### Update Algolia index
All commands are run from the root of the project, from a terminal:

Append Admin API key to the environment variables:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

```
ALGOLIA_SECRET_KEY="..."
```

Launch:
## 👀 Want to learn more?

```
npm run generate
```

## Deploy

```
npm run generate
tar -zHcf - dist | ssh cesbo.dev tar -C /opt/help -zxf -
```
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
70 changes: 0 additions & 70 deletions app.vue

This file was deleted.

Loading