Darwinia Documentation
  • Home
  • Blog
  • Wiki
  • Crab Network
  • Developers
  • Languages iconEnglish
    • 中文

›Get Started

Get Started

  • Introduction
  • FAQ

    • General
    • Developers
    • Community Building
    • Token Holder FAQ
    • Mainnet Related
    • Lexion
  • Community
  • Roadmap
  • Tools
  • Sample Article
  • How to contribute

Understand Darwinia

  • Overview
  • Architecture

    • Architecture
    • Bridge Chain
    • Solo Mode
    • Parachain Mode
  • Appchain SDK
  • NFT Identifiability
  • Accounts

    • Account Keys
    • Account Generation
    • Account Address
    • Check Balance
    • Balance Types

    Economics

    • Native Tokens
    • Distribution
    • Transaction Fees

    Staking

    • Basic Staking
    • Advanced Staking
    • Staking Power
    • Slash Algorithm
  • Bridge Chain Mechanism
  • Cryptography
  • Governance
  • Glossary

Tutorials

  • Create an Account
  • Become a nominator
  • Running a node
  • Become a validator
  • Become a relayer
  • Participate in governance
  • Recharge EVM address
  • Using Web3 for transaction
  • Using Web3 for contract

RFCs

  • RFCs
  • 0001 Darwinia Developement Structure
  • 0007 Dawinia Token Staking Model
  • 0009 Dawinia Liquid Kton Reward
  • 0010 Darwinia Cross Chain Nft Bridge Protocol
  • 0011 Using Harberger Tax To Find Price For Xclaim Vault Collaterals
  • 0012 Darwinia Bridge Core Interoperation In Chainrelay Enabled Blockchains
  • 0013 Darwinia Cross Chain Nft Standards
  • 0014 Darwinia Token Migration By Cross Chain Redeem Protocol
Edit

Sample Article

This wiki is powered by docusaorus uses GitHub Flavored Markdown (GFM). Find out more about Docusaurus-specific fields when writing Markdown.

Metadata

Articles

Articles use the following markdown header fields that are enclosed by a line --- on either side:

  • id: A unique document id. If this field is not present, the document's id will default to its file name (without the extension).
  • title: The title of your document. If this field is not present, the document's title will default to its id.
  • hide_title: Whether to hide the title at the top of the doc.
  • description: The description of your document which will become the <meta name="description" content="..."/> and <meta property="og:description" content="..."/> in <head>, used by search engines. If this field is not present, it will default to the first line of the contents.
  • sidebar_label: The text shown in the document sidebar and in the next/previous button for this document. If this field is not present, the document's sidebar_label will default to its title.

For example:

---
id: doc1
title: My Document
sidebar_label: Document
---

custom_edit_url: The URL for editing this document. If this field is not present, the document's edit URL will fall back to editUrl from global site config.

For example:

---
id: doc-markdown
title: Markdown Features
custom_edit_url: https://github.com/facebook/docusaurus/edit/master/docs/api-doc-markdown.md
---

Blog Posts

Blog posts use the following markdown header fields that are enclosed by a line --- on either side:

title: The title of this blog post.

author: The author of this blog post. If this field is omitted, no author name will be shown.

authorURL: A page to link to when a site user clicks the author's name. If this field is omitted, the author's name will not link to anything.

authorFBID: The author's Facebook id, used only to get the author's profile picture to display with the blog post. If this field is omitted, no author picture will be shown for the blog post.

For example:

---
title: My First Blog Post
author: Frank Li
authorURL: http://twitter.com/franchementli
authorFBID: 100002976521003
---

Extra Features

Docusaurus supports some extra features when writing documentation in markdown.

Table of Contents

When composing, header lines marked as h2 and h3 will be extracted to construct a table of content and shown at the top right side of the article or blog post.

Example:

## Header 2
### Header 3

Linking other Documents

You can use relative URLs to other documentation files which will automatically get converted to the corresponding HTML links when they get rendered.

Example:

[link to wiki index page](wiki-home.md)

This markdown will automatically get converted into a link to wiki index page to /docs/wiki-home.html (or the appropriately translated/versioned link) once it gets rendered.

This can help when you want to navigate through docs on GitHub since the links there will be functional links to other documents (still on GitHub), but the documents will have the correct HTML links when they get rendered.

Link to blog

Linking to Images and Other Assets

Static assets can be linked to in the same way that documents are, using relative URLs. Static assets used in documents of different language should go into assets folder under that same folder when your content resides, respectively. The markdown will get converted into correct link paths so that these paths will work for documents of all languages and versions. Note: all language articles are sharing the same directory to store static assets such as images, make sure your image doesn't conflict with others' name.

Example:

Darwinia Logo

![alt-text](assets/darwinia-logo.png)

Language-specific Code Tabs

Display code in multiple programming languages using code tabs. First, mark the start and end of a code tabs group, by using <!-- DOCUSAURUS_CODE_TABS --> and <!-- END_DOCUSAURUS_CODE_TABS --> respectively in your markdown. Then start each tab with <!--[TAB_TITLE]-->.

Adding the following code to your Markdown file:

produces this:

JavaScript
Python
C
Pascal
console.log('Hello, world!');
print('Hello, world!')
#include <stdio.h>

int main() {
printf("Hello World!");
return 0;
}
program HelloWorld;
begin
WriteLn('Hello, world!');
end.
Last updated on 2020-6-1
← ToolsHow to contribute →
  • Metadata
    • Articles
    • Blog Posts
  • Extra Features
    • Table of Contents
    • Linking other Documents
    • Linking to Images and Other Assets
    • Language-specific Code Tabs
Links
BlogOfficial WebsiteDarwinia Wallet Apps
Darwinia Documentation
Follow @DarwiniaNetwork
Star
Copyright © 2021 Darwinia Network