aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
Commit message (Collapse)AuthorAge
* Add parameter to displaytime to specify that it is a pubdate, and in html5 ↵Joey Hess2010-05-02
| | | | mode, use time tag.
* html5 optionJoey Hess2010-05-01
| | | | | | * Ikiwiki can be configured to generate html5 instead of the default xhtml 1.0. The html5 output mode is experimental, not yet fully standards compliant, and will be subject to rapid change.
* loop on pagesources, not ctimeJoey Hess2010-04-26
|
* Fix removal of rendered files in rebuild mode.Joey Hess2010-04-26
| | | | | | | | | | | Needed to handle the move of the .js files into ikiwiki/, but also this is a longstanding bug. Old pagemtime is not remembered in rebuild mode, and changing that would need a lot of changes. So instead, loop on pagectime, which is remembered. Change to remembering old pagesources info in rebuild mode. This seems safe enough.
* rebuild on template removalJoey Hess2010-04-24
|
* bugfixesJoey Hess2010-04-24
|
* add support for mass dependenciesJoey Hess2010-04-24
| | | | Registered by passing "" as page name to add_depends.
* special case for page.tmpl dependency handlingJoey Hess2010-04-23
| | | | | | Rather than wasting resources recording that every page depends on page.tmpl, add a special case. The special case curretly rebuilds non-page files too when page.tmpl changes, but that's minor.
* look for templates in srcdir and underlays, firstJoey Hess2010-04-22
| | | | | | | | | | | | | | | This entailed changing template_params; it no longer takes the template filename as its first parameter. Add template_depends to api and replace calls to template() with template_depends() in appropriate places, where a dependency should be added on the template. Other plugins don't use template(), so will need further work. Also, includes are disabled for security. Enabling includes only when using templates from the templatedir would be nice, but would add a lot of complexity to the implementation.
* Merge branch 'master' into autotagJoey Hess2010-04-21
|\ | | | | | | | | Conflicts: IkiWiki/Plugin/tag.pm
| * fix false positive in link_types_changedJoey Hess2010-04-21
| | | | | | | | | | | | loadindex does not bother populating oldtypedlinks if there is no link type. However, the code in link_types_changed assumed that if oldtypedlinks is not defined, and typedlinks is, they must differ.
* | remember autofiles that were tried and failed to be addedJoey Hess2010-04-21
| | | | | | | | | | | | This way, if an autofile is registered for a file that already exists, it is remembered that it was tried, and it doesn't get recreated when removed.
* | remember autofiles alwaysJoey Hess2010-04-21
| | | | | | | | | | | | | | | | | | | | This fixes the problem that it did not remember if an autofile is deleted, unless a plugin happened to register the autofile at the same time. With the new code, we just never recreate an autofile more than once. Only downside is that the list of autofiles is never pruned either. And I don't really see a way to prune it.
* | bugfixesJoey Hess2010-04-21
| |
* | remove verify_src_fileJoey Hess2010-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Splitting out this function bothered me. It is conceptially similar to file_pruned, and yet also very specific to exactly the security needs of find_src_files. I liked that it got rid of duplicate code in the latter function. So instead, put a helper sub in that, which I think allows refactoring things more cleanly, and with less boilerplate. As to the needs of gen_autofile, I'm not convinced this needs to handle the same set of problems that verify_src_file did. So I sat down and wrote a custom validator for autofiles, which turned out to seem to just need three things: Make sure the candidate filename is not something that would be pruned; untaint the candidate filename; and make sure that srcdir doesn't already have something with its name. (Plus, of course, all the other checks that were already in gen_autofile.) (In passing, also fixed a bunch of bugs I had introduced in this branch.)
* | Merge branch 'master' into autotagJoey Hess2010-04-20
|\|
| * fix minor bug if a page's name is "0"Joey Hess2010-04-20
| |
| * change wordingJoey Hess2010-04-19
| | | | | | | | This is more accurate when a file that is not a page is what is removed.
| * move message into if blockJoey Hess2010-04-19
| |
* | move File::Find control back into its code blocksJoey Hess2010-04-17
| | | | | | | | Ok, this is longer, but features less scary action at a distance.
* | move decode_utf8 closer to reason for itJoey Hess2010-04-17
| | | | | | | | | | Filenames need to be decoded, as File::Find does not provide them in decoded form, but other callers of verify_src_file will be using utf8.
* | 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.
* | whitespaceJoey Hess2010-04-17
| |
* | 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.
| * Revert "Revert the effects of find_del_files() for (re)autoadded files."David Riebenbauer2010-04-03
| | | | | | | | This reverts commit 31680111f0062f07727d14fcf291c98978ad5a2f.
| * fix bugs in `find_src_files()`.David Riebenbauer2010-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `_` to avoid superfluous stat. Check for `defined $file`, instead of just `$file`. Add spaces after commas. Change return values of `verify_src_file()` to not return the tainted filename. Rename `$f` to `$file_untainted in `verify_src_file()`. $f changes to `$file` in `find_src_files()`. This attempts to fix commit f3abeac919c4736429bd3362af6edf51ede8e7fe. For discussion see <http://ikiwiki.info/todo/auto-create_tag_pages_according_to_a_template/>
| * Revert the effects of find_del_files() for (re)autoadded files.David Riebenbauer2010-02-02
| | | | | | | | | | This also means that if autoadded files are deleted they will just be recreated.
| * Process files from @autofiles in refresh().David Riebenbauer2010-02-02
| | | | | | | | | | | | | | To make automatically added files render they have to be added to the $files, $pages, $new, and $changed variables. After that scan() is called on them.
| * Code deduplication fin find_src_files()David Riebenbauer2010-02-02
| | | | | | | | | | This also has the advantage that I can use the resulting new function elsewhere.
* | automatically run --gettime, and optimise it for gitJoey Hess2010-04-16
| | | | | | | | | | | | | | | | | | | | * Automatically run --gettime the first time ikiwiki is run on a given srcdir. * Optimise --gettime for git, so it's appropriatly screamingly fast. (This could be done for other backends too.) * However, --gettime for git no longer follows renames. * Use above to fix up timestamps on docwiki, as well as ensure that timestamps on basewiki files shipped in the deb are sane.
* | --gettime revampJoey Hess2010-04-16
| | | | | | | | | | | | | | | | * Rename --getctime to --gettime. (The old name still works for backwards compatability.) * --gettime now also looks up last modification time. * Add rcs_getmtime to plugin API; currently only implemented for git.
* | Fix some typos that would break Render during changed-link calculationSimon McVittie2010-04-04
| |
* | implement typed links; add tagged_is_strict config optionSimon McVittie2010-04-04
| |
* | don't check $@ after pagespec_translateJoey Hess2010-03-28
| | | | | | | | | | | | | | | | | | pagespec_translate may set $@ if it fails to parse a pagespec, but due to memoization, this is not reliable. If a memoized call is repeated, and $@ is already set for some other reason previously, it will remain set through the call to pagespec_translate. Instead, just check if pagespec_translate returns undef.
* | Add new --clean option; this makes ikiwiki remove all built files in the ↵Joey Hess2010-02-28
|/ | | | destdir, as well as wrappers and the .ikiwiki directory.
* fix actions accountingJoey Hess2010-01-04
|
* Fix several places that did not properly handle capitalization of the ↵Joey Hess2010-01-02
| | | | | | discussionpage setting. Specifically, fixes discussion actions on discussion pages, and unbreaks the opendiscussion plugin.
* fix inverted testJoey Hess2009-12-02
|
* fix bestlink to not return just-deleted pagesJoey Hess2009-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | bestlink was looking at whether %links existed for a page in order to tell if the page exists, but just-deleted pages still have entries in there (for reasons it may be best not to explore). So bestlink would return just-deleted pages. Instead, make bestlink use %pagesources. Also, when finding a deleted page, %pagecase was not cleared of that page. This, again, made bestlink return just-deleted pages. Now that is cleared. Fixing bestlink exposed another issue though. The backlink calculation code uses bestlink. So when a page was deleted, no backlinks to it are found, and pages that really did backlink to it were not updated, and had broken links. To fix that, the code that actually removes deleted pages had to be split out from find_del_files, so it can run a bit later. It is run just after backlinks are calculated. This way, backlink calculation still sees the deleted pages, but everything afterwards does not. However, it does not address the original bug report that started this whole thing, [[bugs/bestlink_returns_deleted_pages]]. Because there bestlink is run in the needsbuild hook. And that happens before backlink calculation, and so bestlink still returns deleted pages then. Also in the scan hook. If bestlink needs to work consistently during those hooks, a more involved fix will be needed.
* Moved the postscan hook to run on the raw html of a page, before the ↵Joey Hess2009-11-08
| | | | template is filled out. This improves the search plugin's indexing, since it will not include navigational elements from the page template or sidebar.
* Fix a bug introduced in the last version that caused ikiwiki to skip all ↵Joey Hess2009-10-21
| | | | files if a sourcedir of "./" was specified.
* Merge branch 'master' into dependency-typesJoey Hess2009-10-08
|\ | | | | | | | | | | | | Conflicts: IkiWiki.pm IkiWiki/Render.pm debian/changelog
| * Optimize away most expensive file prune calls, when refreshingJoey Hess2009-10-08
| | | | | | | | | | | | | | | | Benchmarking refresh of a a wiki with 25 thousand pages showed file_pruned() using most of the time. But, when refreshing, ikiwiki already knows about nearly all the files. So we can skip calling file_pruned() for those it knows about. While tricky to do, this sped up a refresh (that otherwise does no work) by 10-50%.
* | fix backlink new change detection codeJoey Hess2009-10-07
| |
* | typoJoey Hess2009-10-06
| |
* | fix support of a single dependency that combines links and exists typesJoey Hess2009-10-06
| | | | | | | | | | | | This is very common, and the code has to test each type differently, since the list of candidates to test, as well as the test, will vary per type. Much happier with this code now.
* | fix handling of links+content dependencyJoey Hess2009-10-06
| | | | | | | | Such a dependency is unlikely, but can happen.
* | refactor 3Joey Hess2009-10-06
| | | | | | | | Only left one new global
* | refresh refactor 2Joey Hess2009-10-06
| | | | | | | | killed one global