Improvement of documentation of my plugins
- typos - examples - rendering - explanation - update - etc.master
parent
f15ecfcf32
commit
c7b637471f
|
@ -1,3 +1,4 @@
|
|||
[[!meta author="spalax"]]
|
||||
[[!template id=plugin name=addtag author="[[Louis|spalax]]"]]
|
||||
[[!tag type/widget]]
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
[[!meta author="spalax"]]
|
||||
[[!template id=plugin name="created_in_future (deprecated)" author="[[Louis|spalax]]"]]
|
||||
|
||||
# Created_in_future
|
||||
|
|
|
@ -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).
|
||||
|
||||
|
|
|
@ -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]]
|
||||
|
||||
|
|
|
@ -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]].
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
[[!meta author="spalax"]]
|
||||
[[!template id=plugin name=parenttag author="[[Louis|spalax]]"]]
|
||||
[[!tag type/tags]]
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
[[!meta author="spalax"]]
|
||||
[[!template id=plugin name=poetry author="[[Louis|spalax]]"]]
|
||||
|
||||
# Poetry
|
||||
|
@ -10,12 +11,15 @@ render poetry (or songs).
|
|||
### Typography
|
||||
|
||||
In regular text, there are two different meaning of a new line: a break between
|
||||
two paragraphs, and the word wrap.
|
||||
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 word wrap carriage return,
|
||||
otherwise one will not be able to tell apart these two (generally, wrapped text
|
||||
is indented, whereas verse lines are not).
|
||||
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
|
||||
|
||||
|
|
|
@ -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", "*",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
[[!meta author="spalax"]]
|
||||
[[!template id=plugin name=taskreport author="[[Louis|spalax]]"]]
|
||||
|
||||
# Taskreport
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue