Skip to content

Commit

Permalink
Add all docs from effector v23
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Jun 6, 2024
0 parents commit c4333b7
Show file tree
Hide file tree
Showing 274 changed files with 35,357 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Github Pages

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: write
id-token: write
pages: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4

- name: 🐧 Use Node.js v20.x
uses: actions/setup-node@v4
with:
node-version: v20.x
cache: "pnpm"

- run: corepack enable
- run: pnpm install
- run: pnpm build
- run: pnpm search:build

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "./build"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

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


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
.idea
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
.astro
.vscode
21 changes: 21 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 100,
"plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-organize-attributes"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro",
"plugins": [
"prettier-plugin-tailwindcss",
"prettier-plugin-astro",
"prettier-plugin-organize-attributes"
]
}
}
]
}
140 changes: 140 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
Zero Bias <zerobias@icloud.com>
andretshurotshka <andwebar@gmail.com>
Dmitry Boldyrev <ribkatt@gmail.com>
Sergey Sova <mail@sergeysova.com>
Alexander Khoroshikh <32790736+AlexandrHoroshih@users.noreply.github.com>
popuguytheparrot <d3xrow@gmail.com>
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Igor Kamyshev <igor@kamyshev.me>
Sova <5620073+sergeysova@users.noreply.github.com>
AlexandrHoroshih <xad71rus@gmail.com>
Valery Kobzar <kobzarvs@gmail.com>
doasync <doasync@gmail.com>
Egor Guscha <forcejmage@gmail.com>
Illia Osmanov (iosmanov) <iosmanov@cisco.com>
mg901 <mgreen097@gmail.com>
Yan <YanLobat@users.noreply.github.com>
Igor Ryzhov <vinokur141@gmail.com>
Illia Osmanov <illiaosmanov@gmail.com>
Arthur Irgashev <arthur.irgashev@gmail.com>
bloadvenro <bloadvenro@mail.ru>
YanLobat <yanlavryushev@gmail.com>
Ilya <10588170+Komar0ff@users.noreply.github.com>
Kirill Mironov <k.mironov@tinkoff.ru>
Ainur Sharaev <ainursharaev@gmail.com>
Arutyunyan Artyom <artalar@ya.ru>
drevoed <drevoed@posteo.net>
Nikita Nafranets <eddimensi@gmail.com>
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
popuguy <19804652+popuguytheparrot@users.noreply.github.com>
Aleksandr Osipov <osipov.as89@gmail.com>
Andrew Gopienko <a.gopienko@iml.ru>
bakugod <47696795+bakugod@users.noreply.github.com>
Victor Didenko <victord@setplex.com>
sterios_sav <sterios_sav@mail.ru>
Dmitrij Shuleshov <3arabotaet@gmail.com>
Viktor Pasynok <binjospookie@gmail.com>
zukhrik <kz_spiky@mail.ru>
Mika Andrianarijaona <mandrianarijaona@ext.sephora.fr>
SLy <sly5992@gmail.com>
Spoki4 <ivan.sherstnyuk@gmail.com>
uulaal <uulaal@mail.ru>
Antropov Andrey <antropov.a@skbkontur.ru>
Bohdan Petrov <mind.your.life.guide@gmail.com>
Egor Aristov <egor@realatom.com>
sergey20x25 <vdoond@mail.ru>
Ainur <33234903+ainursharaev@users.noreply.github.com>
Alexander Belov <16794134+belovweb@users.noreply.github.com>
Anton Kosykh <kelin2025@yandex.ru>
Anton Yurovskykh <11337124+yurovant@users.noreply.github.com>
Arsen-95 <83858217+Arsen-95@users.noreply.github.com>
Denis Sikuler <progwork@yandex.com>
Kirill <79372250+bybbsy@users.noreply.github.com>
Komar0ff <binary.reptile@gmail.com>
Maxim Sidorov <msidorov@boardmaps.com>
Renat Sagdeev <justrenat@gmail.com>
Samir <ash_dj@mail.ru>
Sozonov <sozonov@li.ru>
Stanislav <ixentrum@gmail.com>
Tauyekel Kunzhol <k.tauka@gmail.com>
Victor <yumaa.verdin@gmail.com>
Vladimir Ivakin <vla.ivakin@gmail.com>
aldibatyr@gmail.com <47831819+aldibatyr@users.noreply.github.com>
allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
cqh <cqh963852@hotmail.com>
ivanov-v <sferamail33@yandex.ru>
xaota <1172619+xaota@users.noreply.github.com>
☃︎ <faustienf@protonmail.com>
0xflotus <0xflotus@gmail.com>
45m0d3u5 <abdukarim.radjapov@gmail.com>
7iomka <7iomka@gmail.com>
Abel Siqueira <abel.s.siqueira@gmail.com>
Aleksandr Grigorii <42298502+domosedov@users.noreply.github.com>
Aleksei Arro <polsck@gmail.com>
Aleksei Pudnikov <alexey.pudnikov@yandex.ru>
Alex Anokhin <sasankhin124@gmail.com>
Alexander Mikhaylov <mihasia20008@gmail.com>
Alexandrsv <zbc@mail.ru>
Andrew Laiff <q.laiff@gmail.com>
Artsiom Rymarchyk <artsiom.rymarchyk@itechart-group.com>
DecliningLotus <declininglotus@gmail.com>
Denis Maushov <dmaushov@gmail.com>
Denis Skiba <skdenx@gmail.com>
Dmitry Dudin <dima.dudin@gmail.com>
Ed Prince <edprince@users.noreply.github.com>
Egor Gorbachev <ya.7gorbachev2016@yandex.ru>
Gabriel Husek <husek@me.com>
Ilya Martynov <84752977+Ilmar7786@users.noreply.github.com>
Infant Frontender <34810942+newbornfrontender@users.noreply.github.com>
Ivan Oshchepkov <oshchepkov.ivan@gmail.com>
Jan Keromnes <jan.keromnes@typefox.io>
Jesse Jackson <jsejcksn@users.noreply.github.com>
Joel Bandi <joelvivekbandi@gmail.com>
Kireev Mikhail <29187880+kireevmp@users.noreply.github.com>
Kirill Tyurin <kirill.tiurin@stm-labs.ru>
Kurzdor <pavloeksmidt@gmail.com>
Lebedev Konstantin <ibnRubaXa@gmail.com>
Leniorko <www.Len244@gmail.com>
Ludovic Dem <ludovic@demblans.com>
MiiZZo <miizzo.js@mail.ru>
Mike Cann <mike.cann@gmail.com>
Oleg <64708593+olejech@users.noreply.github.com>
Oleh <olegbrony@gmail.com>
Pasha Grekovich <pgrekovich@gmail.com>
Pavel Tereschenko <me@stupidcat.wtf>
Rachael Dawn <me@rachaeldawn.ca>
Rafael Fakhreev <rrfakhr5@mts.ru>
Raman Aktsisiuk <romadryud@gmail.com>
Robert Kuzhin <82271383+raidenmiro@users.noreply.github.com>
Roman <pomah156@gmail.com>
Satya Rohith <me@satyarohith.com>
Sergey Belozyorcev <belozyorcev@ya.ru>
Shiyan7 <57950265+Shiyan7@users.noreply.github.com>
The Gitter Badger <badger@gitter.im>
Usman Yunusov <usman.iunusov@gmail.com>
Vadim Filimonov <philimonovvadim@gmail.com>
Vasili Sviridov <vsviridov@exceede.com>
Vasili Svirydau <vsvirydau@copperleaf.com>
Victor Kolb <violetmonox@gmail.com>
Victor-Nikliaiev <victor.nikliaiev@gmail.com>
Vladislav <vladislav.melnikov.98@gmail.com>
Vladislav Botvin <darkvlados@gmail.com>
Will Heslam <willheslam@gmail.com>
WoodenPC <stiflerovich@mail.ru>
Yesset <bonkboykz@users.noreply.github.com>
alek-de-mik <Alek-de-Mik@yandex.ru>
anatolykopyl <akopyl@radner.ru>
ansunrisein <45604301+ansunrisein@users.noreply.github.com>
c01nd01r <stas.er.it@gmail.com>
dmitryplyaskin <35658668+dmitryplyaskin@users.noreply.github.com>
gzaripov <grigory.zaripov@gmail.com>
houston[bot] <astrobot-houston@users.noreply.github.com>
ilfey <ilfey.local@gmail.com>
kanno <812137533@qq.com>
leushkin <kirill.leushkin1@gmail.com>
miyaokamarina <miyaokamarina@gmail.com>
nulladdict <nulladdicted@gmail.com>
risenforces <i.am@risen.dev>
seonmyung.lim <seonmyung.lim@adriel.ai>
vladthelittleone <vladthelittleone@gmail.com>
xxxue <1659809758@qq.com>
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Documentation

