lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding old website /web/install page (issue 5500069)


From: hashashin
Subject: Re: Hiding old website /web/install page (issue 5500069)
Date: Thu, 22 Dec 2011 16:10:39 +0000

Reviewers: Graham Percival,


http://codereview.appspot.com/5500069/diff/1/Documentation/contributor/website-work.itexi
File Documentation/contributor/website-work.itexi (right):

http://codereview.appspot.com/5500069/diff/1/Documentation/contributor/website-work.itexi#newcode128
Documentation/contributor/website-work.itexi:128: make -f website.make
WEBSITE_ONLY_BUILD=1 \
Note that this does not change any script, JUST documentation. If this
documentation says you need to copy website.make, then website.make IS
THERE.

If you copy from this page every time you update your server, then at
least remove the line 105 from the documentation, as that file is then
not used.

Description:
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.


Please review this at http://codereview.appspot.com/5500069/

Affected files:
  M Documentation/contributor/website-work.itexi
  A Documentation/web/server/redirect.template
  M make/website.make


Index: Documentation/contributor/website-work.itexi
diff --git a/Documentation/contributor/website-work.itexi b/Documentation/contributor/website-work.itexi index ee645a2485daea8c5e815882085371faf4431bf0..b3b84846e86f6ce7ccbd6531ab32b165a67f47db 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 \
Index: Documentation/web/server/redirect.template
diff --git a/Documentation/web/server/redirect.template b/Documentation/web/server/redirect.template
new file mode 100644
index 0000000000000000000000000000000000000000..a3364f8503966b8afa54c736e35160ade6d5631c
--- /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>
Index: make/website.make
diff --git a/make/website.make b/make/website.make
index d6d9ef7a12a09b921b922214370820e51edae311..7ec04141f5cc39a8e1fe6a46f7698a634c8345ca 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) $<





reply via email to

[Prev in Thread] Current Thread [Next in Thread]