Code Monkey home page Code Monkey logo

includemacro's Introduction

Notes
=====

This macro lets you include various things.

Currently supported sources:

* HTTP - ``http:`` and ``https:``
* FTP - ``ftp:``
* Wiki pages - ``wiki:``
* Repository files - ``source:``
* Ticket comments - ``ticket:N:comment:M`` (3.0dev, syntax may be changed before release)

The default source is ``wiki`` if only a source path is given.

An optional second argument sets the output MIME type, though in most
cases the default will be correct.

Permissions
===========

The three remote sources (``http``, ``https``, and ``ftp``) require
``INCLUDE_URL`` to be rendered.

Anyone can add a call to these, however they will not be shown. This is
**not** a replacement for ``render_unsafe_content``, see below.

Configuration
=============

If ``[wiki] render_unsafe_content`` is off (the default), any produced
HTML will be sanitized.

.. caution::
    This is a potential security risk! Please review the implications
    ``render_unsafe_content`` before using this feature.

To enable the plugin::

    [components]
    includemacro.* = enabled

Example
=======

Include another wiki page::

    [[Include(PageName)]]

Include the HEAD revision of a reStructuredText__ file from the repository::

    [[Include(source:trunk/docs/README, text/x-rst)]]

Include a specific revision of a file from the repository::

    [[Include(source:trunk/docs/README@5, text/x-rst)]]

__ http://docutils.sf.net/rst.html

.. tip::
    If you set the ``svn:mime-type`` property on the file, you can  
    leave off the explicit MIME type.

includemacro's People

Contributors

kzhamaji avatar

Watchers

 avatar  avatar

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.