Home > Markdown Authoring | Japanese

Markdown Authoring

Contact

Multi-Language Authoring with Apache-only Web Site

This page introduces:

Authoring Tools

An engineer at Kobu.Com published on github open-source authoring tools for Markdown or other text-based articles and documents. The tools make authoring, editing and publishing easy.

github.com/kobucom/author

See README files on github about what they are and how to use the tools.

Questions and requests are welcome. In addition Kobu.Com is willing to help you build such authoring and publishing environment and customize the tools to suit your needs by fee. Please contact us. A brief introduction will follow.

Mixed languages in one source

If you have a wish, for example, to write sentences in multiple languages at the same time, or write a note about version one and version two at one place, your wish will come true.

Here is an example mixed with English and Japanese.

 This is a common part for any languages.

 /en/
 This text is included when the request language is English.
 /ja/
 This text is for Japanese only.
 ここは日本語で書かれた部分。
 /end/
 
 This again included for every output.

If you choose to present in English, you will get:

 This is a common part for any languages.
 This text is included when the request language is English.
 This again included for every output.

If you choose Japanese instead, you will get:

 This is a common part for any languages.
 This text is for Japanese only.
 ここは日本語で書かれた部分。
 This again included for every output.

Selection other than languages are possible:

 To install apache:

 /debian/
 $sudo apt-get install apache2
 /centos/
 $sudo yum install apache
 /centos.v8/
 $sudo dnf install httpd
 /end/

You can write different content based on types of Linux and/or versions.

Drawing a simple chart

You may want to add a simple chart like the one below in order to help readers easily understand your sentences.

PC sftp Server Folder File Inline SVG not supported by your browser

It is cumbersome to switch to a dedicated drawing tool or drawing feature of an Office product in order to draw just a tiny chart. You can draw the above chart with the following short instruction within a source.

 !draw!
 box "PC" - ; ball "sftp" + ; disk "Server Folder"
            ; paper "File"
 !end!

A limited types of shapes with centered text can be drawn with lines to neighboring shapes.

Semicolons and new lines determines position of figures; 'box' and 'ball' etc. specifies a type of figure; a string enclosed in quotes is drawn on a figure; the last symbol indicates how to draw line(s): '-' to the right, '|' down or '+' for both.

Publishing on the Web

Let's say a Markdown source text inlcuding passages shown above is placed in a remotely-mounted webdav folder on a web server.

webdav mounted

Set the prefered display language of your web browser to 'en' (or 'en-us' etc.) on the Options page:

options language

Open a web browser and request the following URL, or

http://www.example.com/news/sample.mdp

Append '?select=en' at the end of the URL:

http://www.example.com/news/sample.mdp?select=en

The following page will be displayed:

sample-en page

'mdp' in 'sample.mdp' indicates a request for HTML converted from the Markdown source.

If you set the display language to 'ja' or append '?select=ja' to the URL, you will get:

sample-ja page

This is how a multi-language content management system (CMS) can be built using webdav-enabled Apache and our tools (rep.cgi + rep.pl + draw.pl). I used Pandoc converter for generating HTML from Gihub-flavored Markdown.

Apache
Pandoc
github.com/kobucom/author

Written 2020-Apr-17
Updated 2020-Apr-28