]> sipb.mit.edu Git - ikiwiki.git/commitdiff
html5 option
authorJoey Hess <joey@kitenet.net>
Sun, 2 May 2010 00:40:31 +0000 (20:40 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 2 May 2010 00:49:18 +0000 (20:49 -0400)
* 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.

IkiWiki.pm
IkiWiki/Render.pm
debian/changelog
doc/bugs/html5_support.mdwn
doc/roadmap.mdwn
templates/misc.tmpl
templates/page.tmpl

index 5ff1a5ae65fbfcd796550a1cf478272986ce9550..1e11d34e23542b79cdc87e0cd1cb7bef0aa984da 100644 (file)
@@ -234,6 +234,13 @@ sub getsetup () {
                safe => 1,
                rebuild => 1,
        },
+       html5 => {
+               type => "boolean",
+               default => 0,
+               description => "generate HTML5? (experimental)",
+               safe => 1,
+               rebuild => 1,
+       },
        sslcookie => {
                type => "boolean",
                default => 0,
@@ -1725,6 +1732,7 @@ sub misctemplate ($$;@) {
                wikiname => $config{wikiname},
                pagebody => $pagebody,
                baseurl => baseurl(),
+               html5 => $config{html5},
                @_,
        );
        run_hooks(pagetemplate => sub {
index 7e3d7886106084f982c89224ecca6f768a9f36b2..5923f5e74459e53933cc6ee2112592449e2f299a 100644 (file)
@@ -138,6 +138,7 @@ sub genpage ($$) {
                mtime => displaytime($pagemtime{$page}),
                ctime => displaytime($pagectime{$page}),
                baseurl => baseurl($page),
+               html5 => $config{html5},
        );
 
        run_hooks(pagetemplate => sub {
index 8bf6f89b617cb69cdda44222e5798f702889b7d4..fc5a6124bbe3513a8b9e8f13bec2dc0486b1223d 100644 (file)
@@ -1,10 +1,12 @@
 ikiwiki (3.20100428) UNRELEASED; urgency=low
 
-  * template: Fix typo.
   * TMPL_INCLUDE re-enabled for templates read from the templatedir.
     (But not in-wiki templates.)
   * Version dependency on liburi-perl to >= 1.36; previous versions
     did not support building urls from utf-8 strings. Closes: #579713
+  * 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.
   * htmlscrubber: Allow html5 semantic tags: section, nav, article, aside
     hgroup, header, footer, figure, figcaption, time, mark
   * htmlscrubber: Also allow some other html5 tags: canvas, progress, meter,
@@ -16,6 +18,7 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low
     and form. (Also the form* override attributes for input and buttons.)
   * htmlscrubber: Allow additional misc html5 attributes: reversed,
     spellcheck, and hidden.
+  * template: Fix typo.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 27 Apr 2010 12:10:51 -0400
 
index 2d27ac8036459845933579f418b622d897bd849a..bf782a3bf82c8af4df42175c651e0c758d04c22b 100644 (file)
@@ -20,13 +20,14 @@ HTML5](http://www.w3.org/TR/html5-diff/).
 >    What has been done so far, can be extended. Basically works 
 >    in browsers, if you don't care about standards. A good prerequisite
 >    for anything else, anyway.
-> 2. Switch to html5 in eg, ikiwiki 4; users have to deal with
+> 2. Have both a html5 and a xhtml mode, allow user to select.
+> 3. Switch to html5 in eg, ikiwiki 4; users have to deal with
 >    any custom markup on their pages/templates that breaks then.
-> 3. Have both a html5 and a xhtml mode, allow user to select.
->
-> The third option seems fairly tractable from what I see here and in 
+> 
+> The second option seems fairly tractable from what I see here and in 
 > your branch. You made only relatively minor changes to 10 templates.
-> It would probably not be too dreadful to put them in ifdefs.
+> It would probably not be too dreadful to put them in ifdefs. I've made a
+> small start at doing that.
 > 
 > Some of your changes are obvious, like using the new `time` and
 > and `article` elements. Others less so, and I'm particularly
@@ -70,6 +71,7 @@ HTML5](http://www.w3.org/TR/html5-diff/).
 >   [[this_todo|Add_label_to_search_form_input_field]]
 > * Use details tag instead of the javascript in the toggle plugin. 
 >   (Need to wait on browser support probably.)
+> 
 > --[[Joey]] 
 
 # htmlscrubber.pm needs to not scrub new HTML5 elements
index c126fd5851131e0b0d83825f5df59ba069f99350..4b5f01c45a51382c8ab0aa625c26a2708637b34e 100644 (file)
@@ -80,6 +80,7 @@ Probably incomplete list:
 * YADA format setup files per default?
 * Enable tagbase by default (so that tag autocreation will work by default).
   Note that this is already done for wikis created by `auto-blog.setup`.
+* html5 on by default (some day..)
 
 In general, we try to use [[ikiwiki-transition]] or forced rebuilds on
 upgrade to deal with changes that break compatability. Some things that
index 535a6f06ba57200f700108b331c236e898a02b95..0b7fefa087e8726a38765ed4b0df46707512903b 100644 (file)
@@ -1,6 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<TMPL_IF HTML5><!DOCTYPE html>
+<html>
+<TMPL_ELSE><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
+</TMPL_IF>
 <head>
 <TMPL_IF NAME="FORCEBASEURL">
 <base href="<TMPL_VAR FORCEBASEURL>" />
index 7e850a56bacd93549d07f4920e4bc35b9507f414..661d4a51501d6ba7706312a5af1dea477860322f 100644 (file)
@@ -1,6 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<TMPL_IF HTML5><!DOCTYPE html>
+<html>
+<TMPL_ELSE><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
+</TMPL_IF>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta http-equiv="Cache-Control" content="must-revalidate" />