Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Sun, 15 Aug 2010 15:54:16 +0000 (11:54 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 15 Aug 2010 15:54:16 +0000 (11:54 -0400)
doc/bugs/po:_po_files_instead_of_html_files.mdwn [new file with mode: 0644]
doc/forum/multi_domain_setup_possible__63__.mdwn [new file with mode: 0644]
doc/tips/Importing_posts_from_Wordpress.mdwn

diff --git a/doc/bugs/po:_po_files_instead_of_html_files.mdwn b/doc/bugs/po:_po_files_instead_of_html_files.mdwn
new file mode 100644 (file)
index 0000000..4b08c7c
--- /dev/null
@@ -0,0 +1,4 @@
+On the home page of my wiki, when i click on the link "ikiwiki", i get the english file instead of the french file.  
+At the bottom of this page, there is the "Links" line:  
+Links: index index.fr templates templates.fr  
+When i click on "templates.fr", i get the po.file instead of html.
diff --git a/doc/forum/multi_domain_setup_possible__63__.mdwn b/doc/forum/multi_domain_setup_possible__63__.mdwn
new file mode 100644 (file)
index 0000000..01b31aa
--- /dev/null
@@ -0,0 +1,15 @@
+Hi! I am searching for a replacement of my blog and webpages made off static HTML with just some custom PHP around it for years already. ikiwiki seems to be one of the hot candidates, since it uses a RCS.
+
+I would like to have a multi domain setup like this:
+
+- myname.private.de => more of a personal page
+- professional.de => more of my professional work related page
+- and possibly others
+
+Now when I write a blog entry about some Linux, Debian or KDE stuff, I possibly would like to have it shown on my private and my professional domain.
+
+And I might like to use some kind of inter wiki links now and then.
+
+Is such a setup possible? I thought about have a big wiki with Apache serving sub directories from it under different domains, but then wiki links like would not work.
+
+Maybe having the same blog entry, same content on several domains is not such a hot idea, but as long as I do not see a problem with it, I'd like to do it.
index af8e4005da57f0749161f17d51fb45db2e4a3ba2..1ea82b8626a3eb5991e36b4a5d825dafd9886c4b 100644 (file)
@@ -15,3 +15,88 @@ I include a modified version of this script. This version includes the ability t
 -- [[users/simonraven]]
 
 [[ikiwiki-wordpress-import]]
+
+-----
+
+Perhaps slightly insane, but here's an XSLT style sheet that handles my pages.  It's basic, but sufficient to get started.
+Note that I had to break up the ikiwiki meta strings to post this.
+
+-- JasonRiedy
+
+       <?xml version="1.0" encoding="UTF-8"?>
+       <xsl:stylesheet version="2.0"
+         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+         xmlns:content="http://purl.org/rss/1.0/modules/content/"
+         xmlns:wp="http://wordpress.org/export/1.0/">
+         
+       <xsl:output method="text"/>
+       <xsl:output method="text" name="txt"/>
+       
+       <xsl:variable name='newline'><xsl:text>
+       </xsl:text></xsl:variable>
+       
+       <xsl:template match="channel">
+         <xsl:apply-templates select="item[wp:post_type = 'post']"/>
+       </xsl:template>
+       
+       <xsl:template match="item">
+         <xsl:variable name="idnum" select="format-number(wp:post_id,'0000')" />
+         <xsl:variable name="basename"
+                       select="concat('wp-posts/post-',$idnum)" />
+         <xsl:variable name="filename"
+                       select="concat($basename, '.html')" />
+         <xsl:text>Creating </xsl:text>
+         <xsl:value-of select="concat($filename, $newline)" />
+         <xsl:result-document href="{$filename}" format="txt">
+           <xsl:text>[[</xsl:text><xsl:text>meta title="</xsl:text>
+           <xsl:value-of select="replace(title, '&quot;', '&amp;ldquo;')"/>
+           <xsl:text>"]]</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:text>[[</xsl:text><xsl:text>meta date="</xsl:text>
+           <xsl:value-of select="pubDate"/>
+           <xsl:text>"]]</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:text>[[</xsl:text><xsl:text>meta updated="</xsl:text>
+           <xsl:value-of select="pubDate"/>
+           <xsl:text>"]]</xsl:text> <xsl:value-of select="$newline"/>
+           <xsl:value-of select="$newline"/>
+           <xsl:value-of select="content:encoded"/>
+           <xsl:text>
+       
+       </xsl:text>
+           <xsl:apply-templates select="category[@domain='tag' and not(@nicename)]">
+             <xsl:sort select="name()"/>
+           </xsl:apply-templates>
+         </xsl:result-document>
+         <xsl:apply-templates select="wp:comment">
+           <xsl:sort select="date"/>
+           <xsl:with-param name="basename">$basename</xsl:with-param>
+         </xsl:apply-templates>
+       </xsl:template>
+       
+       <xsl:template match="wp:comment">
+         <xsl:param name="basename"/>
+         <xsl:variable name="cnum" select="format-number(wp:comment_id, '000')" />
+         <xsl:variable name="filename" select="concat($basename, '/comment_', $cnum, '._comment')"/>
+         <xsl:variable name="nickname" select="concat(' nickname=&quot;', wp:comment_author, '&quot;')" />
+         <xsl:variable name="username" select="concat(' username=&quot;', wp:comment_author_url, '&quot;')" />
+         <xsl:variable name="ip" select="concat(' ip=&quot;', wp:comment_author_IP, '&quot;')" />
+         <xsl:variable name="date" select="concat(' date=&quot;', wp:comment_date_gmt, '&quot;')" />
+         <xsl:result-document href="{$filename}" format="txt">
+           <xsl:text>[[</xsl:text><xsl:text>comment format=html</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:value-of select="$nickname"/>
+           <xsl:value-of select="$username"/>
+           <xsl:value-of select="$ip"/>
+           <xsl:value-of select="$date"/>
+           <xsl:text>subject=""</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:text>content="""</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:value-of select="wp:comment_content"/>
+           <xsl:value-of select="$newline"/>
+           <xsl:text>"""]]</xsl:text><xsl:value-of select="$newline"/>
+         </xsl:result-document>
+       </xsl:template>
+       
+       <xsl:template match="category">
+         <xsl:text>[</xsl:text><xsl:text>[</xsl:text><xsl:text>!tag "</xsl:text><xsl:value-of select="."/><xsl:text>"]]</xsl:text>
+         <xsl:value-of select="$newline"/>
+       </xsl:template>
+       
+       </xsl:stylesheet>