From 6913e80e43eaa3abd7e8ac768d78ede8c5eb50a2 Mon Sep 17 00:00:00 2001 From: Ariel Mashraki Date: Tue, 3 Sep 2019 07:55:10 -0700 Subject: [PATCH] ent/doc: minor changes for doc websote and readme Reviewed By: dlvhdr Differential Revision: D17163026 fbshipit-source-id: 62536da9a450ac80eb224252e12ae8dc835acb11 --- README.md | 26 +++++++++++++++++++-- doc/md/getting-started.md | 10 ++++---- doc/md/schema-def.md | 2 +- doc/website/core/Footer.js | 2 +- doc/website/pages/en/index.js | 4 +++- doc/website/static/css/custom.css | 1 + doc/website/static/js/code-block-buttons.js | 2 +- 7 files changed, 36 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f736b57a5..fdaca26f5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,27 @@ -## Ent +## ent - An Entity Framework For Go + + + +Simple, yet powerful ORM for modeling and querying data. + +- **Schema As Code** - model any graph schema as Go objects. +- **Easily Traverse Any Graph** - run queries, aggregations and traverse any graph structure easily. +- **Statically Typed And Explicit API** - 100% statically typed and explicit API using code generation. +- **Multi Storage Driver** - supports MySQL, SQLite and Gremlin. + +## Installation +```console +go get github.com/facebookincubator/ent/entc/cmd/entc +``` + +## Docs +The documentation for developing and using ent is avaliable at: https://entgo.io + +## Join the ent Community +See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out. ## License - ent is licensed under Apache 2.0 as found in the LICENSE file. diff --git a/doc/md/getting-started.md b/doc/md/getting-started.md index 37384c7ec..8d92c637b 100755 --- a/doc/md/getting-started.md +++ b/doc/md/getting-started.md @@ -17,7 +17,7 @@ sidebar_label: Quick Introduction ## Installation ```console -$ go get github.com/facebookincubator/ent/entc/cmd/entc +go get github.com/facebookincubator/ent/entc/cmd/entc ``` After installing `entc` (the code generator for `ent`), you should have it in your `PATH`. @@ -27,7 +27,7 @@ After installing `entc` (the code generator for `ent`), you should have it in yo Go to the root directory of your project, and run: ```console -$ entc init User +entc init User ``` The command above will generate the schema for `User` under `/ent/schema/` directory: @@ -80,7 +80,7 @@ func (User) Fields() []ent.Field { Run `entc generate` from the root directory of the project: ```go -$ entc generate ./ent/schema +entc generate ./ent/schema ``` This produces the following files: @@ -197,7 +197,7 @@ Let's create 2 additional entities named `Car` and `Group` with a few fields. We to generate the initial schemas: ```console -$ entc init Car Group +entc init Car Group ``` And then we add the rest of the fields manually: @@ -440,7 +440,7 @@ relationship named `groups`. Let's define this relationship in our schemas: We run `entc` on the schema directory to re-generate the assets. ```cosole -$ entc generate ./ent/schema +entc generate ./ent/schema ``` ## Run Your First Graph Traversal diff --git a/doc/md/schema-def.md b/doc/md/schema-def.md index 744fb94f6..18fdb9085 100755 --- a/doc/md/schema-def.md +++ b/doc/md/schema-def.md @@ -56,7 +56,7 @@ Entity schemas are usually stored inside `ent/schema` directory under the root directory of your project, and can be generated by `entc` as follows: ```console -$ entc init User Group +entc init User Group ``` ## It's Just Another ORM diff --git a/doc/website/core/Footer.js b/doc/website/core/Footer.js index 0e7241fbc..aa74001dc 100755 --- a/doc/website/core/Footer.js +++ b/doc/website/core/Footer.js @@ -59,7 +59,7 @@ class Footer extends React.Component {

- The homepage was designed by Moriah Rich. + Design by Moriah Rich, illustration by Ariel Mashraki. diff --git a/doc/website/pages/en/index.js b/doc/website/pages/en/index.js index b4c0e5a08..4ff61c128 100755 --- a/doc/website/pages/en/index.js +++ b/doc/website/pages/en/index.js @@ -20,7 +20,9 @@ const arrow = '\u2192'; const Block = props => (
-
{props.title}
{' '} + +
{props.title}
{' '} +
{arrow}
{props.content}
diff --git a/doc/website/static/css/custom.css b/doc/website/static/css/custom.css index 4a2764c02..46007e7ed 100755 --- a/doc/website/static/css/custom.css +++ b/doc/website/static/css/custom.css @@ -583,6 +583,7 @@ ol { } .blockTitleText { display: inline; + color: #ffe800; } .nav-footer .sitemap { diff --git a/doc/website/static/js/code-block-buttons.js b/doc/website/static/js/code-block-buttons.js index d02ade196..1c4d32c24 100644 --- a/doc/website/static/js/code-block-buttons.js +++ b/doc/website/static/js/code-block-buttons.js @@ -33,7 +33,7 @@ window.addEventListener('load', function() { const clipboard = new ClipboardJS('.btnClipboard', { target: function(trigger) { return trigger.parentNode.querySelector('code'); - }, +}, }); clipboard.on('success', function(event) {