1
0
Fork 0

fix(docs): Howtos documentation corrections and updates

This commit is contained in:
Benjamin F 2022-12-22 17:24:59 -08:00
parent 04da277fd2
commit 24f7776840
25 changed files with 46 additions and 43 deletions

View file

@ -2,18 +2,19 @@
title: Accessing measurements
---
Measurements are available on the `measurements` key of from the object passed
[Measurements](/reference/measurements) are available on the `measurements` key of from the object passed
to your part's draft method. You can destructure them for easy access.
```design/src/part.mjs
function draftPart = ({
// highlight-start
measurements,
measurements,
// highlight-end
part
}) {
// Do something here
const a = measurements.chest
const b = measurements['hips']
return part
}

View file

@ -2,18 +2,19 @@
title: Accessing options
---
(the value of) Options are available on the `options` key of from the object
Options are available on the `options` key of from the object
passed to your part's draft method. You can destructure them for easy access.
```design/src/part.mjs
function draftPart = ({
function draftPart = ({
// highlight-start
options,
options,
// highlight-end
part
part
}) {
// Do something here
const a = options.fitKnee
const b = options[waistEase]
return part
}

View file

@ -3,7 +3,7 @@ title: Adding paths
---
Paths should be stored in the `paths` key of the object passed to your part's
draft method. The contructor for paths is available in the `Path` key. You can
draft method. The constructor for paths is available in the `Path` key. You can
destructure them for easy access.
<Example caption="An example of adding a path" tutorial>

View file

@ -3,7 +3,7 @@ title: Adding points
---
Points should be stored in the `points` key of the object passed to your part's
draft method. The contructor for points is available in the `Point` key. You
draft method. The constructor for points is available in the `Point` key. You
can destructure them for easy access.
<Example caption="An example of adding a point" tutorial>

View file

@ -3,7 +3,7 @@ title: Adding snippets
---
Snippets should be stored in the `snippets` key of the object passed to your part's
draft method. The contructor for snippets is available in the `Snippets` key. You can
draft method. The constructor for snippets is available in the `Snippets` key. You can
destructure them for easy access.
<Example caption="An example of adding a snippet" tutorial>

View file

@ -37,4 +37,3 @@ function draftPart = ({
}
```
</Example>
```

View file

@ -7,7 +7,9 @@ make sure to draft all of a part's dependencies before drafting the part
itself.
<Warning compact>
Do not confuse this with [part inheritance](/howtos/code/from).
Even though inherited parts are automatically included in a part's dependencies,
do not confuse part dependencies with [part inheritance](/howtos/code/from).
</Warning>
Part dependencies are configured with [the `after`

View file

@ -3,10 +3,10 @@ title: Creating a new pattern design
---
When creating a new design, you have two options. You can create it in a
stand-along development environment. Or you can create it inside (your fork of)
stand-alone development environment. Or, you can create it inside (your fork of)
the FreeSewing monorepo.
If you are unsure what to pick, go with the standalong development environment.
If you are unsure what to pick, go with the stand-alone development environment.
It is the best choice for people new to FreeSewing.
Working inside the monorepo is the preferred way of regular contributors, but
@ -15,7 +15,7 @@ when in doubt, go stand-alone. You can always change track later.
## Stand-alone
To setup the standalong development environment, you need NodeJS 16 or higher.
To setup the stand-alone development environment, you need NodeJS 16 or higher.
Then run:
```sh
@ -37,4 +37,4 @@ yarn new design
These commands will clone your fork of the
[freesewing/freesewing](https://github.com/freesewing/freesewing) repository on
Github and set it up for development.
GitHub and set it up for development.

View file

@ -22,7 +22,7 @@ Do __not__ replace the `path` object:
paths = {}
```
as the `paths` object is more than a pojo (plain old javascript object)
as the `paths` object is more than a pojo (plain old JavaScript object)
</Warning>
<Tip>

View file

@ -11,7 +11,7 @@ show you have to handle both below:
## Adding linebreaks to text
To add linebreaks to text, you merely have to include them in your text.
When doing so, keep in mind that single-quoted strings in Javascript
When doing so, keep in mind that single-quoted strings in JavaScript
will **not** pick up linebreaks.
<Example caption="An example of whitespace in text">

View file

@ -15,13 +15,13 @@ This pattern is rather common, and we will unpack an example from Bent below.
Before we dive in, here's a few things to keep in mind:
- In Javascript, you can create a function within your function and call it
- In JavaScript, you can create a function within your function and call it
- Bent extends Brian which sets both the `frontArmholeLength` and `backArmholeLength` values in the store with the length of those seams
- We need to match the length of the sleevecap + sleeve cap ease to the length of the front and back armhole
Here's how you can handle this in code:
- We create a method that does teh actual drafting of our sleevecap
- We create a method that does the actual drafting of our sleevecap
- We use a `tweak` value to influence the process, we start with a value of `1`
- We check the length after every attempt, and adjust the `tweak` value
@ -74,4 +74,4 @@ A few things that are important:
- We check to see how close we are by using `Math.abs(delta)` which gives us the absolute value of our delta
- We guard against an endless loop by keeping track of the runs and giving up after 25
- We multiply by `0.99` and `1.02` to respectively decrease and increase our `tweak` factor.
This assymetric approach avoids that we end up ping-ponging around our target value and never land somewhere in the middle
This asymmetric approach avoids that we end up ping-ponging around our target value and never land somewhere in the middle

View file

@ -5,7 +5,7 @@ title: Add seam allowance and/or hem allowance
Adding seam allowance is something that has to happen in every pattern.
We might also have a hem where we need to add more seam allowance, or hem allowance.
When doing this, it's best to split up your path so in those sections that share the same
When doing this, it's best to split up your path into sections that share the same
seam allowance.
In the example below we have two such paths:

View file

@ -5,7 +5,7 @@ title: Adding a blog post
Blog posts have been migrated to [Strapi](https://strapi.io/), a headless CMS
system.
Our strapi instance can be accessed at
Our Strapi instance can be accessed at
[posts.freesewing.org](https://posts.freesewing.org/).
If you don't have a Strapi account (yet), [reach out to us on

View file

@ -1,5 +1,5 @@
---
title: About frontmatter
title: About Frontmatter
order: 10
---

View file

@ -1,5 +1,5 @@
---
title: Working with frontmatter
title: Working with Frontmatter
---
Frontmatter is a way to add metadata to markdown documents.

View file

@ -1,9 +1,9 @@
---
title: Mult-line text
title: Multi-line text
order: 40
---
To add multi-line text in frontmatter, use a `|` character,
To add multi-line text in Frontmatter, use a `|` character,
and prefix the lines by spaces:
```md

View file

@ -5,7 +5,7 @@ title: Adding a showcase on freesewing.org
Showcase posts have been migrated to [Strapi](https://strapi.io/), a headless
CMS system.
Our strapi instance can be accessed at
Our Strapi instance can be accessed at
[posts.freesewing.org](https://posts.freesewing.org/).
If you don't have a Strapi account (yet), [reach out to us on

View file

@ -2,9 +2,9 @@
title: FreeSewing in the browser
---
Thanks to the advances in browser standardisation around Javascrip
Thanks to the advances in browser standardisation around JavaScript
ESM modules, not to mention [the new Skypack CDN](https://www.skypack.dev/),
you can generate patterns in the browser with a few lines of Javascript.
you can generate patterns in the browser with a few lines of JavaScript.
<Tip>

View file

@ -68,7 +68,7 @@ console.log(svg)
- You probably want to [use your own measurements](/reference/settings/measurements)
or you could use `@freesewing/models` to load measurements from [our sizing grid](https://freesewing.org/sizes/)
- We are using `@freesewing/plugin-theme` to theme our SVG, but you
could [pass in your own CSS](/guides/plugins/using-hooks-without-plugin)
could [pass in your own CSS](/reference/api/svg/style)
</Note>

View file

@ -1,5 +1,5 @@
---
title: Editing freesewing content on GitHub
title: Editing FreeSewing content on GitHub
---
## Introduction
@ -7,7 +7,7 @@ title: Editing freesewing content on GitHub
This 'How to' is designed to help get you started editing content using the
[GitHub website](https://github.com/freesewing).
GitHub stores a lot of Freesewing content, it allows anyone to suggest
GitHub stores a lot of FreeSewing content, it allows anyone to suggest
edits, and helps the contributors to review and implement approved changes.
If you are new to GitHub, you will need to [create an
@ -41,7 +41,7 @@ but this guide should be enough to help you get started.
## Fork the repository
- On GitHub.com, navigate to the freesewing
- On GitHub.com, navigate to the FreeSewing
[repository](https://github.com/freesewing/freesewing)
- In the top-right corner of the page, click **Fork**
![Fork button](fork_button.png)

View file

@ -3,8 +3,8 @@ title: Common git challenges
---
Git is a distributed version control system originally created by
Linus Torvalds (of linux fame).
Much like Linux itself, git is immensly powerful yet can be intimidating
Linus Torvalds (of Linux fame).
Much like Linux itself, git is immensely powerful yet can be intimidating
at first.
Below are some common challenges when working with FreeSewing code in git:

View file

@ -3,5 +3,5 @@ title: Develop sewing patterns
---
You could program new designs for FreeSewing.
If you're not afraid of Javascript and are happy to team up with a designer,
If you're not afraid of JavaScript and are happy to team up with a designer,
you could work on a new pattern together.

View file

@ -2,7 +2,7 @@
title: Devops
---
We have use a lot of automation from Github actions to automated deployment on Vercel.
We have use a lot of automation from GitHub actions to automated deployment on Vercel.
We also have some Ansible playbooks to run maintenance tasks.
There's also other technical tasks like database or server administration, certificate renewal, and so on.

View file

@ -13,7 +13,7 @@ If you've got pictures, there's a few ways you can get them on the site:
- [Facebook](#facebook)
- [Discord](#discrod)
- [Reddit](#reddit)
- [Github](#github)
- [GitHub](#github)
- [Email](#email)
### Instagram
@ -36,9 +36,9 @@ Post your pictures — or a link to them — in the `#pattern-showcase` channel
Post your pictures — or a link to them — in [r/freesewing](https://www.reddit.com/r/freesewing).
### Github
### GitHub
Create an issue [on Github](https://github.com/freesewing/freesewing/issues/new?assignees=\&labels=%F0%9F%91%8D+good+first+issue%2C+%F0%9F%93%B8+showcase%2C+%F0%9F%A4%97+community\&template=4_showcase-template.md\&title=Create+showcase+from+this+content) and attach your pictures to it, or include a link to the pictures.
Create an issue [on GitHub](https://github.com/freesewing/freesewing/issues/new?assignees=&labels=:%2B1:+good+first+issue%2C+:camera_flash:+showcase%2C+:hugs:+community&template=04_showcase-template.yaml&title=%5Bshowcase%5D%3A+Found+a+great+project+to+showcase) and attach your pictures to it, or include a link to the pictures.
### Email

View file

@ -4,4 +4,4 @@ title: Writing for freesewing.dev
You could write documentation for freesewing.dev, our developers website.
You would need good writing skills and a familiarity with code (Javascript).
You would need good writing skills and a familiarity with code (JavaScript).