Hello

This patch includes more than just the title I put above: it includes the instructions to build the site using the patch (copy one more file) and it changes the way make website is called (if one copy the makefile there is no point in using the makefile from the git repository, or then, there is no point in copying -- or I missed something).

The solution is not texi based. Why not? because it is a patch to solve a problem that is not related with the new website, but with the old.

The idea is simple, just add an index.html file under /web/install/ that redirects to downloads.html.

The makefile code can be easily copied for other folders/pages that are hanging out there. I did not add them because I do not know if you like the solution.

If someone wants to test, it is easy: just backup the website, and give it a shot. It should not do any malicious thing.

You can also test it locally, but the redirect will not work, as I specified a absolute path.

Hope this can help.
If not, let me know how I can change to make it better.

Cheers
ambs
>From 5b0e4b5730591baf9546a730ff3d044cbedcb18b Mon Sep 17 00:00:00 2001
From: Alberto Simoes <a...@cpan.org>
Date: Wed, 21 Dec 2011 21:18:44 +0000
Subject: [PATCH] make redirect for old 'install' page

---
 Documentation/contributor/website-work.itexi |    3 ++-
 Documentation/web/server/redirect.template   |    7 +++++++
 make/website.make                            |   12 ++++++++++--
 3 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/web/server/redirect.template

diff --git a/Documentation/contributor/website-work.itexi 
b/Documentation/contributor/website-work.itexi
index ee645a2..b3b8484 100644
--- a/Documentation/contributor/website-work.itexi
+++ b/Documentation/contributor/website-work.itexi
@@ -112,6 +112,7 @@ cp $GIT/scripts/build/website_post.py $DEST/website_post.py
 cp $GIT/scripts/build/bib2texi.py $DEST/bib2texi.py
 cp $GIT/Documentation/web/server/lilypond.org.htaccess 
$DEST/lilypond.org.htaccess
 cp $GIT/Documentation/web/server/website-dir.htaccess 
$DEST/website-dir.htaccess
+cp $GIT/Documentation/web/server/redirect.template $DEST/redirect.template
 @end smallexample
 
 Delete your build directory (or maybe just rename your build
@@ -124,7 +125,7 @@ cd $HOME/lilypond
 Run
 
 @example
-make -f ../lilypond-git/make/website.make WEBSITE_ONLY_BUILD=1 \
+make -f website.make WEBSITE_ONLY_BUILD=1 \
   TOP_SRC_DIR=$HOME/lilypond-git/ \
   PYTHONPATH=$HOME/lilypond-git/python \
   TEXI2HTML_PROGRAM=texi2html \
diff --git a/Documentation/web/server/redirect.template 
b/Documentation/web/server/redirect.template
new file mode 100644
index 0000000..a3364f8
--- /dev/null
+++ b/Documentation/web/server/redirect.template
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="REFRESH" content="0;url=/[% PATH %]"></head>
+<body>
+</body>
+</html>
diff --git a/make/website.make b/make/website.make
index d6d9ef7..7ec0414 100644
--- a/make/website.make
+++ b/make/website.make
@@ -131,7 +131,7 @@ xref-files = $(MANUALS_BASE:%=$(OUT)/%.xref-map)
 
 .PHONY: website website-bibs website-css website-examples website-misc \
         website-pictures website-post website-test website-texinfo \
-        website-version website-xrefs check-setup
+        website-version website-xrefs check-setup website-redirects
 
 check-setup:
 ifeq ($(LILYPOND_WEB_MEDIA_GIT),)
@@ -139,7 +139,7 @@ ifeq ($(LILYPOND_WEB_MEDIA_GIT),)
        exit 1
 endif
 
-website: check-setup website-post website-examples website-pictures 
website-css website-misc
+website: check-setup website-post website-examples website-pictures 
website-css website-misc website-redirects
 
 website-bibs: website-version $(OUT) $(bib-files)
 
@@ -162,6 +162,7 @@ website-version: $(OUT) $(version-files)
 
 website-xrefs: website-version $(OUT) $(xref-files)
 
+website-redirects: $(OUT)/web/install/index.html
 
 #########
 ### Rules
@@ -188,6 +189,13 @@ $(bib-files): $(OUT)/%.itexi: 
$(top-src-dir)/Documentation/web/%.bib
                $(quiet-flag) \
                $<
 
+# some redirects
+$(OUT)/web/install/index.html: $(TRUSTED_DIR)/redirect.template
+       mkdir -p $(OUT)/web/install
+       sed -s 's/\[% PATH %\]/download.html/' \
+           $(TRUSTED_DIR)/redirect.template > $(OUT)/web/install/index.html
+       
+
 # Get xrefs for English tely manuals
 $(MANUALS_TELY:%.tely=$(OUT)/%.xref-map): $(OUT)/%.xref-map: 
$(top-src-dir)/Documentation/%.tely
        $(DO_TEXI_DEP) $(EXTRACT_TEXI_FILENAMES) $<
-- 
1.7.0.4

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to