Code <-> Documentation workflow

Yes, I think it’s much simple in this way :+1:

We have this labels already created to assign a priority to these issues.
Maybe you can just directly assign these issues a label → priority: 2 high (along with any other labels you think it may help locate the issue better)

Captura de pantalla 2020-06-26 a las 13.00.31

I have edited the PR template to reflect this change: https://github.com/frontity/frontity/commit/ca1414f89102d002f2a79f57e4b58759229d98b0

I have updated the workflow description in the WIKI:

Hey guys, I’d love if you could check out this PR and give feedback here about how the TSDocs for the types.ts file of a Frontity package can look like.


@dev-team, @SantosGuillamot:

  • What do you think?
  • Do you do something different?

@documentation-team:

  • Is it useful for you?
  • Do you want us to do something different?

Another thing: @documentation-team, what are you using to prettify the markdown files? Isn’t it prettier?

I tried to do a simple change to a markdown file in my local environment and prettier introduced a lot of changes to the format: https://github.com/frontity/docs/commit/16e81a482e23b28aec36485c58195e0df94328b5

I’ve reviewed the PR that @luisherranz has made:

I think it looks great, I have only noticed one thing that I think we should all agree on.

In TSDocs or in Documentation, when describing a method, I think we should be adding the () after the method name. Right now, we write it like (examples from current TSDocs):

An object that will be used in each call to the REST API when using actions.source.fetch with the default handlers.

Usually returned from api.get, but can also be the one returned by fetch.

Especially in the second example, it might not be clear to a new user that get and fetch are both methods and not some kind of getter or flag.

We’re not using prettier for code examples in markdown files. But I think we should.
We should add a prettier configuration file so we all use the same prettier configuration in the docs.
Which one are you using for frontity code?

Prettier without any configuration. It’s already in the package.json :slight_smile:

You can add it to your pre-commit hook if you want, using lint-staged using prettier --write (https://github.com/okonet/lint-staged#running-multiple-commands-in-a-sequence)

Optionally, you can configure VS Code to run prettier on file save with the “Format on save” option.