Skip to content

Commit

Permalink
docs(docsWeb): improve documentation readability (#957)
Browse files Browse the repository at this point in the history
  • Loading branch information
lagatchell committed Sep 25, 2020
1 parent 4367831 commit 36fd93d
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion docs/Reference/command-line-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ npx scully --pluginsError=false
```

Show the error from the plugin, but continue rendering.
If you do not use the flag (by default is true) when you have an error into any plugin, the scully's run exit.
If you do not use the flag (true by default) when you have an error in any plugin, Scully will exit.
2 changes: 1 addition & 1 deletion docs/Reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ For example, if you add `image` and `font`, all requests to images and fonts loa

#### handle404

How routes which are **not**provided in the application are handled by the Scully server.
How routes which are **not** provided in the application are handled by the Scully server.
When the server gets a request for a route (file) that does not exist on the file-system, this option amends how that route is handled.

| option | result |
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/ngLib/idle-monitor-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If your content is loaded out of sight of zones, Scully scrapes the page before

## Adding Custom Mechanisms

To disable Scully ready mechanism and add a custom mechanism, put following config object in the `forRoot` config:
To disable Scully's ready mechanism and add a custom mechanism, put following config object in the `forRoot` config:

```typescript
ScullyLibModule.forRoot({
Expand All @@ -48,7 +48,7 @@ export class ManualIdleComponent implements OnInit {
}
```

To enable this for single route, provide `manualIdle: true` inside the `config.ts` file in the route configuration:
To enable this for a single route, provide `manualIdle: true` inside the `config.ts` file in the route configuration:

```typescript
// scully.config.ts
Expand Down
2 changes: 1 addition & 1 deletion docs/Reference/ngLib/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ position: 100

# Scully library features

When you install Scully using the our `ng add` schematics, our Angular library will get installed also.
When you install Scully using the `ng add` schematics, our Angular library will also be installed.
The library has some intergration features that enable you to utilize the full potential of Scully.

- [Idle-monitor](/docs/Reference/ngLib/idle-monitor-service.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/Reference/ngLib/transfer-state-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ position: 100

## Overview

The [`TransferStateService`](https://github.com/scullyio/scully/blob/main/libs/ng-lib/src/lib/transfer-state/transfer-state.service.ts) allows to transfer an Angular application's state into the static site rendered by Scully.
The [`TransferStateService`](https://github.com/scullyio/scully/blob/main/libs/ng-lib/src/lib/transfer-state/transfer-state.service.ts) allows the transfer of an Angular application's state into the static site rendered by Scully.

More over, it allows you to load the state on subsequent route changes after the initial page has been loaded.

Expand Down
2 changes: 1 addition & 1 deletion docs/Reference/ngLib/utility-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ This method returns `true` or `false` if the Scully build is currently running.

#### `isScullyGenerated():` _`boolean`_

This method returns `true` if the Scully build has run. This means your application is booted from a scully generated `index.html`.
This method returns `true` if the Scully build has run. This means your application is booted from a Scully generated `index.html`.
2 changes: 1 addition & 1 deletion docs/Reference/plugins/built-in-plugins/md.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Adds capability to render markdown files as html. It also ships with a compact v

## Usage

In the application's scully.your-app.config.file:
In the application's `scully.your-app.config.file`:

1. Enable the highlight option by adding the following:

Expand Down
8 changes: 4 additions & 4 deletions docs/Reference/plugins/built-in-plugins/router-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ position: 100

## Overview

Scully by default use puppeteer to render the router pages.
With this type of plugin, you can render with your custom/other render the URL.
Scully by default uses puppeteer to render the router pages.
With this type of plugin, you can custom render the URL.

For use the `router-render` you need to add in your app config the routes and send the data.
To use the `router-render` you need to add in your app config the routes and send the data.

`scully.{{your_app}}.config.ts`

Expand Down Expand Up @@ -40,4 +40,4 @@ registerPlugin('router', 'pluginHandler', (url, options) => {
});
```
In this case, Scully will try to render this URL with `PageOptimizer` plugin, if get any problem for render with the plugin, Scully will retry with the puppeteer.
In this case, Scully will try to render this URL with `PageOptimizer` plugin, if there is a problem running the plugin, Scully will retry with puppeteer.
14 changes: 7 additions & 7 deletions docs/Reference/schematics/create-blog-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ lang: en
position: 100
---

# create blog config
# Create blog config

Scully have schematics for create your own blog in one command:
Scully provides schematics for creating your own blog in one command:

```bash
ng g @scullyio/init:blog
```

This will create all the files and change what you need for have your own blog running
in your Angular application and Scully's config.
This will create all the files and change what you need to have your own blog running
in your Angular application with Scully's config.

```bash
ng g @scullyio/init:blog
Expand All @@ -31,7 +31,7 @@ CREATE src/app/blog/blog.module.ts (380 bytes)
CREATE blog/2020-09-17-blog.md (97 bytes)
```

Scully add the support for Markdown files and now your config file is like:
Scully will add support for Markdown files and update your config file to the following:

```typescript
routes: {
Expand All @@ -45,5 +45,5 @@ Scully add the support for Markdown files and now your config file is like:
Where the type `contentFolder` is the plugin for support read the MD files.
And the config for slug is the folder where you will create the files for each route and blog you will have.
If you need change the folder, just modify the `"./blog"` value, remember Scully will read
from the root of your application this route.
If you need to change the folder, just modify the `"./blog"` value, remember Scully will read
this route from your application's root.
20 changes: 10 additions & 10 deletions docs/Reference/schematics/create-markdown-files-and-skeleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ lang: en
position: 100
---

# create markdown files and skeleton
# Create markdown files and skeleton

Scully have schematics for add the plugin for read markdown files and create a url for each of them.
Scully provides a schematic for adding the plugin needed to read markdown files and create a url for each of them.

```bash
ng g @scullyio/init:markdown
```

This will ask you for complete the config and create/update the files for have
your Markdown skeleton supported in your angular app and create the Scully config
in example:
This will ask you to complete the config and create/update the files needed to support Markdown skeleton
in your angular app.
Example:

```bash
ng g @scullyio/init:markdown
Expand All @@ -38,17 +38,17 @@ CREATE my-markdown-folder/2020-09-17-my-markdown.md (111 bytes)

###### What name do you want to use for the module?

This is the name for create your angular module.
This is the name used to create your angular module.

###### What slug do you want for the markdown file?

This is the slug Scully add in the Angular router
This is the slug Scully uses in the Angular router.

###### Where do you want to store your markdown files?

Scully need store the markdown files in a folder, so the schematics create the folder
and add into the scully config the path.
Scully needs to store the markdown files in a folder, so the schematics create the folder
and adds the path to the scully config.

###### Under which route do you want your files to be requested?

This is the route Scully add in the Angular router
This is the route Scully adds in the Angular router.
10 changes: 5 additions & 5 deletions docs/Reference/schematics/create-scully-files-with-ng-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ lang: en
position: 100
---

# create scully files with ng add
# Create scully files with ng add

Scully have a schematics for create and modify an Existing Angular project.
Scully provides a schematic for creating and modifying an existing Angular project.

This Schematics, create and run all your angular app need for support Scully.
This schematic, creates and runs everything your angular app needs to support Scully.

For angular cli workspaces:
For Angular cli workspaces:

```bash
ng add @scully/init
```

For angular NX project:
For Angular NX project:

```bash
ng add @scully/init --project=<PROJECT-NAME>
Expand Down
6 changes: 3 additions & 3 deletions docs/Reference/schematics/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ position: 100

# Schematics overview

Scully comes with a number of schematics for support the integration with your angular app.
Scully comes with a number of schematics to support the integration with your Angular app.

[Install scully in your angular app](/docs/Reference/schematics/create-scully-files-with-ng-add.md).
[Install Scully in your Angular app](/docs/Reference/schematics/create-scully-files-with-ng-add.md).
[Create a blog](/docs/Reference/schematics/create-blog-config.md).
[Create markdown sckeleton](/docs/Reference/schematics/create-markdown-files-and-skeleton.md).
[Create markdown skeleton](/docs/Reference/schematics/create-markdown-files-and-skeleton.md).
4 changes: 2 additions & 2 deletions docs/concepts/handled-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Handled Routes

# Handled routes

When we take an [unhandled route](/docs/concepts/unhandled-routes.md), and run that through a [router plugins](/docs/Reference/plugins/types/router.md), on the other end should come out a handled route. This means a plugin would get a route like this:
When we take an [unhandled route](/docs/concepts/unhandled-routes.md), and run that through a [router plugin](/docs/Reference/plugins/types/router.md), on the other end should come out a handled route. This means a plugin would get a route like this:

```html
/user/:id
Expand Down Expand Up @@ -35,7 +35,7 @@ const handledRoutes:HandledRoute[] = [

We will take those routes, and add the `config` and `rawRoute` for each of them.

> **_note:_** All unhandled routes are being fed to a routerPlugin, even the ones that have no config. Those are handled by the default RouterPlugin
> **_Note:_** All unhandled routes are being fed to a routerPlugin, even the ones that have no config. Those are handled by the default RouterPlugin
## The handled route interface

Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is a high-level overview about plugins. For details see the [plugin section

## About plugins.

To bea ble to expand and adapt to all current workloads and application we have an extended plugin system in Scully. This makes it possible to adapt to _any_ kind of workload.
To be able to expand and adapt to all current workloads and application we have an extended plugin system in Scully. This makes it possible to adapt to _any_ kind of workload.

There are now 7 different kind of plugins in Scully. All adhere to the same basic interface:

Expand All @@ -21,4 +21,4 @@ interface plugin {
}
```

This means a plugin is always a function that returns a promise, or an async function. If a plugin throws an error, or returns a canceled promise, scully will log an error/warning to screen and stops all executing. (unless there is a setting in the configuration that allows it to ignore and contigue)
This means a plugin is always a function that returns a promise, or an async function. If a plugin throws an error, or returns a canceled promise, Scully will log an error/warning to screen and stops all executing. (unless there is a setting in the configuration that allows it to ignore and continue)
8 changes: 4 additions & 4 deletions docs/concepts/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Scully is designed to take an app, analyze it, and then write out all the static
## The process

1. Traverse, read the source of the application to find all routes.
2. Merge in [extraRoutes](/docs/Reference/config#extraroutes-string--string--promisestring--string), where we specify routes we know, but cant automatically traverse
2. Merge in [extraRoutes](/docs/Reference/config#extraroutes-string--string--promisestring--string), where we specify routes we know, but can't automatically traverse
3. We now have a list of [unhandled routes]
4. Enrich/expand the found [unhandled routes] routes with router-plugins.
5. Process/change the resulting [handled routes] list with routeProcess plugins.
Expand All @@ -31,9 +31,9 @@ For each [handled route] take the following steps:

1. (optional) Run the preRender function (can be provided in the config for this route), stop processing when `false` is returned. This function might add data to the [handled route], or even change the plugins used. Please note that the route will still be present in the `scully.routes.json` file.
2. Determine if there is a special [renderPlugin](/docs/Reference/plugins/types/render.md)
3. Use the render plugin form step 2 to return the HTML for the given [handled route]
3. Use the render plugin from step 2 to return the HTML for the given [handled route]
4. Take the resulting HTML, and invoke all the render plugins for this route in the given order. Each plugin receives an HTML string, and the handledRoute and returns an HTML string.
5. use the `WriteToStorage` plugin to store the result on local FS. The `WriteToStorage` plugin translates the route.route to a file location. If the content has `transferState` inside, it will extract this, and save it along the `index.html` as `data.json` in the designated location for this route.
5. Use the `WriteToStorage` plugin to store the result on local FS. The `WriteToStorage` plugin translates the route.route to a file location. If the content has `transferState` inside, it will extract this, and save it along the `index.html` as `data.json` in the designated location for this route.

## The render plugin

Expand All @@ -43,7 +43,7 @@ By default Scully will use the puppeteerRender plugin. This plugin can by replac

This section describes how Scully currently works through the list. Its a bit of a higher-level description, and doesn’t go into much detail.
When started, Scully will compile and load the config file and all the TS files in the plugins (normally `./scully`). Then Scully will check for the server to be active. If not it starts a background server that will host the existing distribution files in a separate process. It will also start puppeteer in a different process so that it can warm up.
Then it will start all the tasks listed in SIngle application tasks. When it reaches the render task, it will take the list of routes, and run each of it through the render pipeline. After the render pipeline, it will use the writeTostorage plugin to store the final result. It will use all cores (unless limited by settings) to parallelize this task.
Then it will start all the tasks listed in Single application tasks. When it reaches the render task, it will take the list of routes, and run each of it through the render pipeline. After the render pipeline, it will use the writeTostorage plugin to store the final result. It will use all cores (unless limited by settings) to parallelize this task.

[unhandled routes]: /docs/concepts/unhandled-routes
[handled routes]: /docs/concepts/handled-routes
10 changes: 5 additions & 5 deletions docs/concepts/unhandled-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: Unhandled Routes

## overview

in this section we will go over what is meant by `unhandled routes` in Scully.
In this section we will go over what is meant by `unhandled routes` in Scully.

## Unhandled route

Expand Down Expand Up @@ -60,9 +60,9 @@ Our friendly traversal will figure out that means we have those unhandled routes

and will add all of those to the unhandled route array.

> **note**: those routes have dynamic data (`:id`, `:friendCode` and `:postId`) and will be skipped if we do _not_ define a config for them in the [config file routes] property. This means there will be NO STATIC FILES for ROUTES which HAVE DYNAMIC DATA but NO CONFIG
> **Note**: those routes have dynamic data (`:id`, `:friendCode` and `:postId`) and will be skipped if we do _not_ define a config for them in the [config file routes] property. This means there will be NO STATIC FILES for ROUTES which HAVE DYNAMIC DATA but NO CONFIG
# extra routes
# Extra routes

There will be times that your application is able to handle routes that are not defined in the router, or in such a way that it can't be automatically traversed. For example, because you are using a route matcher, or you are using ng-Upgrade, and part of the routes is still handled by your AngularJS part of the application. Or you are using Scully on an application thats is not utilizing Angular.
For this we have provisioned the `extraRoutes` property in the config.
Expand All @@ -75,7 +75,7 @@ export interface ScullyConfig {
}
```

As it takes also a promise, it means that you can use an async function to fetch a list of routes from disk, or an external API
As it also takes a promise, it means that you can use an async function to fetch a list of routes from disk, or an external API

```typescript
const config:ScullyConfig = {
Expand All @@ -85,6 +85,6 @@ const config:ScullyConfig = {
}
```

This will result in a valid list of paths to render. At least when your cleanup function is making sure the result ends in paths that you do actually provide in your application.
This will result in a valid list of paths to render. At least when your cleanup function is making sure the result ends in paths that you have actually provided in your application.

[config file routes]: /docs/Reference/config#routes-routeconfig
2 changes: 1 addition & 1 deletion docs/learn/create-a-blog/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ position: 20

# Creating a blog

Start of with [adding blog support](/docs/learn/create-a-blog/add-blog-support.md). After that, you might want to find out how to [add a new post](/docs/learn/create-a-blog/generate-new-blog-posts.md), or how to [use blog post meta-data](/docs/learn/create-a-blog/use-blog-post-data-in-template.md).
Start off with [adding blog support](/docs/learn/create-a-blog/add-blog-support.md). After that, you might want to find out how to [add a new post](/docs/learn/create-a-blog/generate-new-blog-posts.md), or how to [use blog post meta-data](/docs/learn/create-a-blog/use-blog-post-data-in-template.md).
2 changes: 1 addition & 1 deletion docs/learn/getting-started/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ title: Getting started

# Getting Started

First should check if your app meets the [minimal requirements](/docs/learn/getting-started/requirements). When you are done with that, over to [the installation](/docs/learn/getting-started/installation)
First check if your app meets the [minimal requirements](/docs/learn/getting-started/requirements). When you are done with that, head over to [the installation](/docs/learn/getting-started/installation)
2 changes: 1 addition & 1 deletion docs/learn/getting-started/tips-for-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ position: 100

### ng build

`ng build` is _only_ needed when you did change anything in your angular app.
`ng build` is _only_ needed when you modified something in your angular app.
The scully config file, plugins, and eventual markdown files are not part of your Angular app.
Although this may seem evident, if this is your first time using Scully it is easy to rebuild Angular even if it is not needed. When writing Scully plugins OR modifying your blog's markdown files, you DO NOT need to `ng build` the app each time you re-run Scully. Again, `ng build` Angular only if the Angular app changes.

Expand Down

0 comments on commit 36fd93d

Please sign in to comment.