Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

taufik-nurrohman/snippet-share-plugin-for-mecha-cms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Code Snippet Share Plugin for Mecha CMS

Share your snippet data as a stand–alone page/file.

Permanent Link

  • /s/print:file-1234 → map to /assets/__snippet/txt/file-1234.txt
  • /s/print:path/to/file-1234 → map to /assets/__snippet/txt/path/to/file-1234.txt
  • /s/include:file-1234 → map to /assets/__snippet/php/file-1234.php
  • /s/include:path/to/file-1234 → map to /assets/__snippet/php/path/to/file-1234.php

Options

  • /s/print:file-1234?brush=css → apply CSS syntax highlighter to the source code
  • /s/print:file-1234?brush=false → disable syntax highlighter
  • /s/print:file-1234?raw=1 → output the source code as a plain text file
  • /s/print:file-1234?file=1 → force to download the page as a snippet file
  • /s/print:file-1234?lot=foo,bar → allow to run printf in snippet (applies only to txt)