aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/forum/how_to_have_a_plugin_deteling_a_file.mdwn18
-rw-r--r--doc/plugins/contrib/addtag.mdwn1
-rw-r--r--doc/plugins/contrib/created_in_future.mdwn1
-rw-r--r--doc/plugins/contrib/datetime_cmp.mdwn3
-rw-r--r--doc/plugins/contrib/jscalendar.mdwn25
-rw-r--r--doc/plugins/contrib/monthcalendar.mdwn106
-rw-r--r--doc/plugins/contrib/parenttag.mdwn1
-rw-r--r--doc/plugins/contrib/poetry.mdwn107
-rw-r--r--doc/plugins/contrib/sidebar2.mdwn5
-rw-r--r--doc/plugins/contrib/taskreport.mdwn1
-rw-r--r--doc/users/spalax.mdwn5
11 files changed, 257 insertions, 16 deletions
diff --git a/doc/forum/how_to_have_a_plugin_deteling_a_file.mdwn b/doc/forum/how_to_have_a_plugin_deteling_a_file.mdwn
new file mode 100644
index 000000000..ea29555e4
--- /dev/null
+++ b/doc/forum/how_to_have_a_plugin_deteling_a_file.mdwn
@@ -0,0 +1,18 @@
+[[!meta title="How to have a plugin delete a file?"]]
+
+When using the [[plugins/contrib/jscalendar]] plugin, it creates in the
+[[plugins/transient]] directory some files (a bit like the
+[[plugins/recentchanges]] plugin does). When the calendar that triggered
+creation of this file is removed, I would like to remove the corresponding
+page as well, but I cannot, because I get the following error.
+
+ internal error: jscalendar/90cde8dfad6413813b324a15ae2d1d95041aedd69e7be36c02b0cd4a58c4af73.jscalendar cannot be found in <path of wiki> or underlay
+
+My guess is that:
+
+* the page is stored, internally, in some list of pages to render (as it depends on the page containing the calendar that was just deleted);
+* my plugin delete this page (using `IkiWiki::prune()` or `unlink()`, in the `rendered()` or `needsbuild()` hook);
+* IkiWiki tries to render the page, but cannot (since I just deleted it), and throws the error.
+
+My question is: How can I tell IkiWiki that I *deleted* this page, and that it is no longer necessary to render it? Is there a hook in which I can safely do this?
+
diff --git a/doc/plugins/contrib/addtag.mdwn b/doc/plugins/contrib/addtag.mdwn
index ed57202d8..5b9461d28 100644
--- a/doc/plugins/contrib/addtag.mdwn
+++ b/doc/plugins/contrib/addtag.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=addtag author="[[Louis|spalax]]"]]
[[!tag type/widget]]
diff --git a/doc/plugins/contrib/created_in_future.mdwn b/doc/plugins/contrib/created_in_future.mdwn
index 09d2d52fc..95793e12a 100644
--- a/doc/plugins/contrib/created_in_future.mdwn
+++ b/doc/plugins/contrib/created_in_future.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name="created_in_future (deprecated)" author="[[Louis|spalax]]"]]
# Created_in_future
diff --git a/doc/plugins/contrib/datetime_cmp.mdwn b/doc/plugins/contrib/datetime_cmp.mdwn
index 7508e0b21..ba35b37c6 100644
--- a/doc/plugins/contrib/datetime_cmp.mdwn
+++ b/doc/plugins/contrib/datetime_cmp.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=datetime_cmp author="[[Louis|spalax]]"]]
[[!tag type/pagespec]]
@@ -36,7 +37,7 @@ where:
* `page`: other page (given in argument);
* `now`: date or time of compilation;
* `today`: same meaning as `now`.
- * `(|_delta)`: used to add a time delta (to use comparisons such as *created at least two day after `some_page`*):
+ * `(|_delta)`: used to add a time delta (to use comparisons such as *created at least two days after `some_page`*):
* *empty*: no delta;
* `_delta`: delta (given in argument).
diff --git a/doc/plugins/contrib/jscalendar.mdwn b/doc/plugins/contrib/jscalendar.mdwn
index 794e4bd9c..8123b3132 100644
--- a/doc/plugins/contrib/jscalendar.mdwn
+++ b/doc/plugins/contrib/jscalendar.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=jscalendar author="[[Louis|spalax]]"]]
# Jscalendar
@@ -12,33 +13,37 @@ Here are some differences compared to this latter plugin.
* No need to rebuild the page containing the calendar each time day changes, or
a page (indexed by the calendar) is added, changed or deleted. This is
particularly useful if you want to have this calendar in the sidebar.
- * Handles the case where several pages appear the same day: a popup appear to let user choose the day he wants.
* Smooth navigation among months.
-* Neutral
- * Most of options are defined in Ikiwiki's setup files instead of the options
- of the directive.
* Cons
- * As a consequence, every calendar of the wiki must index the same set of pages.
* Javascript :( .
## Usage
-### Directive
+### Examples of directive
\[[!jscalendar type="month" ]]
+ \[[!jscalendar type="month" archivebase="calendar"]]
+
+ \[[!jscalendar type="month" year=2014 month=08 pages="posts/* and !posts/*"]]
+
+ \[[!jscalendar type="month" year=-1 month=08]]
+
### Setup file
-It being javascript rather than markdown, most of the configuration must be done in the IkiWiki configuration file rather than in the directive
+This plugin uses the options used by the [[plugins/calendar]] plugin:
- 'archivebase' => "evenements/calendrier",
- 'archive_pagespec' => "evenements/liste/* and ! evenements/liste/*/*",
+ 'archivebase' => "archive",
+ 'archive_pagespec' => "posts/* and ! posts/*/*",
'week_start_day' => 1,
'month_link' => 1,
+The `archivebase` and `archive_pagespec` can be overloaded by the very same
+options of the directive.
+
## Example
-You can see this plugin in action on [[our website|http://www.gresille.org]]. To see what happens when several pages happens on the same day, check the 15th of March 2012.
+You can see this plugin in action on [[our website|http://www.gresille.org]].
Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Jscalendar]]
diff --git a/doc/plugins/contrib/monthcalendar.mdwn b/doc/plugins/contrib/monthcalendar.mdwn
index 4944f3a8f..c21be0abe 100644
--- a/doc/plugins/contrib/monthcalendar.mdwn
+++ b/doc/plugins/contrib/monthcalendar.mdwn
@@ -1,9 +1,12 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=monthcalendar author="[[Louis|spalax]]"]]
# Monthcalendar
This plugin displays a calendar, containing in each of its day the list of links of pages published on this day. It can be used, for example, to display archives of blog posts, or to announce events.
+The difference between this plugin and the [[plugins/calendar]] plugin is that the calendar displayed by this plugin is a big one, containing the full title of every page indexed in it.
+
## Usage
### Directive
@@ -16,6 +19,109 @@ By using the following line in template `calendarmonth.tmpl`, you can have `ikiw
\[[!monthcalendar type="month" year="<TMPL_VAR YEAR>" month="<TMPL_VAR MONTH>" pages="<TMPL_VAR PAGESPEC>"]]
+## CSS
+
+Here is an example of CSS properly rendering the calendar produced by this
+plugin.
+[[!toggle id=css text="CSS"]]
+[[!toggleable id=css text="""
+ /* Calendar */
+ .monthcalendar
+ {
+ color:#aaa;
+ /* font-size:18pt; */
+ margin-top:1em;
+ margin-bottom:1em;
+ width: 100%;
+ }
+
+ .monthcalendar table,
+ .monthcalendar td,
+ .monthcalendar th
+ {
+ border: 1px solid #ccc;
+ }
+
+ #content .monthcalendar td
+ {
+ padding: 0;
+ position: relative;
+ }
+
+ .monthcalendar td div
+ {
+ min-height: 10ex;
+ height: 100%;
+ position: relative;
+ }
+
+ .monthcalendar th
+ {
+ vertical-align: middle;
+ }
+
+ .monthcalendar td ul
+ {
+ padding-left: 0.5em;
+ list-style: dot;
+ list-style-position: inside;
+ text-align: left;
+ font-size: 8pt;
+ position: relative;
+ z-index: 10;
+ font-weight: bold;
+ }
+
+ table.monthcalendar
+ {
+ table-layout: fixed;
+ }
+
+ .monthcalendar .selflink
+ {
+ color:#444444;
+ }
+
+ .monthcalendar-day-head {
+ text-transform:capitalize;
+ }
+
+ .monthcalendar-head {
+ text-transform:capitalize;
+ }
+
+ .monthcalendar-daynumber
+ {
+ float: left;
+ position: absolute;
+ display: block;
+ font-size: 7ex;
+ color: #ccc;
+ line-height: 100%;
+ z-index: 5;
+ padding-top: 0.3ex;
+ text-align: right;
+ width: 1.8em;
+ }
+
+ /* List of pages */
+
+ .monthcalendar-pagelist {
+ display: flex;
+ flex-direction: column;
+ }
+
+ .monthcalendar-item {
+ opacity: 0;
+ height: 0;
+ }
+
+ .monthcalendar-item:target {
+ opacity: 1;
+ height: initial;
+ }
+"""]]
+
## Code
Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Monthcalendar]].
diff --git a/doc/plugins/contrib/parenttag.mdwn b/doc/plugins/contrib/parenttag.mdwn
index d3bede797..5dc01c7c5 100644
--- a/doc/plugins/contrib/parenttag.mdwn
+++ b/doc/plugins/contrib/parenttag.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=parenttag author="[[Louis|spalax]]"]]
[[!tag type/tags]]
diff --git a/doc/plugins/contrib/poetry.mdwn b/doc/plugins/contrib/poetry.mdwn
new file mode 100644
index 000000000..aed2e420a
--- /dev/null
+++ b/doc/plugins/contrib/poetry.mdwn
@@ -0,0 +1,107 @@
+[[!meta author="spalax"]]
+[[!template id=plugin name=poetry author="[[Louis|spalax]]"]]
+
+# Poetry
+
+The poetry plugin provides the [[ikiwiki/directive/poetry]] directive, used to
+render poetry (or songs).
+
+## Why?
+
+### Typography
+
+In regular text, there are two different meaning of a new line: a break between
+two paragraphs, and the line wrap.
+
+When rendering poetry, we need a third one: the carriage return between two
+verse lines. This one should be different from the line wrap carriage return,
+otherwise one will not be able to tell apart these two: is a word displayed at
+the begenning of its line a new verse line, or the previous verse line,
+continuing on a new line because it is too long?
+
+Generally, wrapped text is indented, whereas verse lines are not.
+
+### Markdown
+
+One could use carriage return (two white spaces at the end of a line) between
+verse lines, and paragraph break between stanzas, but:
+
+* adding white spaces at the end of lines is painful;
+* there is no easy way to render chorus (in a different way from verses).
+
+## Usage
+
+The directive takes only one argument `content`, containing the poetry to
+render. Carriage returns are respected.
+
+Chorus are lines with `> ` as a starting character.
+
+Lines starting with `) ` are consored/outdated/crossed out verses.
+
+[[!toggle id=example text="View example"]]
+[[!toggleable id=example text='''
+ \[[!poetry content="""
+ This is a verse
+ Made of several lines
+
+ > And here is the chorus
+ > La la la!
+ > A beautiful chorus
+
+ Another verse
+ A bit longer
+ Than the previous one
+
+ ) This one is deleted
+ ) Because I did not like it
+ """]]
+''']]
+
+
+## CSS
+
+This plugin is useless without some corresponding CSS. An example is given
+below.
+
+[[!toggle id=css text="CSS"]]
+[[!toggleable id=css text="""
+ .poetry {
+ padding-left: 1em;
+ border-left: 0.1em solid lightgray;
+ border-radius: 0.5em;
+ }
+
+ .poetry .stanza {
+ padding-left: 1em;
+ }
+
+ .poetry .paren {
+ font-style: italic;
+ font-size: smaller;
+ text-decoration: line-through;
+ }
+
+ .poetry .paren:hover {
+ text-decoration: initial;
+ }
+
+ .poetry .chorus {
+ margin-left: 0.1em;
+ padding-left: 2em;
+ border-left: 0.3em solid slategray;
+ }
+
+ .poetry .line {
+ display: block;
+ text-indent: -1em;
+ }
+"""]]
+
+## Example
+
+This plugin is used to render songs on [this choir's
+website](http://barricades.int.eu.org/repertoire/bread_and_roses/).
+
+## Code
+
+Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Poetry]].
diff --git a/doc/plugins/contrib/sidebar2.mdwn b/doc/plugins/contrib/sidebar2.mdwn
index 574bdeaab..5c169bfd4 100644
--- a/doc/plugins/contrib/sidebar2.mdwn
+++ b/doc/plugins/contrib/sidebar2.mdwn
@@ -1,9 +1,10 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=sidebar2 author="[[Louis|spalax]]"]]
[[!tag type/chrome]]
*Claim:* The [[sidebar|plugins/sidebar]] plugin has nothing
to do with sidebars. This plugin renders some page (which happens to be named
-`sidebar`) and put the result in template variable `SIDEBAR`, in template
+`sidebar`) and put the result in template variable `SIDEBAR` of template
`page.tmpl`. But the fact that it is a sidebar, i.e. a bar appearing on the
side on the screen, is done by CSS.
@@ -40,7 +41,7 @@ The default, which gives the behaviour of the sidebar plugin, is
# Improvements over sidebar plugin
-* You can add several "sidebars" to your wiki. For example, to have a sidebar, a submeno that appear only in pages documentations, and a footer, your `global_sidebars` would be:
+* You can add several "sidebars" to your wiki. For example, to have a sidebar, a submenu that appears only in documentation pages (`doc/*`), and a footer, your `global_sidebars` would be:
global_sidebars => [
"sidebar", "sidebar", "*",
diff --git a/doc/plugins/contrib/taskreport.mdwn b/doc/plugins/contrib/taskreport.mdwn
index 38c2a10c4..377c9ed39 100644
--- a/doc/plugins/contrib/taskreport.mdwn
+++ b/doc/plugins/contrib/taskreport.mdwn
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
[[!template id=plugin name=taskreport author="[[Louis|spalax]]"]]
# Taskreport
diff --git a/doc/users/spalax.mdwn b/doc/users/spalax.mdwn
index 0727276a1..d5867ca9e 100644
--- a/doc/users/spalax.mdwn
+++ b/doc/users/spalax.mdwn
@@ -6,15 +6,14 @@ User of IkiWiki.
I wrote and maintain a few plugins, which are available here: [[https://atelier.gresille.org/projects/gresille-ikiwiki]].
-[[!map pages="plugins/contrib/* and ! plugins/contrib/*/* and link(.)"]]
+[[!map pages="plugins/contrib/* and ! plugins/contrib/*/* and author(spalax)"]]
# Wishlist
I have a few things in mind. Their status is something between *I will implement it someday* to *maybe someone could need this* or *I will need it if I implement this killer website I have in mind*.
-* [[plugins/contrib/jssearchtag]]: Create a page where user can tick or untick any combination of tag (s)he want, and dynamically sees an inline of the matching pages. I have to see to what extent the [[plugins/contrib/jssearchfield|jssearchfield]] plugin already does the same thing (not tested yet).
* [[plugins/contrib/htaccessmanager]]: Create a cgi page to manage a htaccess file.
-* Automatically add calendar pages (see the [[ikiwiki-calendar discussion|ikiwiki-calendar/discussion]]).
+* Automatically add calendar pages (WIP: see the [[ikiwiki-calendar discussion|ikiwiki-calendar/discussion]]).
# Contact