aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/tag.pm
Commit message (Collapse)AuthorAge
* Silence "used only once: possible typo" warnings for variables that are part ↵Simon McVittie2016-01-19
| | | | of modules' APIs
* autoindex and tag use transient underlay when not committing, so do not need ↵Joey Hess2013-11-17
| | | | to disable only_committed_changes
* disable only_committed_changes when uncommitted files are created by pluginsJoey Hess2013-11-17
|
* tag plugin: encode categories using numeric valuesGiuseppe Bilotta2011-12-24
| | | | This ensures that RSS/Atom feeds produced are valid XML.
* Fix escaping of html entities in tag names.Joey Hess2011-07-29
| | | | | Example case was a tag with & in its name, which resulted in a malformed rss feed.
* tag: Avoid autocreating multiple tag pages that vary only in capitalization. ↵Joey Hess2011-04-30
| | | | | | | | | | The first capitalization seen of a tag will be used for the tag page. Arguably, the real bug is in the interface to add_autofile, but since that does take a filename, not a page name, it cannot really do case handling on its own. The only other users of add_autofile in ikiwiki proper is autoindex, and it always uses one case. Other third party plugins might also need to add similar workarounds though.
* tag: default to tag_autocreate_commit=1 as intendedSimon McVittie2011-01-07
|
* tag: optionally write autocreated tags to the transient underlaySimon McVittie2011-01-07
| | | | For the moment, have the tag test keep the old behaviour.
* unescape tag namesGiuseppe Bilotta2011-01-05
| | | | | | | Since tag names are now retrieved from the file names, we must revert the escaping process that santizes the file names. Solve by adding a `pagetitle()` call at the end of the tagname() (cherry picked from commit 0ee0612b1ab11d76eb3790c8db7a2ba992c54f6b)
* fix patch to not strip a leading "." unless it's part of a pathJoey Hess2011-01-04
| | | | For correctness only, since a tag named ".foo" is very unlikely.
* fix patch to not expose config setting as a regexpJoey Hess2011-01-04
|
* tag name sanitationGiuseppe Bilotta2011-01-04
| | | | | | | | | | | | | | | | | | | | | | | The use of typed links for tags and some of the consequent changes introduced some unwanted functionality variations in the tag system. Two problems in particular could be observed, when compared to the use of tags in older versions of IkiWiki: * tags in feeds (both rss and atom) would use the file path as their name (e.g. you would have <category term="tags/sometag" /> in an atom item for a page tagged sometag with a tagbase of tags), whereas they appeared pure before * tags containing a slash character would appear without the slash character but be used with the slash character in other circumstances (effect visible by tagging a page with a name such as "with/slash") Both of these issues are fixed by introducing a tagname() function that takes a tag link and effectively reverses (as well as possible) the effects of taglink(). A possible alternative route would have been the reintroduction of the global %tags hash, but the new approach as the (arguable) benefit of introducing a small layer of sanitation for tag names.
* rcs_commit and rcs_commit_staged api changesJoey Hess2010-06-23
| | | | | | | | | | | Using named parameters for these is overdue. Passing the session in a parameter instead of passing username and IP separately will later allow storing other session info, like username or part of the email. Note that these functions are not part of the exported API, and the prototype change will catch (most) skew, so I am not changing API versions. Any third-party plugins that call them will need updated though.
* turn on tag_autocreate by default if tagbase is setJoey Hess2010-04-21
|
* Merge branch 'master' into autotagJoey Hess2010-04-21
|\ | | | | | | | | Conflicts: IkiWiki/Plugin/tag.pm
| * remove broken ./tag supportJoey Hess2010-04-21
| | | | | | | | | | | | | | | | | | | | The commit that added the (working) support for using /tag to override tagbase also tried to make ./tag work. Problem is, tags are links, and ./foo is not a valid link (though I think there's a wishlist about it). So, using ./tag really resulted in tag creation links that led to a "bad page name" error. And even if the tag were created in the right place, the link didn't go to it.
* | fixesJoey Hess2010-04-21
| |
* | clarifyJoey Hess2010-04-21
| |
* | Merge branch 'master' into autotagJoey Hess2010-04-21
|\| | | | | | | | | Conflicts: IkiWiki/Plugin/tag.pm
| * pass pagespec parameters along from match_taggedJoey Hess2010-04-21
| |
* | add separate template variable for tag page and sanitize displayed tag nameJoey Hess2010-04-21
| |
* | commit autocreated tag pagesJoey Hess2010-04-21
| |
* | fix autotag behavior for relative tagsJoey Hess2010-04-17
| | | | | | | | | | | | | | | | | | | | | | A tag like ./foo is searched for relative to the tagging page. However, if multiple pages use such a tag, the only one sure to be in common is in the root, so autocreate it there to avoid scattering redunadant autocreated tags around the tree. (This is probably not ideal.) Also renamed the tagpage and taglink functions for clarity.
* | call gentag for taglinks tooJoey Hess2010-04-17
| |
* | fix autofile callJoey Hess2010-04-17
| |
* | tag_autocreate fixupsJoey Hess2010-04-17
| | | | | | | | | | Fix style of prompt. Optional to rebuild when it is changed. (Needed to get new all missing tags)
* | refactor autofilesJoey Hess2010-04-17
| | | | | | | | | | | | Made add_autofile take a generator function, and just register the autofile, for later possible creation. The testing is moved into Render, which allows cleaning up some stuff.
* | Merge remote branch 'davrieb/autotag' into autotagJoey Hess2010-04-17
|\ \ | |/ |/| | | | | | | Conflicts: IkiWiki.pm IkiWiki/Plugin/tag.pm
| * Make sure deleted tag pages don't get recreated.David Riebenbauer2010-04-03
| | | | | | | | | | | | | | | | The reason to do this is basically a user interaction design decision. It is achieved by adding an entry, associated to the creating plugin, to %pagestate. To find out if files were deleted a new global hash %del_hash is %introduced.
| * Check for existence off srcfile in add_autofileDavid Riebenbauer2010-04-03
| | | | | | | | | | | | | | | | | | add_autofile has to have checks, whether to create the file, anyway, so this will make things more consistent. Correcter check for the result of verify_src_file(). Cosmetic rename of a variable $addfile to $autofile.
| * Export add_autofile() for use in Plugins.David Riebenbauer2010-02-02
| |
| * Use add_autofile() in tag.pmDavid Riebenbauer2010-02-02
| | | | | | | | to make the automatically created tagpages render.
| * Automatically create tag pages,David Riebenbauer2010-02-02
| | | | | | | | | | | | | | | | | | | | if "tag_autocreate=1" is set in the configuration. The pages will be created in tagbase, if and only if they do not exist in the srcdir yet. Tag pages will be create from "autotag.tmpl". At this stage a second refresh is needed for the tag pages to be rendered. Add autotag.tmpl template.
* | Remove tagged_is_strict option, and just behave as though it was enabledSimon McVittie2010-04-04
| | | | | | | | | | Jon was worried about the backwards-compatibility break involved in making tagged() not match non-tag links, but Joey seems less concerned about it.
* | implement typed links; add tagged_is_strict config optionSimon McVittie2010-04-04
|/
* Avoid %links accumulating duplicates. (For TOVA)Joey Hess2009-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is sorta an optimisation, and sorta a bug fix. In one test case I have available, it can speed a page build up from 3 minutes to 3 seconds. The root of the problem is that $links{$page} contains arrays of links, rather than hashes of links. And when a link is found, it is just pushed onto the array, without checking for dups. Now, the array is emptied before scanning a page, so there should not be a lot of opportunity for lots of duplicate links to pile up in it. But, in some cases, they can, and if there are hundreds of duplicate links in the array, then scanning it for matching links, as match_link and some other code does, becomes much more expensive than it needs to be. Perhaps the real right fix would be to change the data structure to a hash. But, the list of links is never accessed like that, you always want to iterate through it. I also looked at deduping the list in saveindex, but that does a lot of unnecessary work, and doesn't completly solve the problem. So, finally, I decided to add an add_link function that handles deduping, and make ikiwiki-transition remove the old dup links.
* rename tag() to tagged(); add docsJoey Hess2009-02-19
|
* add tag() pagespecJoey Hess2009-02-19
| | | | patch from jon
* finalise version 3.00 of the plugin apiJoey Hess2008-12-23
|
* Coding style change: Remove explcit vim folding markers.Joey Hess2008-12-17
|
* remove redundant link mungeJoey Hess2008-11-10
| | | | | | | | This is not needed now that tagpage returns a page name starting with a slash. (Also fixes a minor bug that the edit links started with double slashes due to the hack.)
* tag: Normalize tagbase so leading/trailing slashes in it don't break things.Joey Hess2008-11-10
|
* tag: When tagpage is set, force the links created by tagging to point at the ↵Joey Hess2008-10-20
| | | | | | | | | | | | toplevel tagpage, and not closer subpages. The html links already went there, but internally the links were not recorded as absolute, which could cause confusing backlinks etc. For example, with tagbase=tags, if blog/tags/bar existed and blog/foo was tagged bar, it would link to /tags/bar. But, the link would be recorded simply as a link to tags/bar, and so later blog/tags/bar would appear to have the backlink.
* Export pagetitle, titlepage, linkpage.Joey Hess2008-09-27
|
* tag: Make edit link for new tags ensure that the tags are created inside ↵Joey Hess2008-09-25
| | | | tagbase, when it's set.
* add plugin safe/rebuild info (part 3 of 3)Joey Hess2008-08-03
|
* remove default values in getsetupJoey Hess2008-07-26
| | | | | They were a bit confusing, since they did not actually set the default, and example values are sufficient.
* finish adding getsetup hooks to pluginsJoey Hess2008-07-26
|
* Don't prepend tagbase to tags if they start with "./" or "/".Simon McVittie2008-07-21
| | | | | That syntax made little sense previously, and this allows sites to put "most" of their tags under $tagbase.
* patch from madduck to fix thinkojoey2007-09-24
|