2017 © Pedro Peláez
 

project kwiki

Quick wiki or blog with markdown files

image

fungku/kwiki

Quick wiki or blog with markdown files

  • Friday, April 29, 2016
  • by ryanwinchester
  • Repository
  • 5 Watchers
  • 78 Stars
  • 197 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 1 Open issues
  • 13 Versions
  • 4 % Grown

The README.md

Kwiki

Version Total Downloads License Scrutinizer Code Quality Build Status, (*1)

SensioLabsInsight, (*2)

markdown wiki/blog

Usage

Place your markdown files in the /wiki directory., (*3)

Categories are directories and subcategories are subdirectories., (*4)

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., (*5)

The views are blade templates and located at resources/views/wiki and the master layout template is resources/views/master.blade.php, (*6)

Installation

Using composer:, (*7)

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

Setup

From the project root, rename .env.example to .env, (*8)

$ 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., (*9)

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., (*10)

$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:, (*11)

  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., (*12)

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

The default styling is very basic

By default we include a bootswatch theme from a CDN and public/css/app.css for custom styles., (*14)

Navigating to a category example:, (*15)

Very basic default styling, (*16)

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., (*17)

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

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., (*19)

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

The Versions

29/04 2016

dev-master

9999999-dev

Quick wiki or blog with markdown files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

markdown blog wiki

29/04 2016

v0.5.0

0.5.0.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

markdown blog wiki

23/02 2016

v0.4.0

0.4.0.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

markdown blog wiki

23/07 2015

5.1.x-dev

5.1.9999999.9999999-dev

Quick wiki or blog with markdown files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

markdown blog wiki

23/07 2015

v0.3.0

0.3.0.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

markdown blog wiki

28/04 2015

v0.2.1

0.2.1.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2

The Requires

 

The Development Requires

markdown blog wiki

27/04 2015

v0.2.0

0.2.0.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2

The Requires

 

The Development Requires

markdown blog wiki

24/04 2015

v0.1.5

0.1.5.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2

The Requires

 

The Development Requires

markdown blog wiki

24/04 2015

v0.1.4

0.1.4.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2

The Requires

 

The Development Requires

markdown blog wiki

23/04 2015

v0.1.3

0.1.3.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2

The Requires

 

The Development Requires

markdown blog wiki

23/04 2015

v0.1.2

0.1.2.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2

The Requires

 

The Development Requires

markdown blog wiki

23/04 2015

v0.1.1

0.1.1.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2

The Requires

 

The Development Requires

markdown blog wiki

23/04 2015

v0.1.0

0.1.0.0

Quick wiki or blog with markdown files

  Sources   Download

Apache-2

The Requires

 

The Development Requires

markdown blog wiki