本サイトは個人的なまとめサイトです。 記載内容に誤り等がありましたらご指摘ください。

Blog Plugin

  • blog プラグインのページ(リンク)をコピーしたものです。
  • description: Use DokuWiki as blogging tool. (previous authors: Esther Brunner)
  • author : Michael Hamann, Gina Häußge, Michael Klier
  • email : michael@content-space.de
  • type : syntax, action, helper
  • lastupdate : 2013-10-20
  • compatible : 2010-11-07, 2009-02-14, 2008-05-05, Angua, Adora Belle, Weatherwax
  • depends : include, pagelist
  • conflicts :
  • similar :
  • tags : blog, news

Description

The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.

You can try this plugin using the live demo.

If you use this plugin for blogging you might want to join Planet DokuWiki.

Installation

Download plugin-blog.tgz
BundleHub Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include:
BlogSuite BundleHub :!: The Bundle Hub is currently out of date and not updated anymore, please install the plugins individually :!:
FIXME Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features.
Tips If you intend to use this plugin be sure to take a look at the blogging tips page

Syntax

Blog

{{blog>[namespace]?[number]&[flags]}}
[namespace] namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in optional; default is the blog namespace set in the configuration
[number] number of entries to show per page optional; default is 5
[flags] flags are delimited by &
all Include plugin flags are supported optional
Form placement: topform/bottomform/noform optional, default is topform
Custom new-entry form title: newentrytitle=Custom title optional, can also be set as a configuration option

This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.

Archive

{{archive>[namespace]?[month]&[flags]}}
[namespace] the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in optional; default is the namespace specified in the configuration
[month] the month for the archive list in YYYY-MM format; * for all pages required
[flags] pagelist flags delimited by &, see flags optional

Shows a table with all pages of the given namespace that were created in the specified month.

{{autoarchive>[namespace]}}

Creates an automatic archive.

Configuration and Settings

The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.

namespace The default namespace which is used if no namespace was given in the syntax
formposition You can choose to display the new entry form either above or below the blog entries
newentrytitle Set a custom title for all new entry forms. This can also be set on individual blog forms.
dateprefix A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d
sortkey Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline)
sortorder Sort the blog entries ascending/descending
showhistogram Display a histogram in normal archive mode (not for autoarchive)

Changes

  • 2013-10-20: Translation updates, fix cache handling for empty blog listings
  • 2013-03-27: Better cache handling for the archive syntax
    • the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
    • the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the ~~NOCACHE~~ macro can be used if this is needed.

Development

Change Log

Bugs / Feature Requests

Please report bugs or feature requests at the Bug tracker.

FAQ

Please also have a look at the blogging tips page!

My dates are shown wrong. What can I do?

Make sure you run the latest version of all required plugins and DokuWiki.

Is it possible to change the way the date is displayed?

Yes, the plugin uses the dformat option to format the date.

How can I alter the date of a blog post?

You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.

Is it possible to show table of contents?

The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.

The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.

Discussion

Please report bugs or feature requests at the Bug tracker.

Flag

  • include pluginのページよりコピーした。

The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page. For most settings there are flags that allow to override the setting. Some features are only available as flag.

Configuration option Flags Description
noheader noheader/ (show)header Don't display the header of the inserted section
firstseconly firstsec(tion)only/ fullpage Display only the first section of the included page
showtaglogos - Show/hide an image for the first tag (if the page has tags)
showfooter footer/nofooter Show/hide page footer below the included page
showlink link/nolink Makes the first headline of a included page/section a link to the included page/section
showpermalink permalink/ nopermalink Show/hide a permalink to the included page in the page footer
showdate date/nodate Show/hide creation date of the page in the page footer
showmdate mdate/nomdate Show/hide modification date of the page in the page footer
showuser user/nouser Show/hide user name of the page creator in the page footer
showcomments comments/nocomments Show/hide number of comments in the page footer (requires the discussion plugin)
showlinkbacks linkbacks/nolinkbacks Show/hide number of linkbacks in the page footer (requires the linkback or backlinks2 plugin)
showtags tags/notags Show/hide tags in the page footer (requires the tag plugin)
showeditbtn editbtn or editbutton/noeditbtn or noeditbutton Show/hide edit button below the included page
doredirect redirect/noredirect Redirect back to original page after an edit
usernamespace - Namespace for user pages (see showuser configuration) (default user)
doindent indent/noindent Indent included pages relative to the section of the page they get included in
linkonly linkonly/nolinkonly or include_content Display only a link instead of the whole page content
title title/notitle Show the title instead of the page id
pageexists pageexists/ nopageexists Only list page ids of existing pages (see existlink)
- existlink Display a link and do so only if page page-id exists (combination of linkonly and pageexists)
parlink parlink/noparlink (Don't) put the link into a paragraph environment (for inline lists)
order order=OPTION Ordering criteria for namespace includes, possible options: page ID (id), title (title), date created (created), date modified (modified), indexmenu sort order (indexmenu), custom sort order using the {{include_n>[number]}} on the pages that are included similar to the indexmenu tags (custom).
rsort rsort/sort Reverse the sort order in namespace includes.
depth depth=DEPTH The maximum depth of subnamespaces of which pages are included in namespace includes, default is 1 for only the specified namespace, 0 is for unlimited depth.
- inline Don't close/open sections when including a page. This flag should be used when the include syntax is used inside other syntax elements like lists or tables or inside other plugin syntax.
- beforeeach=ENTITY/ aftereach=ENTITY Display an entity before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here).
safeindex - Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages.

Examples:

{{page>concept&firstseconly&footer}}
{{page>mypage&noindent}}
{{namespace>myns&order=modified}}

ログイン