Giter VIP home page Giter VIP logo

grav-plugin-minicode's Introduction

Table of Contents:

About

Minicode is Grav plugin.

This plugin add Twig filter {{ | minicode }}. The filter is output tiny html (or other text) inside a document from text file.

And the filter can use on Templates too. You can output codes of site global. (ex: Sidebars, Ads, New product information...)

Installation

Installing Minicode plugin can only manual install now. Download this plugin and extracting all plugin files to

user/plugins/minicode

Usage

{{ 'filename.txt' |  minicode  }}
  1. Create directory user/minicodes if nothing. (This name is default. You can change directory name in plugin's config)
  2. Write a tiny html (or other text) to file. (ex: minicode1.html)
  3. The file put into user/minicodes directory. (ex: user/minicodes/minicode1.html)
  4. Write twig tag in page content or theme file. (ex: {{ 'minicode1.html' | minicode }})
  5. Preview the site.

Security

!Caution!

This plugin RAW output from file. Please check Broken HTML tags and Security risk before upload.

License

Copyright (c) 2016 Takefumi Ota.

Licensed for use under the terms of the MIT.

Found a mistakes ?

Please tell my mistakes about English if any. :-p

grav-plugin-minicode's People

Contributors

dragonparts avatar gracix avatar

Stargazers

 avatar  avatar

Watchers

 avatar

grav-plugin-minicode's Issues

Not working with php

This is exactly the type of solution I was looking for. Unfortunately it does not seem to be processing php. I created a simple test.html file in the user/minicodes folder with this content:

<html>
        <?php
        $output = "Hello World" ;
        echo "<pre>$output</pre>";
        ?>
</html>

And then added a {{ 'test.html' | minicode }} twig-tag to a page. I get the following output:

$output"; ?>

minicode plugin in post text area not being recognised

Noticed the new Grav plugin minicode and was anxious to try it out. I'm looking for a method for adding chunks of html into content and sidebars on various pages.
Installed via gpm and followed instructions on repo page.
Output of a simple html file in page content is merely: {{ ‘hello.html’ | minicode }}
Using grav-blog theme.
Looks like the plugin is not being recognized. Suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.