effector icon indicating copy to clipboard operation
effector copied to clipboard

Add anchors to all documentation pages

Open sergeysova opened this issue 1 year ago • 2 comments

Some pages still without IDs

  • [ ] https://github.com/effector/effector/blob/master/documentation/src/content/docs/en/typescript/typing-effector.md?plain=1

Common structure of the head IDs.

Name head as group of camelCase words separated by -. Order words from the general to the particular.

Methods can be written as is. It is not required to split createEffect into create-effect.

Each overload contains unique and full ID: (#methods-methodName-parameterA-parameterB).

Each subsection contains the full ID and suffix: (#methods-methodName-parameterA-parameterB-arguments).

Each method overload variant should contain these sections in the present order:

  • formulae
  • arguments
  • throws
  • returns
  • types
  • examples

Structure of the method documentation, in the header levels:

  1. Method name
  2. Sections (methods, properties, parameters)
  3. Method overload variant
  4. Section in the method doc (formulae, arguments, returns)
  5. Subsection (useful in Examples)

Example for the attach method

Methods (#methods)

Method variant

attach({source, effect}) (#methods-attach-source-effect)

Formulae (#methods-attach-source-effect-formulae)

Arguments (#methods-attach-source-effect-arguments)

Throws (#methods-attach-source-effect-throws)

Returns (#methods-attach-source-effect-returns)

Types (#methods-attach-source-effect-types)

Examples (#methods-attach-source-effect-examples)

Some specific example (#methods-attach-source-effect-examples-some-specific-case)
Another specific example (#methods-attach-source-effect-examples-another-specific-case)

There can be just one example.

attach({effect}) (#methods-attach-effect)

Formulae (#methods-attach-effect-formulae)

Arguments (#methods-attach-effect-arguments)

Throws (#methods-attach-effect-throws)

Returns (#methods-attach-effect-returns)

Types (#methods-attach-effect-types)

Examples (#methods-attach-effect-examples)

Also, any non-param case of the parameter or method, should be used as is:

attach({ effect, mapParams, source }) (#methods-attach-effect-mapParams-source)

Formulae (#methods-attach-effect-mapParams-source-formulae)

Arguments (#methods-attach-effect-mapParams-source-arguments)

Throws (#methods-attach-effect-mapParams-source-throws)

Returns (#methods-attach-effect-mapParams-source-returns)

Types (#methods-attach-effect-mapParams-source-types)

Examples (#methods-attach-effect-mapParams-source-examples)

Most typical usage (#methods-attach-effect-mapParams-source-examples-usage)

Extra parameters (#parameters)

This section do not requires sections in an each parameter description.

name (#parameters-attach-name)

domain (#parameters-attach-domain)

You can check this example as a markdown

Markdown

## Methods (#methods)

Method variant

### attach({source, effect}) (#methods-attach-source-effect)

#### Formulae (#methods-attach-source-effect-formulae)

#### Arguments (#methods-attach-source-effect-arguments)

#### Throws (#methods-attach-source-effect-throws)

#### Returns (#methods-attach-source-effect-returns)

#### Types (#methods-attach-source-effect-types)

#### Examples (#methods-attach-source-effect-examples)

##### Some specific example (#methods-attach-source-effect-examples-some-specific-case)

##### Another specific example (#methods-attach-source-effect-examples-another-specific-case)

There can be just one example.

### attach({effect}) (#methods-attach-effect)

#### Formulae (#methods-attach-effect-formulae)

#### Arguments (#methods-attach-effect-arguments)

#### Throws (#methods-attach-effect-throws)

#### Returns (#methods-attach-effect-returns)

#### Types (#methods-attach-effect-types)

#### Examples (#methods-attach-effect-examples)

 Also, any non-param case of the parameter or method, should be used as is:

### attach({ effect, mapParams, source }) (#methods-attach-effect-mapParams-source)

#### Formulae (#methods-attach-effect-mapParams-source-formulae)

#### Arguments (#methods-attach-effect-mapParams-source-arguments)

#### Throws (#methods-attach-effect-mapParams-source-throws)

#### Returns (#methods-attach-effect-mapParams-source-returns)

#### Types (#methods-attach-effect-mapParams-source-types)

#### Examples (#methods-attach-effect-mapParams-source-examples)

##### Most typical usage (#methods-attach-effect-mapParams-source-examples-usage)

## Extra parameters (#parameters)

This section do not requires sections in an each parameter description.

### name (#parameters-attach-name)

### domain (#parameters-attach-domain)

## You can check this example as a markdown

sergeysova avatar Aug 26 '24 11:08 sergeysova

https://effector.dev/en/typescript/typing-effector/

zerobias avatar Aug 26 '24 11:08 zerobias

Basic {#anchors} conflicts with already exists plugins.

sergeysova avatar Aug 26 '24 11:08 sergeysova