markdown wiki/blog

Last update: May 29, 2022

Kwiki

Version Total Downloads License Scrutinizer Code Quality Build Status

SensioLabsInsight

markdown wiki/blog

Usage

Place your markdown files in the /wiki directory.

Categories are directories and subcategories are subdirectories.

If you place an index.md in a category or subcategory directory, it will be parsed and displayed after the list of subcategories and files.

The views are blade templates and located at resources/views/wiki and the master layout template is resources/views/master.blade.php

Installation

Using composer:

$ composer create-project fungku/kwiki --prefer-dist

Setup

From the project root, rename .env.example to .env

$ mv .env.example .env

Edit .env for your environment. i.e. change from local to production on your production server, and change debug to false.

Using a different parser

By default the markdown parser used is erusev/parsedown. To use a different one, you need to make your own parser that implements the Parseable interface or create an adapter for a different library that implements Parseable. Then, you should change the binding in app/Providers/AppServiceProvider.php to your custom parser.

$this->app->bind(Parseable::class, MyCustomParser::class);

Understanding the data passed to your views

You will have four variables you can use in your wiki page view:

  1. $title is the title of the post or category.
  2. $breadcrumbs is an array of breadcrumbs with href and name indexes
  3. $index is available if you have navigated to a directory, or an empty array otherwise
    • $index['subcategories'] is an array of subdirectories in your current directory with href and name indexes
    • $index['files'] is an array of files in your current directory with href and name indexes
  4. $post is a string of your parsed markdown content

Changing default directories

Move or rename your wiki directory to wherever or whatever you want. Just update app/Http/Controllers/WikiController.php variable $wikiPath.

Move or rename your wiki view template to wherever or whatever you want. Just update app/Http/Controllers/WikiController.php variable $wikiView.

The default styling is very basic

By default we include a bootswatch theme from a CDN and public/css/app.css for custom styles.

Navigating to a category example:

Very basic default styling

Plans

Plans for the near future might be a bit nicer default style. Otherwise, I'm completely open to criticisms and suggestions since it already fulfils my requirements.

I might extract a package out of it, but it will be laravel-specific, due to the routes, controllers, and service provider.

If you wanted something outside of the laravel universe you could roll your own and you might be interested in my pagemark package linked below.

Powered by

  • Lumen - Laravel's official micro framework
  • Pagemark - A package I wrote that basically does all the work
  • Parsedown - A popular markdown parser, and this project's default

GitHub

https://github.com/fungku/kwiki
You might also like...

Symfony 5 bundle to easily create dynamic subpages with Markdown. Useful for help sections and wikis.

MarkdownWikiBundle This bundle allows you to create rich subpages in a Symfony project using Markdown. Pages are stored in a file cache and sourced fr

Apr 26, 2022

Gruik ! An open-source markdown note-taking web app. [ABANDONED PROJECT]

What is Gruik ? It's a free & open-source note-taking service. A space where you can store notes, tutorials, code snippets... by writing them in markd

Mar 31, 2022

PHP Markdown & Extra

PHP Markdown & Extra An updated and stripped version of the original PHP Markdown by Michel Fortin. Works quite well with PSR-0 autoloaders and is Com

Jan 18, 2022

A simple regex-based Markdown parser in PHP

Slimdown A simple regex-based Markdown parser in PHP. Supports the following elements (and can be extended via Slimdown::add_rule()): Headers Links Bo

Jul 27, 2022

A super lightweight Markdown parser for PHP projects and applications.

A speedy Markdown parser for PHP applications. This is a super lightweight Markdown parser for PHP projects and applications. It has a rather verbose

May 31, 2022

Docbook Tool for static documentation generation from Markdown files

Roave Docbook Tool Static HTML and PDF generator tool for generating documentation from Markdown files. Generates a deployable HTML file from Markdown

Aug 1, 2022

PHP based Markdown documentation viewer

PHP based viewer for Markdown files, to view them with fenced code highlighting and navigation.

Mar 31, 2022

markdown wiki/blog

markdown wiki/blog

Kwiki markdown wiki/blog Usage Place your markdown files in the /wiki directory. Categories are directories and subcategories are subdirectories. If y

May 29, 2022

This is an experiment to export all RFCs from the PHP wiki into Git, including the change history for each RFC (along with the date and author of each change). This is not meant to replace the wiki.

