Skip to content

Commit

Permalink
feat: new website setup
Browse files Browse the repository at this point in the history
this pr moves the website into the shyft repo since adding typedocs is much easier done with this setup as when you have two separate ones.

basic setup is done so far, it was rebuilt from ground up since docusaurus v1 and v2 differ by a lot. Some css magic is missing still but so far everything works and looks almost like the old page did
  • Loading branch information
Enubia committed Jun 11, 2021
1 parent 5a7ba02 commit bf3de0d
Show file tree
Hide file tree
Showing 68 changed files with 18,373 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintignore
@@ -1,3 +1,4 @@
node_modules
coverage
lib
www/typedoc-sidebars.json
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -21,7 +21,6 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:

- name: Checkout
uses: actions/checkout@master

Expand Down Expand Up @@ -65,4 +64,9 @@ jobs:
- name: Publish to npm
run: npm publish --access public

- name: Generate docs and build website
run: cd wwww && npm install && npm run build

# TODO: needs a website deployment step here


2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -88,7 +88,7 @@
"sqlite3": "5.0.2",
"ts-jest": "26.5.6",
"typeorm": "0.2.34",
"typescript": "4.3.2"
"typescript": "4.2.x"
},
"dependencies": {
"@types/graphql": "^14.5.0",
Expand Down
20 changes: 20 additions & 0 deletions www/.gitignore
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
10 changes: 10 additions & 0 deletions www/Dockerfile
@@ -0,0 +1,10 @@
FROM node:8.16.1

WORKDIR /app/website

EXPOSE 3000 35729
COPY ./docs /app/docs
COPY ./website /app/website
RUN yarn install

CMD ["yarn", "start"]
33 changes: 33 additions & 0 deletions www/README.md
@@ -0,0 +1,33 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

## Installation

```console
yarn install
```

## Local Development

```console
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

```console
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions www/babel.config.js
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
18 changes: 18 additions & 0 deletions www/docker-compose.yml
@@ -0,0 +1,18 @@
version: "3"

services:
docusaurus:
build: .
ports:
- 3000:3000
- 35729:35729
volumes:
- ./docs:/app/docs
- ./website/blog:/app/website/blog
- ./website/core:/app/website/core
- ./website/i18n:/app/website/i18n
- ./website/pages:/app/website/pages
- ./website/static:/app/website/static
- ./website/sidebars.json:/app/website/sidebars.json
- ./website/siteConfig.js:/app/website/siteConfig.js
working_dir: /app/website
1 change: 1 addition & 0 deletions www/docs/api/_category_.yml
@@ -0,0 +1 @@
label: "API"
2 changes: 2 additions & 0 deletions www/docs/api/classes/_category_.yml
@@ -0,0 +1,2 @@
label: "Classes"
position: 3

0 comments on commit bf3de0d

Please sign in to comment.