File: getsource.mdwn

package info (click to toggle)
ikiwiki 3.20190228-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 20,904 kB
  • sloc: perl: 31,100; python: 428; sh: 185; makefile: 120
file content (14 lines) | stat: -rw-r--r-- 544 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[[!template id=plugin name=getsource author="[[Will_Uther|Will]]"]]
[[!tag type/web]]

This plugin adds a "Source" link to the top of each page that uses
the CGI to display the page's source.

Configuration for this plugin in the setup file:

* `getsource_mimetype => "text/plain; charset=utf-8"`

  Sets the MIME type used when page source is requested. The default is
  usually appropriate, but you could set this to `application/octet-stream`
  to encourage browsers to download the source to a file rather than showing
  it in the browser.