Skip to content

Commit ce951ab

Browse files
some doc updates
1 parent 5a203fb commit ce951ab

File tree

3 files changed

+67
-73
lines changed

3 files changed

+67
-73
lines changed

README.md

Lines changed: 33 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,41 @@
11
![header](./assets/header.png)
22

3-
* [Why](#why)
4-
* [Leo](#leo)
5-
- [Data](#data)
6-
- [Templates](#templates)
7-
- [Routing](#routing)
8-
- [Quick Start](#quick-start)
3+
# LEO
4+
5+
LEO is a library for creating Content Based Site Generators with a
6+
common GraphQL data layer. Typically, one would use a LEO generator to
7+
build static sites from Single Page Applications. This is a different
8+
approach to generators such as Jekyll and Hugo which use template
9+
languages. See the
10+
[Comparison to Other Generators](docs/comparison-to-other-generators.md).
11+
12+
You may want to choose a pre-built generator such as React/Apollo from the
13+
[Quick Start](#quick-start) section.
14+
15+
* [Why](#why-leo)
16+
- [GraphQL Data Layer](docs/graphql-data-layer)
17+
- Use any UI tech (React, Glamor, Inferno, etc)
18+
- Highly Extensible
19+
- Structured Content Types (Markdown, Blogpost, Contentful)
20+
- Reuse Component Libraries Across Client Projects
921
* [More Docs](docs)
1022
- [Technical Overview](docs/technical-overview.md)
1123
- [Plugins](docs/plugins.md)
1224
- [Developing](docs/developing.md)
1325

14-
# Why LEO?
15-
16-
LEO is a library for creating Static Site Generators with a common
17-
GraphQL data layer. Typically, one would use a LEO generator to build
18-
static sites from Single Page Applications. This is a different
19-
approach to generators such as Jekyll and Hugo which use template
20-
languages. See the [Comparison to Other Generators]().
21-
22-
You may want to choose a pre-built generator such as React from the
23-
[Quick Start]() section.
24-
25-
<h4 align="center">Data</h4>
26-
27-
Data in LEO is exposed through a composable, extensible GraphQL
28-
Schema defining Content Types. It can be queried with any valid
29-
GraphQL client (such as
30-
[Apollo](https://github.com/apollostack/apollo-client) or
31-
[GraphiQL]() for development).
32-
33-
```javascript
34-
query BlogPostPage {
35-
post(slug: $slug) {
36-
attributes { title, date, timeToRead }
37-
body
38-
}
39-
}
40-
```
41-
4226
# Why Leo?
4327

44-
* [GraphQL Data Layer](docs/graphql-data-layer)
45-
* Use any UI tech (React, Glamor, Inferno, etc)
46-
* Webpack based extensibility
47-
* Structured Content Types (Markdown, Blogpost, Contentful)
48-
* Reuse Component Libraries Across Client Projects
28+
LEO can turn a Universal application into a Progressive Web App. This
29+
means you can reuse your Single Page Application skills to build
30+
advanced static sites. LEO's data processing is coordinated by webpack
31+
and exposed via GraphQL, which offers rich introspection
32+
capability. An example of this is using Apollo Dev Tools or GraphiQL
33+
to explore the data used to build a static site, then copying queries
34+
out into application code when satisfied. Finally, LEO doesn't
35+
restrict your ability to use the latest and greatest UI tooling. From
36+
Babel to TypeScript, React to Inferno, PostCSS to Glamor, and Apollo
37+
to Relay, LEO lets you use the tooling that makes you most productive
38+
through reusable plugins.
4939

5040
## Optional Modern Client-Side JS
5141

@@ -78,35 +68,9 @@ cd leo-blog-starter && npm i
7868

7969
## Deployment
8070

81-
Leo can deploy to [surge.sh](http://surge.sh/), [GitHub
82-
Pages](https://pages.github.com/) and anywhere else using [deployment
83-
plugins](#deployment).
84-
85-
# Themes
86-
87-
Themes are bundles of React Components and Content Types. For example,
88-
a Theme can provide the Components required to render various forms of
89-
BlogPosts (individual view, generic list view, archive view, etc).
90-
91-
Themes can depend on multiple Content Types. This makes it possible to
92-
scale a theme from a single Blog Post to an entire site (including
93-
aggregate pages, such as a landing page).
94-
95-
# Developing Leo
96-
97-
Leo is [lerna-based](https://github.com/lerna/lerna).
98-
99-
## Deploying
100-
101-
Ideally, this would run off of
102-
[lerna-semantic-release](https://github.com/atlassian/lerna-semantic-release). Until
103-
then, here are the commands to run to deploy new lerna versions.
104-
105-
```
106-
./node_modules/.bin/lerna bootstrap
107-
./node_modules/.bin/lerna run dist
108-
./node_modules/.bin/lerna deploy
109-
```
71+
LEO renders to a static folder of files and can be deployed to GitHub
72+
Pages, [Netlify](https://www.netlify.com/), or any other hosting
73+
service.
11074

11175
[react]: https://facebook.github.io/react/
112-
[react-router]: https://github.com/reactjs/react-router
76+
[react-router]: https://github.com/ReactTraining/react-router
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Comparison to Other Generators
2+
3+
# Jekyll
4+
5+
# Gatsby
6+

docs/graphql-data-layer.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,39 @@
11
# GraphQL Data Layer
22

33
LEO boasts a composable GraphQL data layer which can be reused with
4-
any scaffolding. The data layer consists of
5-
[Content Types](#content-types), [post processing](#post-processing)
6-
and [querying](#querying).
4+
any scaffolding. That is to say, switching from React to Preact or
5+
Inferno won't make you rewrite that nice medium-style Blog Post
6+
content type with computed time-to-read metrics. The data layer
7+
consists of [Content Types](#content-types),
8+
[post processing](#post-processing) and [querying](#querying).
79

10+
It can be queried with any valid
11+
GraphQL client (such as
12+
[Apollo](https://github.com/apollostack/apollo-client) or
13+
[GraphiQL]() for development).
814
## Content Types
915

1016
Content Types are the fundamental units of data when working with LEO
11-
based sites.
17+
based sites. They are exposed through GraphQL schemas which yield
18+
introspection capabilities.
1219

1320
## Post Processing
1421

22+
Local data can be post-processed to enable archives, category pages,
23+
and RSS Feeds.
24+
1525
## Querying
26+
27+
<h4 align="center">Data</h4>
28+
29+
Data in LEO is exposed through a composable, extensible GraphQL
30+
Schema defining Content Types.
31+
32+
```javascript
33+
query BlogPostPage {
34+
post(slug: $slug) {
35+
attributes { title, date, timeToRead }
36+
body
37+
}
38+
}
39+
```

0 commit comments

Comments
 (0)