Changes between Version 29 and Version 30 of IncludeMacro


Ignore:
Timestamp:
Apr 1, 2021, 7:02:04 PM (3 years ago)
Author:
Cinc-th
Comment:

Added README information because Include(source:includemacro/trunk/README) doesn't work on this page. The plugin seems to be partly broken.

Legend:

Unmodified
Added
Removed
Modified
  • IncludeMacro

    v29 v30  
    3333|| Latest stable for Trac 1.0+             || 3.2.0 || [source:includemacro/tags/3.2.0 Browse the source] or checkout from [/svn/includemacro/tags/3.2.0 here] using Subversion      ||
    3434
     35== Installation
     36
     37General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
     38
     39== Configuration
     40From the README of the latest version:
     41{{{
     42Notes
     43=====
     44
     45This macro lets you include various things.
     46
     47Currently supported sources:
     48
     49* HTTP - ``http:`` and ``https:``
     50* FTP - ``ftp:``
     51* Wiki pages - ``wiki:``
     52* Repository files - ``source:``
     53* Ticket comments - ``ticket:N:comment:M`` (3.0dev, syntax may be changed before release)
     54
     55The default source is ``wiki`` if only a source path is given.
     56
     57An optional second argument sets the output MIME type, though in most
     58cases the default will be correct.
     59
     60Permissions
     61===========
     62
     63The three remote sources (``http``, ``https``, and ``ftp``) require
     64``INCLUDE_URL`` to be rendered.
     65
     66Anyone can add a call to these, however they will not be shown. This is
     67**not** a replacement for ``render_unsafe_content``, see below.
     68
     69Configuration
     70=============
     71
     72If ``[wiki] render_unsafe_content`` is off (the default), any produced
     73HTML will be sanitized.
     74
     75.. caution::
     76    This is a potential security risk! Please review the implications
     77    ``render_unsafe_content`` before using this feature.
     78
     79To enable the plugin::
     80
     81    [components]
     82    includemacro.* = enabled
     83
     84Example
     85=======
     86
     87Include another wiki page::
     88
     89    [[Include(PageName)]]
     90
     91Include a section of a page (the section heading must have an explicit id)::
     92
     93    [[Include(PageName#section)]]
     94
     95Include the HEAD revision of a reStructuredText__ file from the repository::
     96
     97    [[Include(source:trunk/docs/README, text/x-rst)]]
     98
     99Include a specific revision of a file from the repository::
     100
     101    [[Include(source:trunk/docs/README@5, text/x-rst)]]
     102
     103Include only a subpart of file from the repository (use named arguments : start, end, lineno)::
     104
     105    [[Include(source:trunk/docs/README@5, text/x-rst, start=5, end=15)]]
     106    [[Include(source:trunk/docs/README@5, text/x-rst, start=5, end=15, lineno=yes)]]
     107
     108It's possible to use regular expressions in start and/or end parameters
     109
     110    [[Include(source:trunk/docs/README, start="[a-z]+", end=15, lineno=yes)]]
     111    [[Include(source:trunk/docs/README, start="[a-z]+", end="\[.+\]", lineno=yes)]]
     112
     113
     114__ http://docutils.sf.net/rst.html
     115
     116.. tip::
     117    If you set the ``svn:mime-type`` property on the file, you can 
     118    leave off the explicit MIME type.
     119}}}
     120
    35121== Recent Changes
    36122