PHP Requests for Comments (RFCs) About This repository is an experiment to export all RFCs from the PHP wiki into Git, including the change history fo

Jun 20, 2022

Parser for Markdown and Markdown Extra derived from the original Markdown.pl by John Gruber.

PHP Markdown PHP Markdown Lib 1.9.0 - 1 Dec 2019 by Michel Fortin https://michelf.ca/ based on Markdown by John Gruber https://daringfireball.net/ Int

Aug 5, 2022

Parser for Markdown and Markdown Extra derived from the original Markdown.pl by John Gruber.

PHP Markdown PHP Markdown Lib 1.9.0 - 1 Dec 2019 by Michel Fortin https://michelf.ca/ based on Markdown by John Gruber https://daringfireball.net/ Int

Aug 5, 2022

A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Jul 5, 2021

Plug and play flat file markdown blog for your Laravel-projects

Plug and play flat file markdown blog for your Laravel-projects

Ampersand Plug-and-play flat file markdown blog tool for your Laravel-project. Create an article or blog-section on your site without the hassle of se

Apr 26, 2022

Laravel static site/blog generator with markdown support.

Katana static site & blog generator PHP static site & blog generator with markdown support. Using the power of laravel's Blade templating engine. Kata

Jun 14, 2022

🖍 Write beautiful blog articles using Markdown inside your Laravel app.

Blogged Write beautiful blog articles using Markdown inside your Laravel app. Blogged 🖍 Blogged is a carefully designed Laravel package provides an e

Jul 26, 2022

A Laravel package for creating a Markdown driven blog in minutes.

Static Markdown Blog A Laravel package for generating static blog posts from Markdown files. Sometimes, you want a blog but don't necessarily want to

Jun 2, 2022

A platform to create documentation/wiki content built with PHP & Laravel

BookStack A platform for storing and organising information and documentation. Details for BookStack can be found on the official website at https://w

Aug 8, 2022

PressDoWiki - Fast & Light PHP Wiki Engine

