meta: Store "description" in pagestate for use by other plugins.
map: Support show=description.master
parent
ebb2b9cbda
commit
4da54999de
|
@ -78,6 +78,11 @@ sub preprocess (@) { #{{{
|
||||||
# Metadata collection that needs to happen during the scan pass.
|
# Metadata collection that needs to happen during the scan pass.
|
||||||
if ($key eq 'title') {
|
if ($key eq 'title') {
|
||||||
$pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value);
|
$pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value);
|
||||||
|
# fallthrough
|
||||||
|
}
|
||||||
|
elsif ($key eq 'description') {
|
||||||
|
$pagestate{$page}{meta}{description}=HTML::Entities::encode_numeric($value);
|
||||||
|
# fallthrough
|
||||||
}
|
}
|
||||||
elsif ($key eq 'license') {
|
elsif ($key eq 'license') {
|
||||||
push @{$metaheaders{$page}}, '<link rel="license" href="#page_license" />';
|
push @{$metaheaders{$page}}, '<link rel="license" href="#page_license" />';
|
||||||
|
|
|
@ -6,6 +6,8 @@ ikiwiki (2.51) UNRELEASED; urgency=low
|
||||||
titles, rather than the default page name. Based on a patch from
|
titles, rather than the default page name. Based on a patch from
|
||||||
Jaldhar H. Vyas, Closes: #484510
|
Jaldhar H. Vyas, Closes: #484510
|
||||||
* hnb: New plugin, contributed by Axel Beckert.
|
* hnb: New plugin, contributed by Axel Beckert.
|
||||||
|
* meta: Store "description" in pagestate for use by other plugins.
|
||||||
|
* map: Support show=description.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sun, 15 Jun 2008 15:03:33 -0400
|
-- Joey Hess <joeyh@debian.org> Sun, 15 Jun 2008 15:03:33 -0400
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Most of ikiwiki's [[features]] are implemented as plugins. Many of these
|
Most of ikiwiki's [[features]] are implemented as plugins. Many of these
|
||||||
plugins are included with ikiwiki.
|
plugins are included with ikiwiki.
|
||||||
|
|
||||||
|
[[map pages="plugins/*" show=description]]
|
||||||
|
|
||||||
[[pagestats pages="plugins/type/* and !plugins/type/slow"]]
|
[[pagestats pages="plugins/type/* and !plugins/type/slow"]]
|
||||||
|
|
||||||
There's documentation if you want to [[write]] your own plugins, or you can
|
There's documentation if you want to [[write]] your own plugins, or you can
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
[[template id=plugin name=map author="Alessandro Dotti Contra"]]
|
[[template id=plugin name=map author="Alessandro Dotti Contra"]]
|
||||||
[[tag type/meta]]
|
[[tag type/meta]]
|
||||||
|
|
||||||
|
[[meta description="some page description"]]
|
||||||
|
|
||||||
This plugin generates a hierarchical page map for the wiki. Example usage:
|
This plugin generates a hierarchical page map for the wiki. Example usage:
|
||||||
|
|
||||||
\[[map pages="* and !blog/* and !*/Discussion"]]
|
\[[map pages="* and !blog/* and !*/Discussion"]]
|
||||||
|
@ -9,8 +11,9 @@ If the pages to include are not specified, all pages (and other files) in
|
||||||
the wiki are mapped.
|
the wiki are mapped.
|
||||||
|
|
||||||
By default, the names of pages are shown in the map. The `show` parameter
|
By default, the names of pages are shown in the map. The `show` parameter
|
||||||
can be used to show the titles of pages instead. For example:
|
can be used to show the titles or descriptions of pages instead (as set by
|
||||||
|
the [[meta]] plugin). For example:
|
||||||
|
|
||||||
\[[map pages="* and !blog/* and !*/Discussion" show=title]]
|
\[[map pages="* and !blog/* and !*/Discussion" show=title]]
|
||||||
|
|
||||||
Hint: To limit the map to displaying pages less than a certain level deep,
|
Hint: To limit the map to displaying pages less than a certain level deep,
|
||||||
|
|
Loading…
Reference in New Issue