]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn
(no commit message)
[ikiwiki.git] / doc / forum / transition_from_handwritten_html_to_ikiwiki.mdwn
index 6ea0f5841d574f8a32784d414a2c5f990e6c5c84..98fb0073668697b866999172b33a8bc026c29fe6 100644 (file)
@@ -15,3 +15,59 @@ Thanks,
 > 
 > It sounds like you want `--no-usedirs`, or the corresponding `usedirs => 0,`
 > option in your setup file. See [[usage]] for more information. -- [[Jon]]
 > 
 > It sounds like you want `--no-usedirs`, or the corresponding `usedirs => 0,`
 > option in your setup file. See [[usage]] for more information. -- [[Jon]]
+
+Thanks, usedirs seems to be just the thing I need.
+
+-Mikko
+
+Actually usedirs didn't do exactly what I want. The old site contains both
+somedir/index.html and somedir/somename.html files. With html plugin and 
+indexpages=1 the somedir/index.html pages are accessed correctly but 
+somedir/somefile.html files not.
+
+With usedirs => 0, somedir/somename.html pages are accessed correctly but
+somedir/index.html pages are not. Actually the handwritten somedir/index.html
+files were removed on a rebuild:
+
+    $ ikiwiki -setup blog.setup -rebuild -v
+    ...
+    removing test2/index.html, no longer built by test2
+
+Is there a way for both index.html and somename.html raw html files to show up through ikiwki?
+
+-Mikko
+
+> I think you want usedirs => 0 and indexpages => 0?
+>
+> What IkiWiki does is to map the source filename to an abstract page name
+> (indexpages alters how this is done), then map the abstract page name
+> to an output filename (usedirs alters how this is done).
+>
+> The three columns here are input, abstract page name, output:
+>
+>     usedirs => 0, indexpages => 0:
+>         a/index.html -> a/index -> a/index.html
+>         a/b.html -> a/b -> a/b.html
+>     usedirs => 1, indexpages => 0:
+>         a/index.html -> a/index -> a/index/index.html
+>         a/b.html -> a/b -> a/b/index.html
+>     usedirs => 0, indexpages => 1:
+>         a/index.html -> a -> a.html
+>         a/b.html -> a/b -> a/b.html
+>     usedirs => 1, indexpages => 1:
+>         a/index.html -> a -> a/index.html
+>         a/b.html -> a/b -> a/b/index.html
+>
+> The abstract page name is what you use in wikilinks and pagespecs.
+>
+> What I would suggest you do instead, though, is break your URLs once
+> (but put in Apache redirections), to get everything to be consistent;
+> I strongly recommend usedirs => 1 and indexpages => 0, then always
+> advertising URLs that look like <http://www.example.com/a/b/>. This is
+> what ikiwiki.info itself does, for instance. --[[smcv]]
+
+Thanks for the explanation. usedirs => 0 and indexpages => 0 does the trick,
+but I'll try to setup mod_rewrite from foo/bar.html to foo/bar in the final 
+conversion.
+
+-Mikko