Skip to content

[feat][docs][website] Initial docusaurus based site #1770

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

Merged
merged 20 commits into from
Jan 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6aeb534
Iniital docusaurus based site
jimschubert Dec 28, 2018
c81c9b4
Remove error about default local being used by String.format
jimschubert Dec 28, 2018
fb49fa7
Change pinned users to represent global presence rather than alphabet…
jimschubert Dec 29, 2018
37ce585
Include generator indexes in ensure-up-to-date (docusaurus site and /…
jimschubert Dec 29, 2018
c69af94
Add Font Awesome attribution footer
jimschubert Dec 29, 2018
c4de50f
Remove feature callout until it is completed
jimschubert Dec 29, 2018
193b096
Include NPM try it out section
jimschubert Dec 29, 2018
185313e
Improve "Getting Started" type docs
jimschubert Dec 30, 2018
78faa74
Include new custom template documentation
jimschubert Dec 30, 2018
e57f8f0
Updating templating and customization docs
jimschubert Dec 31, 2018
1978db5
Merge branch 'master' into docusaurus
jimschubert Dec 31, 2018
e335cfc
Add vendor extension docs
jimschubert Jan 3, 2019
d173d77
Cleanup templating page(s).
jimschubert Jan 4, 2019
1480418
Move users to yaml file for easy edit.
jimschubert Jan 4, 2019
009e2f3
travis configuration, and baseUrl mods to image URLs
jimschubert Jan 4, 2019
3ed68a0
[docs] Migrate FAQ, release summary from wiki
jimschubert Jan 7, 2019
cddb722
Copy current contributing/code of conduct to website
jimschubert Jan 7, 2019
9563e8e
[docs] Creating a new generator
jimschubert Jan 9, 2019
0750ef9
Merge branch 'master' into docusaurus
jimschubert Jan 9, 2019
7c15b42
Merge branch 'master' into docusaurus
wing328 Jan 18, 2019
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
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: java
jdk:
- openjdk8


cache:
directories:
- $HOME/.m2
Expand Down Expand Up @@ -34,6 +33,7 @@ cache:
- $HOME/samples/server/petstore/cpp-pistache/pistache
- $HOME/.npm
- $HOME/.rvm/gems/ruby-2.4.1
- $HOME/website/node_modules/

services:
- docker
Expand Down Expand Up @@ -102,6 +102,7 @@ before_install:
gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY ;
gpg --check-trustdb ;
fi;
- pushd .; cd website; npm install; popd

install:
# Add Godeps dependencies to GOPATH and PATH
Expand Down Expand Up @@ -152,6 +153,15 @@ after_success:
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi
## docker: build cli image and push to Docker Hub
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && cp docker-entrypoint.sh ./modules/openapi-generator-cli && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME && echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
cd website;
git config --global user.name "${GH_NAME}";
git config --global user.email "${GH_EMAIL}";
echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
npm install;
GIT_USER="${GH_NAME}" npm run-script publish-gh-pages;
fi;

env:
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ For old releases, please refer to the [**Release**](https://github.com/OpenAPITo

## [1.2 - Artifacts on Maven Central](#table-of-contents)

You can find our released artefacts on maven central:
You can find our released artifacts on maven central:

**Core:**
```xml
Expand Down
34 changes: 34 additions & 0 deletions bin/utils/copy-to-website.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh

SCRIPT="$0"
echo "# START SCRIPT: $SCRIPT"

conduct_in=CODE_OF_CONDUCT.md
contrib_in=CONTRIBUTING.md
conduct_out=docs/conduct.md
contrib_out=docs/contributing.md


\rm -rf "${conduct_out}"
\rm -rf "${contrib_out}"

cat > "${conduct_out}" << EOF
---
id: code-of-conduct
title: Code of Conduct
---

$(tail -n +3 "${conduct_in}")
EOF
echo "Wrote $(pwd)/${conduct_out}"

cat > "${contrib_out}" << EOF
---
id: contributing
title: Guidelines For Contributing
sidebar_label: Guidelines
---

$(tail -n +3 "${contrib_in}")
EOF
echo "Wrote $(pwd)/${contrib_out}"
3 changes: 3 additions & 0 deletions bin/utils/ensure-up-to-date
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ declare -a scripts=("./bin/openapi3/ruby-client-petstore.sh"
"./bin/csharp-petstore.sh"
"./bin/meta-codegen.sh"
"./bin/utils/export_docs_generators.sh"
"./bin/utils/export_generators_docusaurus_index.sh"
"./bin/utils/copy-to-website.sh"
"./bin/utils/export_generators_readme.sh"
"./bin/go-petstore.sh"
"./bin/go-gin-petstore-server.sh")

Expand Down
4 changes: 1 addition & 3 deletions bin/utils/export_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ fi

executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

java -jar ${executable} config-help -g ${NAME} --named-header -o docs/generators/${NAME}.md

echo "Back to the [generators list](README.md)" >> docs/generators/${NAME}.md
java -jar ${executable} config-help -g ${NAME} --named-header --format markdown --markdown-header -o docs/generators/${NAME}.md
20 changes: 20 additions & 0 deletions bin/utils/export_generators_docusaurus_index.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

SCRIPT="$0"
echo "# START SCRIPT: $SCRIPT"

executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

\rm -rf docs/generators.md

cat > docs/generators.md << EOF
---
id: generators
title: Generators List
---

EOF

java -jar $executable list --docsite >> docs/generators.md

echo "Wrote $(pwd)/docs/generators.md"
14 changes: 13 additions & 1 deletion bin/utils/export_generators_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,16 @@ echo "# START SCRIPT: $SCRIPT"

executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

java -jar $executable list | sed -e 's/\([A-Z]*\) generators:/* \1 generators:/g' -e 's/- \([a-z0-9\-]*\)/- [\1]\(\1.md\)/g' > docs/generators/README.md
\rm -rf docs/generators.md

cat > docs/generators.md << EOF
---
id: generators
title: Generators List
---
EOF

java -jar $executable list | sed -e 's/\([A-Z]*\) generators:/* \1 generators:/g' -e 's/- \([a-z0-9\-]*\)/- [\1]\(generators\/\1.md\)/g' >> docs/generators.md

echo "Wrote $(pwd)/docs/generators.md"
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Loading