Skip to content

Commit

Permalink
Merge pull request #162 from 64J0/fix-typo-docs
Browse files Browse the repository at this point in the history
Fix typos in docs
  • Loading branch information
MangelMaxime committed Feb 10, 2022
2 parents dbba95b + 8bea200 commit bccf06f
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 37 deletions.
10 changes: 5 additions & 5 deletions docs/nacara/advanced/custom-layout-fsharp.md
Expand Up @@ -92,16 +92,16 @@ exportDefault

<li>

Compile you project to JavaScript using Fable
Compile your project to JavaScript using Fable.

If you don't already have Fable installed in your project you need to install it
If you don't have Fable installed in your project you need to install it:

```
dotnet new tool-manifest
dotnet tool install fable
```

Launch the compilation
Launch the compilation:

```sh
dotnet fable --outDir dist --watch
Expand Down Expand Up @@ -130,9 +130,9 @@ Register your layout in the `nacara.config.json`
:::info
You can find type documentation in the API section.

Here are the most important one when working with custom layouts:
Here are the most important topics when working with custom layouts:

- [RendererContext](/Nacara/reference/Nacara.Core/nacara-core-types-renderercontext.html) : Context accessible when rendering a page.
- [PageContext](/Nacara/reference/Nacara.Core/nacara-core-types-pagecontext.html) : Represents the context of a page within Nacara.
- [LayoutInfo](/Nacara/reference/Nacara.Core/nacara-core-types-layoutinfo.html) : Exposed contract of a layout
- [LayoutInfo](/Nacara/reference/Nacara.Core/nacara-core-types-layoutinfo.html) : Exposed contract of a layout.
:::
22 changes: 11 additions & 11 deletions docs/nacara/advanced/custom-layout-js.md
Expand Up @@ -4,15 +4,15 @@ layout: standard
---

:::primary{title="Note"}
Creating a layout via JavaScript is the quickest way to extends Nacara because you just need a `.js` or `.jsx` file.
Creating a layout via JavaScript is the quickest way to extend Nacara because you just need a `.js` or `.jsx` file.

However, for complex layout or creating a layout package, you should prefer F# because it will have all the types definition and helpers available for you via the nuget `Nacara.Core`
:::

## Setup Babel for JSX support

:::info
If you used the template to set up Nacara, you can skip this step and go to [Blog page layout](#Blog-page-layout)
If you used the template to set up Nacara, you can skip this step and go to [Blog page layout](#blog-page-layout)
:::

<ul class="textual-steps">
Expand Down Expand Up @@ -115,11 +115,11 @@ You can learn more about the API by going to the API section.

The API is documented from F# but the properties available are the same in JavaScript.

Here are the most important one when working with custom layouts:
Here are the most important topics when working with custom layouts:

- [RendererContext](/Nacara/reference/Nacara.Core/nacara-core-types-renderercontext.html) : Context accessible when rendering a page.
- [PageContext](/Nacara/reference/Nacara.Core/nacara-core-types-pagecontext.html) : Represents the context of a page within Nacara.
- [LayoutInfo](/Nacara/reference/Nacara.Core/nacara-core-types-layoutinfo.html) : Exposed contract of a layout
- [LayoutInfo](/Nacara/reference/Nacara.Core/nacara-core-types-layoutinfo.html) : Exposed contract of a layout.
:::


Expand Down Expand Up @@ -151,17 +151,17 @@ date: 2021-08-20

<li>

In the previous, step we set the layout property to `blog-page`.
In the previous step we set the layout property to `blog-page`.

In order order to avoid error like:
In order to avoid errors like:

> Layout renderer 'blog-page' is unknown
We need to register our layout into our Nacara config.

Add `./layouts/blog-page.jsx` to the list of `layouts` in `nacara.config.js`.

You should have something like that:
You should have something like this:

```js
export default {
Expand All @@ -177,7 +177,7 @@ export default {

<li>

We now need to update our `blog-page.jsx` script to use the new information.
Now we need to update our `blog-page.jsx` script to use the new information.

Replace your `render` function with this code:

Expand Down Expand Up @@ -332,7 +332,7 @@ layout: blog-index
---
```

As you can see, we are only specifying the layout to use because this page page will be fully generated.
As you can see, we are only specifying the layout to use because this page will be fully generated.

</li>

Expand All @@ -342,7 +342,7 @@ Now, we want to modify our render function to generate the index page.

To do that, we are going to:

1. To retrieve the list of `blog-page`
1. Retrieve the list of `blog-page`
1. Sort the page per date
1. Extract the information we want from the page information, for example the title, date
1. Render the list of blog pages
Expand Down Expand Up @@ -432,7 +432,7 @@ const render = async (rendererContext, pageContext) => {

## Working with async functions

Because, the markdown parser use an `async` function it can happens that you end up with this scenario.
Because, the markdown parser use an `async` function it can happen that you end up with this scenario.

```js
const Abstract = async ({rendererContext, blogPage}) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/nacara/advanced/layout-from-scratch.md
Expand Up @@ -9,4 +9,4 @@ You can use both **F#** and **JavaScript** to do so.

In general, you should prefer **JavaScript** when adapting an existing layout as it is easier to **interop with the NPM packages**.

If you want to write a complex layout, you should prefer **F#** as it Nacara comes with `Nacara.Core` nuget, which includes all the **types definition** and some **helpers**.
If you want to write a complex layout, you should prefer **F#** as Nacara comes with `Nacara.Core` nuget, which includes all the **types definition** and some **helpers**.
4 changes: 2 additions & 2 deletions docs/nacara/cli-usage.md
Expand Up @@ -5,7 +5,7 @@ layout: standard

## Usage

Nacara has several commands availables.
Nacara has several commands available.

Here is a list of the commands and their usage:

Expand Down Expand Up @@ -36,7 +36,7 @@ It is important that you place your command **between** quotes or singles quotes

## Watcher improvements

If you see an error about too `EMFILE: too many open files`, you can trying setting the `CHOKIDAR_USEPOLLING` environment variable to `true`.
If you see an error like `EMFILE: too many open files`, you can try setting the `CHOKIDAR_USEPOLLING` environment variable to `true`.

Example: `CHOKIDAR_USEPOLLING=true nacara watch`

Expand Down
6 changes: 3 additions & 3 deletions docs/nacara/configuration.md
Expand Up @@ -45,7 +45,7 @@ It not here is a minimal configuration file:

## Configuration options

Here is a list of the main category of option your can set within your `nacara.config.json` file:
Here is a list of the main category of options you can set within your `nacara.config.json` file:

1. [siteMetadata](#sitemetadata) (object)
1. [navbar](#navbar) (object)
Expand All @@ -58,7 +58,7 @@ Here is a list of the main category of option your can set within your `nacara.c

### siteMetadata

The `siteMetadata` contains configuration common data related to you site like (for example, your site title, favIcon, etc).
The `siteMetadata` contains common configuration data related to your site, for example: your site title, favIcon, etc.

<table class="table is-narrow is-bordered is-vcentered">
<thead>
Expand Down Expand Up @@ -600,7 +600,7 @@ It consists on a list of `string` which can be:

- A relative path to a `.js` or `.jsx` file.

Learn more about custom layout [here](/Nacara/documentation/advanced/layout-from-scratch.html)
Learn more about custom layout [here](/Nacara/nacara/advanced/layout-from-scratch.html)

**Example**

Expand Down
8 changes: 4 additions & 4 deletions docs/nacara/directory-structure.md
Expand Up @@ -3,7 +3,7 @@ title: Directory structure
layout: standard
---

A basic Nacara site looks to something like that:
A basic Nacara project have a structure similar to this:

```
├── docs
Expand All @@ -23,7 +23,7 @@ A basic Nacara site looks to something like that:
├── package.json
```

Overview, of what each of those does:
To understand it better, we present this overview:

<table class="table is-narrow is-bordered is-vcentered">
<thead>
Expand Down Expand Up @@ -51,7 +51,7 @@ Overview, of what each of those does:
<code>docs</code>
</td>
<td class="fullwidth-cell">
Default, folder where you place your website source files likes:
Default folder where you place your website source files like:
<ul>
<li>Static resources</li>
<li>Markdown files to convert</li>
Expand All @@ -70,7 +70,7 @@ Overview, of what each of those does:
Main entry file for styling your application, generated file will be <code>docs_deploy/style.css</code>
</p>
<p>
Only one of these files can be used at a time.
Only one of those files should be used at a time.
</p>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/nacara/guides/create-a-page.md
Expand Up @@ -31,7 +31,7 @@ This is because you need to provide some information to Nacara via the `menu.jso

Edit the file `docs/documentation/menu.json` to add `"documentation/tutorial/my-page"` to it.

The file should looks like:
The file should look like:

```json
[
Expand Down
4 changes: 2 additions & 2 deletions docs/nacara/guides/create-a-section.md
Expand Up @@ -10,9 +10,9 @@ A section in Nacara helps you organize your website. For example, you can have t

## Create a new section

A section, is defined by creating a folder right under your source folder (default is `docs`).
A section is defined by creating a folder right under your source folder (default is `docs`).

If have this structure:
If your project has this structure:

```
docs
Expand Down
8 changes: 4 additions & 4 deletions docs/nacara/guides/customize-the-style.md
Expand Up @@ -13,12 +13,12 @@ Try editing this file and see the site being updated.

## Special folder

When you website become bigger you will want to split your `style` file into smaller files.
When your website becomes bigger, you will want to split your `style` file into smaller files.

Nacara has specials folders to deal with that:
Nacara has special folders to deal with that:

- `docs/scss`: use this folder is you are using SCSS to write your style
- `docs/sass`: use this folder is you are using SASS to write your style
- `docs/scss`: use this folder if you are using SCSS to write your style
- `docs/sass`: use this folder if you are using SASS to write your style

When one of the files of these folders changes, Nacara will recompile your `docs/style.scss` or `docs/style.sass`.

Expand Down
4 changes: 2 additions & 2 deletions docs/nacara/guides/section-menu.md
Expand Up @@ -26,7 +26,7 @@ Here you have **2** sections but only `documentation` has a menu.

## `menu.json`

The `menu.json` consist in a list of `MenuItem` which can be a `string` or an `object`.
The `menu.json` consists in a list of `MenuItem` which can be a `string` or an `object`.

```fsharp
type MenuItem =
Expand Down Expand Up @@ -71,7 +71,7 @@ File: `docs/documentation/menu.json`
]
```

The `title` front-matter will be used has the text to display in the menu.
The `title` front-matter will be used as the text to display in the menu.

### Link: link to any page

Expand Down
4 changes: 2 additions & 2 deletions docs/nacara/partials.md
Expand Up @@ -7,15 +7,15 @@ Partials are small components which are used by the layout to give you control o

The most common usage for a partial is to add a footer to your website.

Looks at **your layout documentation** to know which partials are **available**.
Look at **your layout documentation** to know which partials are **available**.

:::info
If you are a layout creator, learn more about how to access the partial by [clicking here](nacara/partials).
:::

## Structure

To create a partial you need to create file under the `docs/_partials` folder.
To create a partial you need to create a file under the `docs/_partials` folder.

For example, with the following structure there are two partials available:

Expand Down

0 comments on commit bccf06f

Please sign in to comment.