Markdown Authoring

Contact

Markdown Hosing - Register Now!

Home > Markdown Authoring | Japanese

What's New

Markdown hosting service is now OPEN!

Let me try

PREPRO - Markdownプリプロセッサ

Markdownで文書やWebページを便利に書けるようにするツール群をgithubで公開しています。
Apacheのみで構築したサイトでMarkdownコンテンツを提供することもできます。

横浜工文社が新しく開始したホスティングサービスを使うと、MarkdownページをWebで公開できるほか、このページで紹介している多言語執筆などの拡張機能を使ったり、LiveDataで紹介しているようにデータベースのデータを含むダイナミックページの生成が行えます。

工文社はこのようなMarkdownやApacheを用いたCMS構築の支援を行うことが可能です。 ご相談ください。

PREPRO - Markdown Preprocessors

Tools for conveniently writing documents and web pages using Markdown are on github. You can also publish a Markdown-witten content on a website built only with Apache.

The newly started hosting service allows you to publish Markdown pages, use extended features like multi-lingal authoring as described in the rest of the page and build a dynamic page with database data as described in LiveData.

Kobu.Com is willing to help you build authoring and publishing environment based on Markdown and Apache. Please contact us.

Introduction

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.

Source code: github.com/kobucom/author
Documentation: Author's Guide

A brief introduction will follow. If you are interested, please go get and use tools. Questions and requests are welcome.

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.

If you can do this, you will get:

Here is an example mixed with English and Japanese.

 /en/
 You can use apt command to install Apache web server on Debian:
 /ja/
 aptコマンドを使ってDebianにApacheウェブサーバをインストールできます。
 /end/

 $ sudo apt install apache2 

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

 You can use apt command to install Apache web server on Debian:

 $ sudo apt install apache2 

If you choose Japanese instead, you will get:

 aptコマンドを使ってDebianにApacheウェブサーバをインストールできます。

 $ sudo apt install apache2 

Selection other than languages are possible:

 To install apache:

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

You can write different content based on types of Linux and/or versions. If you choose to generate a document for Debian, you will get apt command. You will get dnf for CentOS v8 or yum for other versions of CentOS.

Specifying Stylesheet Class

We often see a question: "How can I specify a stylesheet class in Markdown?" You can do it with some conversion tools but done in different ways.

Here is a Style preprocessor way:

 {center}
 I want this sentence centered.
 {end}

 {right}
 I want this right-justified.
 {end}

This will be convert to the following HTML:

 <div class="center">
 <p>I want this sentence centered.</p>
 </div>
 <div class="right">
 <p>I want this right-justified.</p>
 </div>

and if a stylesheet used to deliver this Markdown source contains a definition of classes called center and right:

 .center { text-align: center }
 .right { text-align: right }

You will see the sentences align on the center and right edge of the page.

I want this sentence centered.

I want this right-justified.

You can output arbitary HTML not depending on a stylesheet.

 {leftcol}
 Left column block.
 {rightcol}
 Right column block.
 {end}
 <div style="float: left">
 Left column block.
 </div><div style="float: right">
 Right column block.
 </div><div style="clear: both"></div>

Drawing 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.

Written 2020-Apr-17
Updated 2020-Oct-08 third edition

Contact