Pular para o conteúdo principal

Contributing

We are not taking public contributions at the moment, but will soon begin accepting pull requests. For now, if you encounter an error or spot something that is missing on this documentation portal, please create an issue

Creating a new article

Follow these guidelines to create a new article:

  1. Create the article on both en-us and pt-br projects with encoding UTF-8 BOM
  2. Alter the toc.md from both projects including the article
dica

An easy way to ensure that the new article has UTF-8 BOM encoding is to copy an existing article instead of creating a new file.

You don't need to write both versions of the article right away, you can write one of the versions and put this on the other one:

# Article title

{/* link to version in Portuguese */}
<div data-alt-locales="pt-br"></div>

or

# Título do Artigo

{/* link to version in English */}
<div data-alt-locales="en-us"></div>

Authoring documentation

Here are the most important links about how to author documentation:

Markdown cheatsheet

Here are sintaxes for the most common elements:

Headers

Top level (H1) header:

# Article title

Level 2 (H2) header:

## Section title

Level 3 (H3) header:

### Subsection title

Bold

This is a **bold** statement

This is a bold statement

Italic

This is a *foreign word*.

This is a foreign word.

Inline code

Pass the `callback` parameter

Pass the callback parameter

Lists

Unordered:

* Item A
* Item B
* Subitem (prefix spaces to align with parent)
* And so on
* Item C
  • Item A
  • Item B
    • Subitem (prefix spaces to align with parent)
      • And so on
  • Item C

Ordered:

1. Item 1
1. Item 2
1. Subitem (prefix spaces to align with parent)
1. And so on
1. Item 3
  1. Item 1
  2. Item 2
    1. Subitem (prefix spaces to align with parent)
      1. And so on
  3. Item 3

The actual numbering does not matter, DocFX will order the list when rendering the file. Prefer repeating 1. on every item instead of writing 1., 2., 3. etc because this allows for easy reodering of items.

Horizontal rulers

Use *** to insert a horizontal ruler:

Something

***

Some other thing
observação

Do not use the syntax ---, as it has a special meaning on DocFX

[text](url)

To articles on same folder:

See the article [Welcome](index.md)

See the article Welcome

To articles on other folders:

You can use the [Lacuna PKI SDK](../pki-sdk/index.md) for this purpose

You can use the Lacuna PKI SDK for this purpose

To classes:

See class @Lacuna.RestPki.Client.RestPkiClient

See class @Lacuna.RestPki.Client.RestPkiClient

To methods:

See method @Lacuna.RestPki.Client.RestPkiClient.GetPkiBrazilTimestamper

See method @Lacuna.RestPki.Client.RestPkiClient.GetPkiBrazilTimestamper

To find out the exact UIDs of classes and methods, see .yml files on folder api after building the docfx project.

In some cases, the syntax @uid does not work for cross referencing. In such cases, use:

<xref:Lacuna.RestPki.Client.RestPkiClient>

If the uid contains a #, encode it as %23:

<xref:Lacuna.Pki.LinkedTrustArbitrator.%23ctor(Lacuna.Pki.ITrustArbitrator[])>

Links to article sections:

First, you need to declare the anchor name right before the section header:

<a name="anchor-name" />
## Section title
observação

If the article is in English and the section title matches the anchor name (transformed to lowercase and replacing spaces with hyphens), you don't need to declare the anchor

Then, to link to the section:

See [Default error callback](../web-pki/advanced.md#default-error-callback)

See Default error callback

Code snippets

code

Common language IDs:

  • csharp or cs
  • javascript or js
  • html

Code snippets can be indented with lists:

  1. Installation
    1. Set things up

    2. Run this:

sudo apt install something


1. Finish things up
1. Done

See all supported [Language names and aliases](https://github.com/highlightjs/highlight.js#supported-languages).

### Includes

```md

{/* include: url */}

Include blocks common to both languages are kept on the includes/ folder. For instance, to include the rest-pki-samples-matrix.md block from a location such as docs.en-us/articles/project-name/article.md:


{/* include: ../../../includes/rest-pki-samples-matrix.md */}

Example: Rest PKI

Include code snippets

  • Syntax
  • Example: @Lacuna.Pki.Cades.CadesSignatureCompression [src]

Images

![Alt Text](url)

url can be a remote URL, but is usually a relative reference to an image on the images/ folder.

For instance, to reference the image images/pki-sdk/pades-rectangle.png from the following locations:

From docs.en-us/articles/project-name/article.md:

![Image name](/images/pki-sdk/pades-rectangle.png)

From docs.en-us/articles/project-name/subfolder/article.md:

![Image name](/images/pki-sdk/pades-rectangle.png)

Samples:

Blockquotes, notes and warnings

Blockquotes:

As Jeffrey Lebowski once said:

> Far out.

As Jeffrey Lebowski once said:

Far out.

Notes:

:::note
This is an important notice
:::

observação

This is an important notice

Warnings:

:::warning
Watch out!
:::

aviso

Watch out!

Also supported:

dica

This is a tip

informação

This is important

aviso

Proceed with caution

Tables

First Header | Second Header
--------------------------- | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column
First HeaderSecond Header
Content from cell 1Content from cell 2
Content in the first columnContent in the second column

It's not really needed to align columns, this renders the exact same output:

First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column
First HeaderSecond Header
Content from cell 1Content from cell 2
Content in the first columnContent in the second column

For more complex cases, for instance having the leftmost upper cell blank, use this slightly more complex syntax:

| | Second Header |
| --- | ------------- |
| Content from cell 1 | Content from cell 2 |
| Content in the first column | Content in the second column |
Second Header
Content from cell 1Content from cell 2
Content in the first columnContent in the second column

GitHub markdown specification (which DocFX extends) mandates at least three hyphens (---) in each column of the header row (like shown above on the first column).

The header row is always rendered in bold. If you also need the first column in bold, do this:

| | Ease of use | Awesomeness |
| ------------ | ------------- | ------------ |
| **Web PKI** | Very easy | So good |
| **Rest PKI** | Super easy | Much awesome |
| **PKI SDK** | Easy peasy | Wow |
Ease of useAwesomeness
Web PKIVery easySo good
Rest PKISuper easyMuch awesome
PKI SDKEasy peasyWow

Text in cells is normally left-aligned. For other alignments:

| Left-aligned | Center-aligned | Right-aligned |
| :--- | :---: | ---: |
| git status | git status | git status |
| git diff | git diff | git diff |
Left-alignedCenter-alignedRight-aligned
git statusgit statusgit status
git diffgit diffgit diff

See also: