DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:currentlyreading

Currently Reading Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes

plugin Displays a box with a book cover image that says ‘Currently Reading’ linked to a page

Last updated on
2021-08-07
Provides
Syntax
Repository
Source

Tagged with books, box, image, reading

Installation

Install the plugin using the Extension Manager Plugin and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Usage

Include the markdown on a page and it will be replaced by a box containing the heading, “Currently Reading”, with below a linked title of the page, and below that an image of the book cover.

The story title is pulled from the page’s metadata title, and the image comes from the page’s first image metadata.

If the page is not found, the plugin will still display a box but without an image and will use the pagename as the title. The link will go to a non-existing page that the user can create when clicked upon. If the page exists but does not have an image, the plugin simply does not display an image.

Spaces in the pagename will be eliminated and capitalization will be converted to lowercase when the plugin looks for an existing wiki page. However, if no page exists, spaces and capitalization will be kept when creating the displayed title. The attached link, will of course, be converted.

ScreenshotFIXME

{{https://scrollsoflankhmar.com/_media/currentlyreadingexample.png|Screenshot}}

Syntax

{{reading>pagename[?width]}}

Parameters

pagename

required

{{reading>gatherdarkness}}
{{reading>fiction:novels:conjurewife}}

Any valid namespace is allowed.

width

optional

{{reading>comingattractions?300}}

Width is in pixels.

Including a width will override the configuration width.

Floats

The box can be set to float left, right, center, or none, with the same DokuWiki syntax used for images. A space preceding the pagename will cause the box to float right, at the end will float left, and at both places will float center.

  • floats right
    {{reading> smokeghost}}
  • floats left
    {{reading>smokeghost }}
  • center
    {{reading> smokeghost }}

No Existing Page

{{reading>hungergames}}

Still displays a box with a link to a non-existing page in the wiki.
Resultant Title: hungergames Interwiki Link: hungergames

{{reading>Hunger Games}}

Still displays a box with a link to a non-existing page in the wiki.
Resultant Title: Hunger Games Interwiki Link: hungergames

Configuration and Settings

Configuration

Width

Default width in pixels.
Can be overriden in markdown.

Alternate Heading

A heading that replaces “Currently Reading.”
If left blank, no replacement occurs.

Formatting

The box can be formatted via the style.css file in the plugin's directory.

Development

Change Log

Known Bugs and Issues

Discussion

plugin/currentlyreading.txt · Last modified: 2023-04-26 12:41 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki