From: Vincent Bernat
Date: Sun, 13 Jan 2013 00:07:50 +0000 (+0100)
Subject: web: fix how resources are located
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddc2faf562e0c83ea72d8e828dda66101b272004;p=thirdparty%2Flldpd.git
web: fix how resources are located
In Github pages, resources are under /lldpd. So, we use a specific
base for this.
---
diff --git a/content/index.html b/content/index.html
index 37fa6ce9..4d68faef 100644
--- a/content/index.html
+++ b/content/index.html
@@ -17,7 +17,7 @@ Unixes. It also supports some proprietary protocols.
- Download the latest version ([{{ resource.meta.latestversion }}][last]).
- Check the [list of features]([[features.html]]).
- - Learn [how to install _lldpd_]([[install.html]]).
+ - Learn [how to install _lldpd_]([[installation.html]]).
- Learn [how to configure and use _lldpd_]([[usage.html]]).
- [Get the code on GitHub](https://github.com/vincentbernat/lldpd).
- [Add issues and feature requests](https://github.com/vincentbernat/lldpd/issues).
diff --git a/fabfile.py b/fabfile.py
index 6bc1e737..eda481e4 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -26,7 +26,8 @@ def build():
"""Build production content"""
# Generate the website from scratch
local("rm -rf deploy")
- gen()
+ conf = "site-production.yaml"
+ _hyde('gen -c %s' % conf)
# Compute hash for media files
with lcd("deploy"):
@@ -48,7 +49,7 @@ def build():
# Fix HTML
local(r"find . -name '*.html' -type f -print0 | xargs -r0 sed -i "
'"'
- r"s@\([\"']\)%s\1@\1%s\1@g"
+ r"s@\([\"']\)\([^\"']*\)%s\1@\1\2%s\1@g"
'"' % (f, newname))
lldpdir = os.getcwd()
diff --git a/layout/menu.j2 b/layout/menu.j2
index c61ddc91..90b68b49 100644
--- a/layout/menu.j2
+++ b/layout/menu.j2
@@ -6,10 +6,10 @@
diff --git a/site-production.yaml b/site-production.yaml
new file mode 100644
index 00000000..2fd4fd18
--- /dev/null
+++ b/site-production.yaml
@@ -0,0 +1,4 @@
+extends: "site.yaml"
+mode: production
+base_url: /lldpd
+media_url: /lldpd/media
diff --git a/site.yaml b/site.yaml
index a7ac4d99..fe6dacc2 100644
--- a/site.yaml
+++ b/site.yaml
@@ -1,6 +1,6 @@
-mode: production
+mode: development
media_root: media
-media_url: media
+media_url: /media
base_url: /
plugins:
- hyde.ext.plugins.meta.MetaPlugin