markdown wiki/blog

Related tags

Markdown kwiki
Overview

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

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

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

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

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

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

PHP based Markdown documentation viewer

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

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

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

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

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

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

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

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

🖍 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

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

:star2: PJ Blog is an open source blog built with Laravel and Vue.js.
:star2: PJ Blog is an open source blog built with Laravel and Vue.js.

🎈 PJ Blog is an open source blog built with Laravel and Vue.js. https://pigjian.com Special thanks to the generous sponsorship by: PJ Blog This is a

Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.

Laravel Blog Have you worked with Wordpress? Developers call this package wordpress-like laravel blog. Contact us for any customization: contact@binsh

Laravel-Blog is a blog application written in Laravel 4.2.
Laravel-Blog is a blog application written in Laravel 4.2.

创造不息,交付不止 Introduction Laravel-Blog is a blog project written in Laravel 4.2. Screenshots Article List Page Article composing page Single post page Ad

Comments
  • Links under default (server.php) not working

    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"
    
    opened by mtompkins 2
  • kwiki is not working out of the box

    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.

    opened by whoan 1
  • Basepath not passed to $app constructor

    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

    bug 
    opened by heidilux 1
Releases(v0.5.0)
Owner
Ryan Winchester
Elixir and PHP nerd
Ryan Winchester
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

Emanuil Rusev 14.3k Dec 28, 2022
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

The League of Extraordinary Packages 2.4k Dec 29, 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

The League of Extraordinary Packages 1.5k Jan 3, 2023
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

Jordan LeDoux 14 Sep 25, 2022
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

Spatie 230 Jan 7, 2023
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

ARCHTECH 104 Nov 12, 2022
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

PHPComLab 6 Sep 29, 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

Clark Winkelmann 7 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

Hung Nguyen 3 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

JBZoo Toolbox 1 Dec 26, 2021