aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-08-04 20:48:44 +0200
committerAdrian Kummerlaender2014-08-04 20:48:44 +0200
commit63059208c882525c99a6b0e1484148deb9f1ba1b (patch)
treedb77d94bf23b4831e3f697c1b2408dbabb8f9079
parent06fb15b5a600cd0b6de5018a3c5d8b993ab53a0d (diff)
downloadblog.kummerlaender.eu-63059208c882525c99a6b0e1484148deb9f1ba1b.tar
blog.kummerlaender.eu-63059208c882525c99a6b0e1484148deb9f1ba1b.tar.gz
blog.kummerlaender.eu-63059208c882525c99a6b0e1484148deb9f1ba1b.tar.bz2
blog.kummerlaender.eu-63059208c882525c99a6b0e1484148deb9f1ba1b.tar.lz
blog.kummerlaender.eu-63059208c882525c99a6b0e1484148deb9f1ba1b.tar.xz
blog.kummerlaender.eu-63059208c882525c99a6b0e1484148deb9f1ba1b.tar.zst
blog.kummerlaender.eu-63059208c882525c99a6b0e1484148deb9f1ba1b.zip
Changed base url and url scheme
* base url is now a local webserver for more realistic testing ** i.e. otherwise the atom feed is not served correctly * article, page, tag and stream pages are now generated as "index.html" inside appropriately named directories ** this is needed for pretty urls that actually work
-rw-r--r--source/00_content/meta.xml2
-rw-r--r--source/99_result/archive.xsl2
-rw-r--r--source/99_result/article/article.xsl2
-rw-r--r--source/99_result/page/page.xsl6
-rw-r--r--source/99_result/stream.xsl2
-rw-r--r--source/99_result/tag/tag.xsl2
-rw-r--r--utility/master.xsl4
7 files changed, 10 insertions, 10 deletions
diff --git a/source/00_content/meta.xml b/source/00_content/meta.xml
index dba506d..ac81b8d 100644
--- a/source/00_content/meta.xml
+++ b/source/00_content/meta.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<meta>
<title>/home/adrian</title>
- <url>/home/common/projects/dev/static_site_generator/target/99_result</url>
+ <url>http://localhost:8000</url>
</meta>
diff --git a/source/99_result/archive.xsl b/source/99_result/archive.xsl
index a920294..476b321 100644
--- a/source/99_result/archive.xsl
+++ b/source/99_result/archive.xsl
@@ -9,7 +9,7 @@
<xsl:variable name="meta">
<datasource type="main" mode="full" source="target/03_meta/articles.xml" target="articles"/>
<datasource type="support" mode="full" source="target/03_meta/meta.xml" target="meta"/>
- <target mode="plain" value="archive"/>
+ <target mode="plain" value="archive/index.html"/>
</xsl:variable>
<xsl:template name="title-text">Archive</xsl:template>
diff --git a/source/99_result/article/article.xsl b/source/99_result/article/article.xsl
index 0b2cc12..a82dcb1 100644
--- a/source/99_result/article/article.xsl
+++ b/source/99_result/article/article.xsl
@@ -10,7 +10,7 @@
<xsl:variable name="meta">
<datasource type="main" mode="iterate" source="target/02_data/articles.xml" target="article"/>
<datasource type="support" mode="full" source="target/03_meta/meta.xml" target="meta"/>
- <target mode="xpath" value="xalan:nodeset($datasource)/datasource/article/entry/@handle"/>
+ <target mode="xpath" value="concat(xalan:nodeset($datasource)/datasource/article/entry/@handle, '/index.html')"/>
</xsl:variable>
<xsl:template name="title-text">
diff --git a/source/99_result/page/page.xsl b/source/99_result/page/page.xsl
index dc8c9f2..fcf217d 100644
--- a/source/99_result/page/page.xsl
+++ b/source/99_result/page/page.xsl
@@ -7,9 +7,9 @@
<xsl:include href="[utility/master.xsl]"/>
<xsl:variable name="meta">
- <datasource type="main" mode="iterate" source="target/02_data/pages.xml" target="page"/>
- <datasource type="support" mode="full" source="source/00_content/meta.xml" target="meta"/>
- <target mode="xpath" value="xalan:nodeset($datasource)/datasource/page/entry/@handle"/>
+ <datasource type="main" mode="iterate" source="target/02_data/pages.xml" target="page"/>
+ <datasource type="support" mode="full" source="target/03_meta/meta.xml" target="meta"/>
+ <target mode="xpath" value="concat(xalan:nodeset($datasource)/datasource/page/entry/@handle, '/index.html')"/>
</xsl:variable>
<xsl:template name="title-text">
diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl
index 2fa6d4e..4bed923 100644
--- a/source/99_result/stream.xsl
+++ b/source/99_result/stream.xsl
@@ -11,7 +11,7 @@
<datasource type="main" mode="iterate" source="target/03_meta/paginated_articles.xml" target="page"/>
<datasource type="support" mode="full" source="target/03_meta/meta.xml" target="meta"/>
<datasource type="support" mode="full" source="target/02_data/articles.xml" target="articles"/>
- <target mode="xpath" value="xalan:nodeset($datasource)/datasource/page/entry/@index"/>
+ <target mode="xpath" value="concat(xalan:nodeset($datasource)/datasource/page/entry/@index, '/index.html')"/>
</xsl:variable>
<xsl:template name="title-text">
diff --git a/source/99_result/tag/tag.xsl b/source/99_result/tag/tag.xsl
index 2e4423e..8eb6ca0 100644
--- a/source/99_result/tag/tag.xsl
+++ b/source/99_result/tag/tag.xsl
@@ -9,7 +9,7 @@
<xsl:variable name="meta">
<datasource type="main" mode="iterate" source="target/03_meta/tags.xml" target="tag"/>
<datasource type="support" mode="full" source="target/03_meta/meta.xml" target="meta"/>
- <target mode="xpath" value="xalan:nodeset($datasource)/datasource/tag/entry/@handle"/>
+ <target mode="xpath" value="concat(xalan:nodeset($datasource)/datasource/tag/entry/@handle, '/index.html')"/>
</xsl:variable>
<xsl:template name="title-text">
diff --git a/utility/master.xsl b/utility/master.xsl
index cda2575..c682072 100644
--- a/utility/master.xsl
+++ b/utility/master.xsl
@@ -36,7 +36,7 @@
<meta name="robots" content="all"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
- <title><xsl:call-template name="title-text"/> @ /home/adrian</title>
+ <title><xsl:call-template name="title-text"/> @ <xsl:value-of select="$root/meta/title"/></title>
<link rel="stylesheet" type="text/css" href="{$url}/main.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
@@ -45,7 +45,7 @@
<div id="wrapper">
<div id="content">
<div id="nav_wrap">
- <h1><xsl:value-of select="datasource/meta/title"/></h1>
+ <h1><xsl:value-of select="$root/meta/title"/></h1>
<ul>
<li><a href="{$url}/0">Start</a></li>
<li><a href="{$url}/archive">Archive</a></li>