A fork of plugin:autostartpage.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.3 KiB

2 years ago
# autostartpage: now with more variables!
This fork of autostartpage introduces two new features:
2 years ago
2 years ago
## Return part of the page ID
Append an index number to `@ID@` to return that segment of the canonical page ID. This follows standard array indexing; the first segment is index `0`.
For example, let's say your page ID is `house:projects:newroof:start`, and you just want to use `newroof` in your start page template. That's the third segment of the namespace (split by `:`), which means its index is `2`.
To return `newroof`, use `@ID2@`.
## Return a regex match from the namespace
This fork adds a new variable, `@NSREGEX/.../`, where `...` is the regex.
For example, let's look at a page ID with a date in it, such as `house:projects:newroof:2022:07:04`.
To return the portion of the ID before the first occurrence of a number (`house:projects:newroof:`), use `@NSREGEX/[a-z:]+/@`
***Note:** Regex support is currently very basic, and does not support capture groups.*
----
### NOTE: This plugin is unmaintained
Maintenance of this project has stagnated, and the plugin is likely incompatible with PHP7 and the latest versions of DokuWiki in it's current state. The project is seeking a maintainer. See the announcement here: https://github.com/rabidaudio/dokuwiki-plugin-autostartpage/issues/6
### autostartpage Plugin for DokuWiki
---------------------------------
Automatically create start pages for new namespaces. Handy if you
use start pages as indexes.
All documentation for this plugin can be found at
http://dokuwiki.org/plugin:autostartpage
If you install this plugin manually, make sure it is installed in
lib/plugins/autostartpage/ - if the folder is named someting else it
will not work!
Please refer to http://www.dokuwiki.org/plugins for additional info
on how to install plugins in DokuWiki.
----
Copyright (C) Charles Knight <charles@rabidaudio,com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
See the COPYING file in your DokuWiki folder for details