Skip to content

Commit 1972afd

Browse files
committed
Release 1.0.0
Запилил базовый функционал. Есть сборка через докер. Все инструкции по запуску в README.md merge dev into master Update README.md Dev (#3) * Добавил билды через github actions * Update README.md
1 parent c6d3276 commit 1972afd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+9791
-1592
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.next
2+
.git
3+
out
4+
node_modules

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.github/workflows/build-dev.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build-dev
2+
3+
on:
4+
push:
5+
branches: [dev]
6+
pull_request:
7+
branches: [dev]
8+
types:
9+
- closed
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: nickdemiman/steam-markup-editor
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Log in to the Github Container registry
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Extract Docker metadata
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
35+
36+
- name: Build and push
37+
uses: docker/build-push-action@v5
38+
id: build
39+
with:
40+
context: .
41+
push: true
42+
tags: "${{ env.REGISTRY }}/${{env.IMAGE_NAME}}:dev"

.github/workflows/build-master.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: build-master
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
types:
7+
- closed
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: nickdemiman/steam-markup-editor
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Log in to the Github Container registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Extract Docker metadata
29+
id: meta
30+
uses: docker/metadata-action@v5
31+
with:
32+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v5
36+
id: build
37+
with:
38+
context: .
39+
push: true
40+
tags: "${{ env.REGISTRY }}/${{env.IMAGE_NAME}}:master"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build-release
2+
3+
on:
4+
release:
5+
types:
6+
- prereleased
7+
- created
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: nickdemiman/steam-markup-editor
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Log in to the Github Container registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Build and push
29+
uses: docker/build-push-action@v5
30+
id: build
31+
with:
32+
context: .
33+
push: true
34+
tags: "${{ env.REGISTRY }}/${{env.IMAGE_NAME}}:${{github.ref_name}}"

.gitignore

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
1-
node_modules/
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM node:20.13.1-alpine AS build
2+
3+
WORKDIR /root
4+
COPY . .
5+
6+
RUN <<EOF
7+
npm ci
8+
npm run build
9+
EOF
10+
11+
FROM nginx:1.27.0-alpine AS final
12+
13+
COPY --from=build /root/out/ /var/www/
14+
COPY nginx.conf /etc/nginx/conf.d/default.conf
15+
16+
EXPOSE 8000

LICENSE

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

README.md

Lines changed: 56 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,56 @@
1-
# Steam Markup Generator
2-
3-
A lightweight rich-text editor that enables you to format text using Steam's [custom markup tags](https://steamcommunity.com/comment/Recommendation/formattinghelp), providing a live preview of the formatted content.
4-
5-
## Features
6-
7-
- Basic text formatting options like **bold**, *italic*, underline, and strikethrough.
8-
- Headers, horizontal rules, and code blocks support.
9-
- Add quotations with authors and embed spoilers.
10-
- Keyboard shortcuts for quick formatting.
11-
12-
## Usage
13-
14-
1. Type or paste the text you want to format into the editor.
15-
2. Use the buttons above the editor or keyboard shortcuts to apply formatting.
16-
3. See the live preview below the editor to check how your content looks.
17-
18-
## Keyboard Shortcuts
19-
20-
- **Bold**: Ctrl + B
21-
- **Italic**: Ctrl + I
22-
- **Underline**: Ctrl + U
23-
- **Strike**: Ctrl + Shift + X
24-
- **Header**: Ctrl + Shift + H
25-
- **URL**: Ctrl + K
26-
27-
## Planned Features
28-
- [x] Local storage saving to prevent progress loss
29-
- [x] URL support
30-
- [ ] Add remaining buttons
31-
- [ ] More keybinds
32-
- [ ] Markdown to Steam Markup converter
33-
34-
## Feedback
35-
36-
This is a beta version of the editor. If you encounter any issues or have suggestions for improvements, please [open an issue](https://github.com/bijx/Steam-Markup-Generator/issues).
37-
38-
## License
39-
40-
This project is licensed under the MIT License. See the `LICENSE` file for more details.
41-
1+
# Steam Markup Editor (Редактор разметки Steam)
2+
Легковесный редактор разметки steam с визуализацией. Редактор поддерживает комбинации клавиш и много чего другого.
3+
На данный момент реализованы теги:
4+
- Хедеры (Ctrl + 1,2,3)
5+
- Жирный текст (Ctrl + B)
6+
- Подчеркнутый (Ctrl + U)
7+
- Курсив (Ctrl + I)
8+
- Зачеркнутый (Ctrl + S)
9+
- Спойлер
10+
- Сырой текст (Noparse)
11+
- Горизонтальный разделитель
12+
- Формат кода
13+
14+
Проектом давно не занимался и работы еще много. В плане, реализовать:
15+
- Url, вставка ссылок
16+
- Маркированный списки
17+
- Нумерованные списки
18+
- Цитаты
19+
- Таблицы
20+
21+
Также в процессе буду фиксить ошибки и баги, которые встречу
22+
23+
# Быстрый старт
24+
Проект можно опробовать следующим образом
25+
26+
Клонируем репозиторий
27+
```bash
28+
mkdir steam-markup-editor
29+
cd steam-markup-editor
30+
git clone https://github.com/NickDemiman/Steam-Markup-Editor.git .
31+
```
32+
33+
## Сервер Next.js
34+
Устанавливаем зависимости
35+
```bash
36+
npm ci
37+
```
38+
39+
Запускаем билд и сервим приложение
40+
```bash
41+
npm run build
42+
npm start
43+
```
44+
45+
## Docker образ
46+
Для запуска, достаточно собрать и запустить
47+
```bash
48+
docker build -t editor .
49+
docker run -it --rm -p 8000:8000 editor:latest
50+
```
51+
52+
Либо запулить образ и запустить
53+
```bash
54+
docker pull ghcr.io/nickdemiman/steam-markup-editor
55+
docker run -it --rm -p 8000:8000 ghcr.io/nickdemiman/steam-markup-editor
56+
```

changelog.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# В оригинале
2+
3+
1. ctrl+z не отменяет выделение тегами
4+
2. Комбинации привязаны к раскладке
5+
6+
Пример:
7+
8+
```plain
9+
[h1]Заголовок 1[/h1]
10+
[h2]Заголовок 2[/h2]
11+
[h3]Заголовок 3[/h3]
12+
[b]Жирный текст[/b]
13+
[u]Подчеркивание[/u]
14+
[i]Курсив[/i]
15+
[strike]Перечеркнутый[/strike]
16+
[spoiler]Спойлер![/spoiler] Пробел [spoiler]Еще раз спойлер[/spoiler]
17+
[noparse]
18+
[h1]Заголовок 1[/h1]
19+
[h2]Заголовок 2[/h2]
20+
[h3]Заголовок 3[/h3]
21+
[b]Жирный текст[/b]
22+
[u]Подчеркивание[/u]
23+
[i]Курсив[/i]
24+
[strike]Перечеркнутый[/strike]
25+
[/noparse]
26+
[hr]
27+
[code]
28+
example:
29+
server:
30+
address: consul.ext
31+
port: 6379
32+
[/code]
33+
```
34+
35+
[Ссылка на доку по форматированию](https://steamcommunity.com/comment/Recommendation/formattinghelp)

0 commit comments

Comments
 (0)