]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'master' of git://ikiwiki.branchable.com
authorLouis <spalax@gresille.org>
Mon, 21 Jul 2014 12:28:15 +0000 (14:28 +0200)
committerLouis <spalax@gresille.org>
Mon, 21 Jul 2014 12:28:15 +0000 (14:28 +0200)
doc/forum/how_to_have_a_plugin_deteling_a_file.mdwn [new file with mode: 0644]
doc/plugins/contrib/addtag.mdwn
doc/plugins/contrib/created_in_future.mdwn
doc/plugins/contrib/datetime_cmp.mdwn
doc/plugins/contrib/jscalendar.mdwn
doc/plugins/contrib/monthcalendar.mdwn
doc/plugins/contrib/parenttag.mdwn
doc/plugins/contrib/poetry.mdwn [new file with mode: 0644]
doc/plugins/contrib/sidebar2.mdwn
doc/plugins/contrib/taskreport.mdwn
doc/users/spalax.mdwn

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 (file)
index 0000000..ea29555
--- /dev/null
@@ -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?
+
index ed57202d838390d449f9ad70d19457172e8d6bbc..5b9461d28fa3006c5a7f8ed35132882be5a8ec24 100644 (file)
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
 [[!template id=plugin name=addtag author="[[Louis|spalax]]"]]
 [[!tag type/widget]]
 
index 09d2d52fcc98b4be68f85ebb1b0118f47d915d9c..95793e12a6140f0d18672e72c157014b163bed0c 100644 (file)
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
 [[!template id=plugin name="created_in_future (deprecated)" author="[[Louis|spalax]]"]]
 
 # Created_in_future
index 7508e0b21f92283fbe70234f35c491bef59bf21b..ba35b37c60b23363e20890630d2b7376f4d8fef1 100644 (file)
@@ -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).
 
index 794e4bd9c5a6a7ad0e923710777d5f6629705282..8123b313243cb3657d878c3985767c31e088b547 100644 (file)
@@ -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]]
 
index 4944f3a8f82d1545c823aafb39eeef05c3eafacb..c21be0abe29966dd36b8e51398bb4464c8effa62 100644 (file)
@@ -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]].
index d3bede79705f508b500bcf1e12bb6a24ead69652..5dc01c7c559096a675941c9b78b9a1ff8bc3e711 100644 (file)
@@ -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 (file)
index 0000000..aed2e42
--- /dev/null
@@ -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]].
index 574bdeaab11f8e936495dbf69f97ed710211501d..5c169bfd49f4f132860dee56f69c4a423d2ed7b5 100644 (file)
@@ -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", "*",
index 38c2a10c4869ce68955a7993996f6a79687670f5..377c9ed394641b03ece036fa5f72003b7b096acf 100644 (file)
@@ -1,3 +1,4 @@
+[[!meta author="spalax"]]
 [[!template id=plugin name=taskreport author="[[Louis|spalax]]"]]
 
 # Taskreport
index 0727276a19b6194faf6ca660b35189321e63df9c..d5867ca9e7e0f98b25f9d8fde3a88b02748388d6 100644 (file)
@@ -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