Inkdown

Inkdown

Inkdown(bluestone) is a Markdown reading, editing, and sharing tool. Almost fully compatible with theGitHub Flavored Markdownstandard, while extending the Mermaid graphics and Katex formula, supporting light and dark styles, and somewhat different from other WYSIWYG editors, Inkdown does not pursue complete customization. Its core goal is comfortable reading, smooth editing of Markdown, and document sharing in the simplest way possible.

This document is generated by the Inkdown Linux deployment version. If you wish to deploy the online version, please check here.

Features:

This document assumes that you have a basic understanding of Markdown. The following is an introduction to common editing operations for Inkdown. You can use shortcut keys or enter /symbols at the beginning of a paragraph to insert elements.

Link

You can use the link options in the floating bar to add links to text, which can be other markdown files in the space or protocol addresses such as HTTP. As shown in the following image

Inkdown uses relative paths to save file links in the source markdown file.

image

You can also use tab to complete the file path and add a # to link to the anchor of the markdown file

image

Use mod+click to open the link. If it is a file path, you can also use mod+alt+click to open the link with a new tab page.

If there are other files that reference an open document, the referenced tag will be displayed in the navigation bar.

image

Github Table

After creating the table, use mod+enter to create a new row, and use mod+shif+backspace to delete the current row.

Right click in any table cell of the table to view more operations.

NameAreaBalance
jackNew York$1600
joeLondon$12
zoeShanghai$1

List

Typing 1 or - with spaces at the beginning of a paragraph can convert it to an ordered or unordered list. Adding[ ]and spaces at the beginning of a paragraph can convert them into a task list, or use shortcut keys in the system menu to control them.

  1. list item1

  2. list item2

  3. list item3

    1. task1

    2. task2

      ts
      const text = 'This is the nested content of list items'
    3. task3

List items can be nested with content. Use mod+enter to insert new elements into the list items, and use tab or shift+tab to indent or undo the list.

Code fences

Enter the following content at the beginning of the paragraph and add a enter to create a code fence

```[lang]

Click on the language display area in the upper right corner of the code fence to switch between code snippet languages or copy code content. At the end of the code fence, use mod+enter to jump out of the code snippet or use the up and down arrow keys.

ts
class Human {
	public say() { 
    console.log('hello world')
	}
}
go
package main

import "fmt"

func main() {    
	  fmt.Println("Hello, World!")
}
swift
import Cocoa
struct MarksStruct {   
	  var mark: Int
    init(mark: Int) {
  	    self.mark = mark
	  }
}
var aStruct = MarksStruct(mark: 98)
print(aStruct.mark)

Mermaid

Mermaid is a tool that uses syntax to render graphics. When you create a code fence for the Mermaid language, the Mermaid graphics will be automatically rendered below the code snippet for more details.

When the cursor leaves the input area, the code fence will be automatically collapsed, and the rendering effect is as follows:

Katex

Katex is a mathematical formula renderer.

Type$$at the beginning of the paragraph to create a block level formula editing area, where the formula will automatically render below. Type $latex$to create an in line formula editing area. When the cursor leaves the editing area, it will be automatically folded. The rendering effect is as follows:

In line formula:

Html

At the beginning of the paragraph, type any HTML tag such as<div>and enter to create an HTML rendering area, as shown in the following figure:

image

Sharing service

Inkdown provides aNode.js based network service program, allowing your documents to be easily shared with other readers. He will establish a mapping between the device file path and remote documents, allowing local Markdown documents to be shared to the network with just one click, and will automatically manage image dependencies and link conversions. The usage process is very simple. If you have your own Linux server, you can install it in 5 minutes.

Sharing program features

When renaming or moving files and folders in the Inkdown Editor, if the custom service is enabled, the remote file mapping path will be automatically changed.

Install

Network programs rely on the latest nodejs features and have certain requirements for Linux system versions.

If you want to use Docker deployment, please check here.

Assuming you log in to the server using the root account

sh
# Need unzip decompression program or yum install unzip
apt install unzip
# Install nodejs management tool
curl -fsSL https://fnm.vercel.app/install | bash
source $HOME/.bashrc
# Installing nodejs 20
fnm install 20
# Download and install the Inkdown sharing program
curl -fsSL https://github.com/1943time/bluestone-service/releases/latest/download/install.sh | bash
cd bluestone-service
# Starting network services
pm2 start

Settings

There is a package.json file in the bluestone service folder. By default, the sharing program uses port 80. If you want to change the port, you can change the scripts ->start field in the JSON file

json
{
	"scripts": {
		//"start": "next start -p 80",
		// Change port to 3000
		"start": "next start -p 3000"
	}
}

In the bluestone field, there are the following configurations that can be customized according to usage

json
{
	"bluestone": {
	  "secret": "BLUESTONE",
	  "home-site": "",
	  "favicon": "/favicon.png"
  }
}

After changing the configuration, it is necessary to restart the service program using pm2 restart bluestone. Please use pm2 start for the first time. If it is necessary to stop the service program, use pm2 stop bluestone

After completing the settings, you can publish the Markdown document with just one click. For example, the local image that the Markdown document depends on will be automatically uploaded when published.

Folder

Inkdown supports shared folders, where multiple documents can be published as multiple chapters in one document, and global search functionality has been added.

Documents within a folder can be redirected to each other using relative file paths, such as /Hello.md will automatically convert their links during synchronization. You can also add anchor links /Hello.md#title

Open any folder, select book ->create book

Every time the synchronization folder is updated, Inkdown only synchronizes the changed files. The files in the Inkdown document space can be adjusted in the desired order, and the file hierarchy and sorting are consistent with the sorting in the editor when sharing.

Nginx

In most cases, the sharing program may not enable port 80, and you may need an nginx proxy. The following nginx configurations can be used as a reference:

nginx
server {
    listen      80;
    # listen      443 ssl;
    # ssl_certificate path.pem;
    # ssl_certificate_key path.key;
    # ssl_session_timeout 5m;
    # ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    # ssl_prefer_server_ciphers on;
    server_name  doc.yourdomain.com;
    gzip on;
    gzip_comp_level 6;
    gzip_min_length 1k;
    gzip_static on;
    gzip_types
    application/javascript
    text/javascript
    text/css
    application/json
    application/manifest+json
    image/svg+xml
    application/wasm;
    client_max_body_size 100M;
    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host  $http_host;
        proxy_set_header X-Nginx-Proxy true;
        proxy_http_version 1.1;
        proxy_pass    http://localhost:3003; # 你监听的端口
        if ($request_filename ~* ^.*?\.(gif|jpg|jpeg|png|css|js|json|ttf|woff|woff2|wasm)$){
           expires  max;
        }
    }
}