## Content files

All files of the content can be written using MD or MDX inside `src/content/docs/[lang]`.

Astro can find localized version via the same slug (path to the document) in the another directory:

- `src/content/docs/[lang]/[slug].md` (_or `.mdx`_)
- `src/content/docs/en/api/effector/clearNode.md`
- `src/content/docs/ru/api/effector/clearNode.md`

## Configuration

The most basic setup is in `src/consts.ts`.

Translation of the UI elements is in `src/languages.ts`.

All navigation structure is in `src/navigation.ts`.

## Run

Simply install the `pnpm` and run:

```shell
pnpm install
pnpm start
```

To fetch commits history, you need Github Personal Access Token. Just add it:

```shell
GITHUB_TOKEN=github_pat_REDACTED_TOKEN pnpm start
```

### Search

By default search disabled on the local machine due to index requirements. But you can enable it by following steps:

1. Build the docs — `COMPRESS=false pnpm build`
2. Start search serve server — `pnpm search:dev`
3. Start astro with env parameter `PUBLIC_SEARCH=true pnpm dev`

`COMPRESS=false` disables compressing, to speed up build.
56 changes: 56 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import "dotenv/config";
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import compress from "astro-compress";
import preact from "@astrojs/preact";
import tailwind from "@astrojs/tailwind";
import directive from "remark-directive";
import github from "remark-github";
import breaks from "remark-breaks";
import rehypeAutolinkHeadings from "rehype-autolink-headings";

import { remarkHeadingId } from "@effector/remark-heading-id";

import { admonitions } from "./plugins/admonitions";
import { remarkFallbackLang } from "./plugins/remark-fallback-lang";

// https://astro.build/config
export default defineConfig({
site: process.env.NODE_ENV === "development" ? "http://localhost:4321" : `https://effector.dev`,
integrations: [
tailwind({ applyBaseStyles: false }),
preact({ compat: true }),
mdx({ extendMarkdownConfig: true }),
process.env.COMPRESS !== "false" && compress(),
],
prefetch: true,
base: "/",
build: {
assets: "assets",
},
scopedStyleStrategy: "where",
markdown: {
syntaxHighlight: "prism",
remarkPlugins: [directive, admonitions, github, remarkHeadingId],
rehypePlugins: [
[
rehypeAutolinkHeadings,
{
behavior: "prepend",
properties: { class: "href" },
},
],
],
},
vite: {
server: {
proxy: {
"/_pagefind": {
target: "http://127.0.0.1:1414",
rewrite: (path) => path.replace(/^\/dist/, ""),
},
},
},
},
devToolbar: { enabled: false },
});
Loading

0 comments on commit c4333b7

Please sign in to comment.