PressDoWiki - Fast & Light PHP Wiki Engine 이 위키는 현재 제작 중입니다. Currently in development. the seed와 최대한 유사하게 구현하는 것을 목표로 하고 있는 PHP 위키 엔진입니다. 요구 사항 (Requi

Jul 24, 2022

BookStack is an opinionated wiki system that provides a pleasant and simple out of the box experience.

BookStack is an opinionated wiki system that provides a pleasant and simple out of the box experience. New users to an instance should find the experience intuitive and only basic word-processing skills should be required to get involved in creating content on BookStack. The platform should provide advanced power features to those that desire it but they should not interfere with the core simple user experience.

Aug 10, 2022
Comments
  • 1. Links under default (server.php) not working

    The main page loads and renders properly in a markdown to HTML sense. There seems to be a routing issue, however ... Example Category produces a 404 My Post produces a 404

    To reproduce: Generic install in /var/www/html No change to .env Apache configured as:

    <VirtualHost *:80>
        DocumentRoot /var/www/html
        DirectoryIndex server.php
    
        <Directory />
            AllowOverride All
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    </VirtualHost>
    
    $ php --ini
    Configuration File (php.ini) Path: /etc/php/7.0/cli
    Loaded Configuration File:         /etc/php/7.0/cli/php.ini
    Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
    Additional .ini files parsed:      /etc/php/7.0/cli/conf.d/10-opcache.ini,
    /etc/php/7.0/cli/conf.d/10-pdo.ini,
    /etc/php/7.0/cli/conf.d/15-xml.ini,
    /etc/php/7.0/cli/conf.d/20-calendar.ini,
    /etc/php/7.0/cli/conf.d/20-ctype.ini,
    /etc/php/7.0/cli/conf.d/20-dom.ini,
    /etc/php/7.0/cli/conf.d/20-exif.ini,
    /etc/php/7.0/cli/conf.d/20-fileinfo.ini,
    /etc/php/7.0/cli/conf.d/20-ftp.ini,
    /etc/php/7.0/cli/conf.d/20-gettext.ini,
    /etc/php/7.0/cli/conf.d/20-iconv.ini,
    /etc/php/7.0/cli/conf.d/20-json.ini,
    /etc/php/7.0/cli/conf.d/20-mbstring.ini,
    /etc/php/7.0/cli/conf.d/20-phar.ini,
    /etc/php/7.0/cli/conf.d/20-posix.ini,
    /etc/php/7.0/cli/conf.d/20-readline.ini,
    /etc/php/7.0/cli/conf.d/20-shmop.ini,
    /etc/php/7.0/cli/conf.d/20-simplexml.ini,
    /etc/php/7.0/cli/conf.d/20-sockets.ini,
    /etc/php/7.0/cli/conf.d/20-sysvmsg.ini,
    /etc/php/7.0/cli/conf.d/20-sysvsem.ini,
    /etc/php/7.0/cli/conf.d/20-sysvshm.ini,
    /etc/php/7.0/cli/conf.d/20-tokenizer.ini,
    /etc/php/7.0/cli/conf.d/20-wddx.ini,
    /etc/php/7.0/cli/conf.d/20-xmlreader.ini,
    /etc/php/7.0/cli/conf.d/20-xmlwriter.ini,
    /etc/php/7.0/cli/conf.d/20-xsl.ini
    

    Apache access:

    ::1 - - [12/Jun/2016:10:52:44 -0400] "GET /Example-Category HTTP/1.1" 404 506 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36"
    
    Reviewed by mtompkins at 2016-06-12 14:51
  • 2. kwiki is not working out of the box

    Hi Ryan, Due to it's been more than a week since you merge some commits to fix some bugs, I just want to mention that if I install kwiki in the way you do in the readme.md, it's still not working out of the box. Notice it's not just kwiki and the problems in the namespaces, if I fix those by hand, the Subcategories links are not working because of Pagemark is forming wrongly the uri's.

    Could you create a new release for both packages in order to let composer to fetch the last changes?

    Thanks for sharing your projects, they are very useful.

    Reviewed by whoan at 2016-04-29 11:47
  • 3. Basepath not passed to $app constructor

    Was running into issues where everything was referencing the [appRoot]/public directory.

    Solved by passing the basePath to the constructor in bootstrap/app.php

    $app = new Laravel\Lumen\Application(realpath(__DIR__.'/../'));
    

    Taylor's commit: https://github.com/laravel/lumen/commit/d1b9f866c30a8d93e8a118effd50b54dd39fd90e

    Reviewed by heidilux at 2015-04-28 14:19
Related tags
Better Markdown Parser in PHP
Better Markdown Parser in PHP

Parsedown Better Markdown Parser in PHP - Demo. Features One File No Dependencies Super Fast Extensible GitHub flavored Tested in 5.3 to 7.3 Markdown

Aug 11, 2022
Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.
Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.

league/commonmark league/commonmark is a highly-extensible PHP Markdown parser created by Colin O'Dell which supports the full CommonMark spec and Git

Aug 6, 2022
Convert HTML to Markdown with PHP

HTML To Markdown for PHP Library which converts HTML to Markdown for your sanity and convenience. Requires: PHP 7.2+ Lead Developer: @colinodell Origi

Aug 11, 2022
A PHP tool to generate templateable markdown documentation from the docblocks or type-hints of your codebase.

Roster Installation To install, simply require the package using composer: composer require

Sep 8, 2021
A highly configurable markdown renderer and Blade component for Laravel
A highly configurable markdown renderer and Blade component for Laravel

A highly configurable markdown renderer and Blade component for Laravel This package contains: a Blade component that can render markdown a highly con

Aug 13, 2022
Easily add routes to your Laravel app by creating Markdown or Blade files

Laravel Pages This package lets you create pages using Markdown or Blade without having to worry about creating routes or controllers yourself. Essent

Jul 6, 2022
Render colored Markdown contents on console terminal
Render colored  Markdown contents on console terminal

cli-markdown Render colored markdown contents on console terminal Preview run demo by php example/demo.php Features support auto render color on termi

Jan 27, 2022
Generate pseudo-static pages from markdown and HTML files for Flarum

Flarum Pages Generator This is not a Flarum extension. This package provides a Flarum extender that you can use in the local extend.php to define cust

Feb 21, 2022
PHP Markdown Engine Support

PHP Markdown Version v1.x support all PHP version >=5.4 v2.x support all PHP version >=7.0 Cài đặt thư viện Thư viện này được cài đặt thông qua Compos

Jul 1, 2022
Rendering markdown from PHP code

JBZoo / Markdown Installing composer require jbzoo/markdown Usage Rendering Table <?php declare(strict_types=1); use JBZoo\Markdown\Table; echo (new

Dec 26, 2021