Skip to content

bokotomo/WebMdParser

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

WebMdParser

URLに.mdファイルを指定しても整形された状態で見れます。
通常だと.mdファイルは、.txtファイルとして表示されてしまい、誰かに.mdファイル形式で共有できません。
WebMdParserをディレクトリに入れれば、サーバにmdファイルを貼って誰かに内容共有ができます。

DEMO

https://tomo.syo.tokyo/memo/text.md

Getting started

mdparserフォルダ
.htaccessファイル
この二つを同じ階層におくだけで、対応します。
すでに.htaccessファイルがある場合はこのコードの足りない部分を付け足します。

<IfModule mod_rewrite.c>  
RewriteEngine On  
RewriteRule ^(.+\.md)$ webmdparser/run.php?file_name=$1 [L]  
</IfModule>

.htaccessの説明

.mdの拡張子をつくアクセスを全てwebmdparser/run.phpに飛ばしています。

Using

PHP
.htaccess

About

.mdファイルをweb上でも整形された形で見れます

Resources

License

Stars

Watchers

Forks

Packages

No packages published