From 7d366ad6ac61e3bdffc44e4a84669d5e83f5f22e Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Mon, 3 Feb 2020 03:08:51 -0500 Subject: [PATCH] [docs] Slack block, formatting, 'color' CLI option (#5194) Adds a more prominent Slack block on the main doc site in response to a few users not setting the Slack chat links on the Readme or in the "Learn how" block. Fixes a rendering issue in the "Try via NPM" block. Adds a one-liner about the recently added `-Dcolor` option for optionally colorizing output in the CLI. --- docs/usage.md | 4 +- website/i18n/en.json | 50 ++++++++---------- website/pages/en/index.js | 36 +++++++++++-- website/static/css/custom.css | 3 +- .../img/tools/Slack_Mark-256x256-3a29a6b.png | Bin 0 -> 5888 bytes 5 files changed, 60 insertions(+), 33 deletions(-) create mode 100644 website/static/img/tools/Slack_Mark-256x256-3a29a6b.png diff --git a/docs/usage.md b/docs/usage.md index d7fd3092b1d..64277c79660 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -230,7 +230,7 @@ An example bash completion script can be found in the repo at [scripts/openapi-g ## generate -The `generate` command is the workhorse of the generator toolset. As such, it has _many_ more options and the previous commands. The options are abbreviated below, but you may expand the full descriptions. +The `generate` command is the workhorse of the generator toolset. As such, it has _many_ more options and the previous commands. The abbreviated options are below, but you may expand the full descriptions. ```bash @@ -444,6 +444,8 @@ At a minimum, `generate` requires: * `-o` to specify a meaningful output directory (defaults to the current directory!) * `-i` to specify the input OpenAPI document +> **NOTE** You may also pass `-Dcolor` as a system property to colorize terminal outputs. + ### Examples The following examples use [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml). diff --git a/website/i18n/en.json b/website/i18n/en.json index 523607df864..890f1a9d449 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -123,9 +123,6 @@ "title": "Config Options for csharp-netcore", "sidebar_label": "csharp-netcore" }, - "generators/csharp-refactor": { - "title": "generators/csharp-refactor" - }, "generators/csharp": { "title": "Config Options for csharp", "sidebar_label": "csharp" @@ -186,9 +183,6 @@ "title": "Config Options for fsharp-giraffe-server", "sidebar_label": "fsharp-giraffe-server" }, - "generators/fsharp-giraffe": { - "title": "generators/fsharp-giraffe" - }, "generators/go-experimental": { "title": "Config Options for go-experimental", "sidebar_label": "go-experimental" @@ -213,16 +207,10 @@ "title": "Config Options for graphql-schema", "sidebar_label": "graphql-schema" }, - "generators/graphql-server": { - "title": "generators/graphql-server" - }, "generators/groovy": { "title": "Config Options for groovy", "sidebar_label": "groovy" }, - "generators/grpc-schema": { - "title": "generators/grpc-schema" - }, "generators/haskell-http-client": { "title": "Config Options for haskell-http-client", "sidebar_label": "haskell-http-client" @@ -259,6 +247,10 @@ "title": "Config Options for java-undertow-server", "sidebar_label": "java-undertow-server" }, + "generators/java-vertx-web": { + "title": "Config Options for java-vertx-web", + "sidebar_label": "java-vertx-web" + }, "generators/java-vertx": { "title": "Config Options for java-vertx", "sidebar_label": "java-vertx" @@ -335,6 +327,10 @@ "title": "Config Options for lua", "sidebar_label": "lua" }, + "generators/markdown": { + "title": "Config Options for markdown", + "sidebar_label": "markdown" + }, "generators/mysql-schema": { "title": "Config Options for mysql-schema", "sidebar_label": "mysql-schema" @@ -351,16 +347,10 @@ "title": "Config Options for nodejs-server-deprecated", "sidebar_label": "nodejs-server-deprecated" }, - "generators/nodejs-server": { - "title": "generators/nodejs-server" - }, "generators/objc": { "title": "Config Options for objc", "sidebar_label": "objc" }, - "generators/ocaml-client": { - "title": "generators/ocaml-client" - }, "generators/ocaml": { "title": "Config Options for ocaml", "sidebar_label": "ocaml" @@ -389,9 +379,13 @@ "title": "Config Options for php-silex", "sidebar_label": "php-silex" }, - "generators/php-slim": { - "title": "Config Options for php-slim", - "sidebar_label": "php-slim" + "generators/php-slim-deprecated": { + "title": "Config Options for php-slim-deprecated", + "sidebar_label": "php-slim-deprecated" + }, + "generators/php-slim4": { + "title": "Config Options for php-slim4", + "sidebar_label": "php-slim4" }, "generators/php-symfony": { "title": "Config Options for php-symfony", @@ -476,16 +470,10 @@ "title": "Config Options for scala-httpclient-deprecated", "sidebar_label": "scala-httpclient-deprecated" }, - "generators/scala-httpclient": { - "title": "generators/scala-httpclient" - }, "generators/scala-lagom-server": { "title": "Config Options for scala-lagom-server", "sidebar_label": "scala-lagom-server" }, - "generators/scala-play-framework": { - "title": "generators/scala-play-framework" - }, "generators/scala-play-server": { "title": "Config Options for scala-play-server", "sidebar_label": "scala-play-server" @@ -514,6 +502,10 @@ "title": "Config Options for swift4", "sidebar_label": "swift4" }, + "generators/swift5": { + "title": "Config Options for swift5", + "sidebar_label": "swift5" + }, "generators/typescript-angular": { "title": "Config Options for typescript-angular", "sidebar_label": "typescript-angular" @@ -546,6 +538,10 @@ "title": "Config Options for typescript-node", "sidebar_label": "typescript-node" }, + "generators/typescript-redux-query": { + "title": "Config Options for typescript-redux-query", + "sidebar_label": "typescript-redux-query" + }, "generators/typescript-rxjs": { "title": "Config Options for typescript-rxjs", "sidebar_label": "typescript-rxjs" diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 155ebb7b84a..b0d927751f6 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -125,6 +125,28 @@ class Index extends React.Component { ); + const connectContents = stripMargin` + | **Connect** with us on Slack! + | + | We're a very community-oriented project. We have an active community of users, contributors, and core team members on Slack. Slack is often a good + | place to start if you're looking for guidance about where to begin contributing, if you have an idea you're + | not sure fits the project, or if you just want to ask a question or say hello. + | + | Slack is free to [download](https://slack.com/downloads), and our workspace is free to [sign up](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM). + `; + const ConnectOnSlack = () => ( + + {[ + { + content: `${connectContents}`, + image: `${baseUrl}img/tools/Slack_Mark-256x256-3a29a6b.png`, + imageAlign: 'left', + title: 'Active Community', + }, + ]} + + ); + const tryHomebrewContents = stripMargin` | **Install** via [homebrew](https://brew.sh/): | @@ -162,6 +184,8 @@ class Index extends React.Component { | -g go \\ | -o /local/out/go | \`\`\` + | + | For a full list of our docker images, check out [u/openapitools](https://hub.docker.com/u/openapitools) on Docker Hub. `; const TryOutDocker = () => ( @@ -179,7 +203,9 @@ class Index extends React.Component { const tryNpmContents = stripMargin` | The [NPM package wrapper](https://github.com/openapitools/openapi-generator-cli) is cross-platform wrapper around the .jar artifact. | **Install** globally, exposing the CLI on the command line: + | | + | | \`\`\`bash | # install the latest version of "openapi-generator-cli" | npm install @openapitools/openapi-generator-cli -g @@ -190,7 +216,8 @@ class Index extends React.Component { | # Or install it as dev-dependency in your node.js projects | npm install @openapitools/openapi-generator-cli -D | \`\`\` - | + | + | | | Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc: | \`\`\`bash @@ -229,17 +256,17 @@ class Index extends React.Component { {[ { - content: 'OpenAPI Generator supports many different integrations and use cases, including (but not limited to):\n\n' + + content: 'OpenAPI Generator supports many different integrations and use cases, including (but not limited to):\n' + '* Maven Plugin\n' + '* Gradle Plugin\n' + + '* Bazel Plugin\n' + '* CLI via Homebrew\n' + '* CLI via Docker\n' + '* CLI via npm\n' + '* Generator SaaS\n\n' + 'For details, see [Workflow Integrations](' + this.docUrl('integrations.html', this.props.language) + ')\n\n' + 'Generation also allows for easy customization via options, custom templates, or even custom generators on your classpath. ' + - 'See [Customization](' + this.docUrl('customization.html', this.props.language) + ') for details.\n\n' + - 'As a very community-oriented project, the core team is also active on the project\'s [Slack Workspace](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM).', + 'See [Customization](' + this.docUrl('customization.html', this.props.language) + ') for details.', image: `${baseUrl}img/color-logo.svg`, imageAlign: 'right', title: 'Learn How', @@ -358,6 +385,7 @@ class Index extends React.Component { {/**/} + diff --git a/website/static/css/custom.css b/website/static/css/custom.css index a0cef22cea8..2fcf0896ecf 100755 --- a/website/static/css/custom.css +++ b/website/static/css/custom.css @@ -64,7 +64,8 @@ dd { #try .blockImage, #tryHomebrew .blockImage, -#tryDocker .blockImage { +#tryDocker .blockImage, +#connectOnSlack .blockImage { margin-top: auto; margin-bottom: auto; } diff --git a/website/static/img/tools/Slack_Mark-256x256-3a29a6b.png b/website/static/img/tools/Slack_Mark-256x256-3a29a6b.png new file mode 100644 index 0000000000000000000000000000000000000000..188ebb90ee056a0cabdd8afd83812df7045e4eba GIT binary patch literal 5888 zcmaht2{e>#+s_PR8Dkq`Y-351WiT>o>`R2QlctcF@fKRCFeIL_uY>YtQuZ=!YNTZf z8SChyD5d(^FcBq7DukKu@xFcEf6o7Z=lti)edd0y``Yg7zVB>``Y|^;`hka^?uOa zQiVOc!Gw+r!!1uW*#2#*s+QX|{<=1Lqom;y>{9Yl9j>0<2vWAH!yxtVzW}fp@ zGG_nCHSD`6_q!Kb>qTbRa_ooyd8>)uWl_j=?A)bVs9H{^!y zVnhM z@S{OAI#8NI3ToFqa&_>wX^4{ilf9S;#a8^tZ92%nQ4l)t^B-;vHm4RP&zUrfu?9becQVZ zD5=7Z7r%KX#j7V2KCgZrRqhER!Mq5CeQr+3(pF%eqV+mMseI@W2F#;WBxt%C3X@u2 zQY!AhTEkpi*Jp8%fbXiDYLXZ~r)^b##t={@^gpNmfrP2%ShFIGF04^*XGLrd4}?G& zUWEQY>ou%}lj`6%4BVIbn9y%KyrxK>FMt8OK8Rlg3;^>B@aPJ770?-ve^a4d{+6;E&v14y&bm;1)A{x7w4iwga?2;+g8wQZe```8$a4!J8f+e%lM zp=g|5qr5rk=d@)it6vb}*|GI(j6TSn=WluN-AUS;=eoGg$TvswV_081F-ekLi#t_3YXcww5pH>u zfJ>W?7MpHgz1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