Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

26 changes: 0 additions & 26 deletions .eslintrc

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Site

on:
pull_request:
branches: [gh-pages]
push:
branches: [gh-pages]

permissions:
contents: write

concurrency:
group: site-${{ github.ref }}
cancel-in-progress: false

jobs:
site:
runs-on: ubuntu-latest
defaults:
run:
working-directory: website

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
cache: npm
cache-dependency-path: website/package-lock.json
- run: npm ci
- run: npm run check
# builds the site (the internal links are validated) and copies it to the branch root
- run: npm run publish-site
# GitHub Pages serves the branch root, so after a merge the root is
# replaced with this build (pushes of this token don't start workflows)
- name: Commit the published site
if: github.event_name == 'push'
run: |
git add -A ..
if git diff --cached --quiet; then
echo "The published site is up to date"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "chore: publish the site"
git push
33 changes: 4 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
/lib-cov

# Coverage directory used by tools like istanbul
/coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
/build

# Others
/.nyc_output

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
website/dist
website/.astro
.DS_Store
*.log
Empty file added .nojekyll
Empty file.
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

53 changes: 53 additions & 0 deletions 404.html

Large diffs are not rendered by default.

41 changes: 31 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
# React Simple Chatbot
# React Simple Chatbot website

Branch for website.
The documentation site of [React Simple Chatbot](https://github.com/LucasBassetti/react-simple-chatbot), published at **https://lucasbassetti.github.io/react-simple-chatbot/**.

## Getting Start
It is built with [Astro Starlight](https://starlight.astro.build). GitHub Pages serves this branch (`gh-pages`) as it is, so the branch holds both:

Run the following commands in your terminal
- `website/`: the source of the site (pages in `website/src/content/docs`, live examples in `website/src/examples`)
- the root: the built site, generated from `website/` (don't edit it by hand)

```
## Development

```bash
cd website
npm install
npm start
npm run dev
```

## Deploying
Open http://localhost:4321/react-simple-chatbot/.

- `npm run check`: type-check the site
- `npm run build`: build the site in `website/dist` and validate the links
- `npm run publish-site`: build the site and copy it to the branch root

## Publishing

GitHub Pages serves the branch root, and the **Site** workflow keeps it up to date:

For deployment, run `npm run build`.
- On pull requests, it type-checks and builds the site (the internal links are validated).
- After a merge into `gh-pages`, it builds the site again and commits the root if it changed.

## License
So a pull request only needs the changes in `website/`. Run `npm run publish-site` if you want to include the built root, or to preview it locally.

Mit - [Lucas Bassetti](https://lucasbassetti.com/)
## Live examples

Each file in `website/src/examples` is a chatbot rendered live in the page, and its source is shown as the example code. Use it in a page with:

```mdx
import Demo from '../../../components/Demo.astro';

<Demo name="options" />
```
2 changes: 2 additions & 0 deletions _astro/ExampleRenderer.DzdreRFX.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _astro/HeroChat.Y-sxtiaS.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

232 changes: 232 additions & 0 deletions _astro/Playground.BSp-mYTq.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import"./starlight-toc.D4UDIxQL.js";
1 change: 1 addition & 0 deletions _astro/bmi.BTmLDKNH.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading