Date: Thu, 16 May 2002 13:27:31 +0100 From: Ceri Davies <setantae@submonkey.net> To: Nik Clayton <nik@freebsd.org> Cc: doc@freebsd.org Subject: Re: Links within the Handbook Message-ID: <20020516122731.GA23677@submonkey.net> In-Reply-To: <20020515212819.GA2665@submonkey.net> References: <20020507161357.GA15017@submonkey.net> <20020507164915.GA55559@submonkey.net> <20020509075553.B83030@canyon.nothing-going-on.org> <20020515212819.GA2665@submonkey.net>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Wed, May 15, 2002 at 10:28:19PM +0100, Ceri Davies wrote:
> On Thu, May 09, 2002 at 07:55:53AM +0100, Nik Clayton wrote:
> >
> > I wonder whether, instead of symlinking FAQ/ and handbook/, we could
> > just install index.html files that have the necessary META headers to
> > redirect the user to ../doc/en_US.ISO8859-1/books/... as necessary?
> >
> > That should do the right thing, and it should work irrespective of the
> > web server configuration.
>
> Agreed. I'm working on it, although it may prove too much for me (I expect
> to need help on the Makefile stuff).
Attached is a patch which does this, and works (for a new installation).
However, it doesn't attempt to deal with the fact that existing installations
have a symlink at /FAQ and this version makes a directory at /FAQ.
Is this something that install can deal with on it's own ? I don't know how
to deal with this, and am not sure that it's safe for me to try given that I
don't really understand make yet.
Also, I'm not sure how long the redirect should be. I've gone for 3 seconds
because anything higher seemed too long, and anything lower seemed, well, too
short.
Oh, and I fully admit to having thrown this together.
Anyway, comments appreciated, but patches would be best.
Ceri
--
get the cool shoe shine
[-- Attachment #2 --]
diff -ruN www.old/en/FAQ/Makefile www/en/FAQ/Makefile
--- www.old/en/FAQ/Makefile Mon Oct 29 10:14:31 2001
+++ www/en/FAQ/Makefile Thu May 16 12:40:00 2002
@@ -1,8 +1,6 @@
+# $FreeBSD$
#
-# $FreeBSD: www/en/FAQ/Makefile,v 1.7 2001/10/29 10:14:31 murray Exp $
-#
-# Build the FreeBSD FAQ *outside* of the www tree, and install it
-# in to the right place as necessary.
+# Makefile for the top level FAQ directory
.if exists(../Makefile.conf)
.include "../Makefile.conf"
@@ -11,17 +9,6 @@
.include "../Makefile.inc"
.endif
-# At build time, we have to link to the doc/ directory at the same level
-# as the www/ tree.
-all:
- ${LN} -fs ${.OBJDIR}/../../../doc/en_US.ISO8859-1/books/faq/* .
-
-# At install time the www/en/doc/ directory has been populated, so we can
-# link in to there instead.
-install:
- [ -d ${DOCINSTALLDIR} ] || ${MKDIR} ${DOCINSTALLDIR}
- cd ${DOCINSTALLDIR}; \
- ${LN} -fs ../doc/en_US.ISO8859-1/books/faq/* ${DOCINSTALLDIR}
+DOCS= index.sgml
.include "${WEB_PREFIX}/share/mk/web.site.mk"
-
diff -ruN www.old/en/FAQ/includes.sgml www/en/FAQ/includes.sgml
--- www.old/en/FAQ/includes.sgml Thu Jan 1 01:00:00 1970
+++ www/en/FAQ/includes.sgml Thu May 16 13:17:35 2002
@@ -0,0 +1,51 @@
+<!-- $FreeBSD$ -->
+<!--
+ Base is the absolute URL for the given page, minus the actual page
+ part. It should either be specified as a fully qualified URL, or
+ relative to the server root. It should be defined in the prolog
+ <em>before</em> including this file if the page does not live at the
+ default location below.
+
+ When making a link, use <a href="&base;/mypage.html">foo</a> and
+ &base; will be expanded appropriately. Base is also used in the
+ definition of standard boilerplate entities in this file, so be sure
+ base is correct!
+-->
+
+<!ENTITY base CDATA "..">
+
+<!-- Non-standard headers and footers -->
+
+<!ENTITY header '<head><title>&title;</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Refresh" content="3; url=&base;/doc/en_US.ISO8859-1/books/faq/">
+<meta name="MSSmartTagsPreventParsing" content="TRUE">
+<link rel="stylesheet" type="text/css" href="&stylesheet;"></head><body
+text="#000000" bgcolor="#FFFFFF" alink="#FFCC33"><img
+src="&base;/gifs/bar.gif" alt="Navigation Bar" width="565" height="33" border="0" usemap="#bar">
+<h1 align="left"><font color="#660000">&title;</font></h1><br clear="all">'>
+
+<!ENTITY footer '<HR NOSHADE>
+<address>&author;<br>&date;</address>'>
+
+<!-- Components making up the standard headers and footers. -->
+<!-- Override in the prolog <em>before</em> including this -->
+<!-- file if necessary. -->
+<!ENTITY copyright 'Copyright © 1995-2002 The FreeBSD Project.
+ All rights reserved.'>
+<!ENTITY email 'freebsd-questions'>
+<!ENTITY author '<a href="&base;/mailto.html">&email@FreeBSD.ORG</a><br>
+ ©right;'>
+<!ENTITY date ''>
+<!ENTITY home '<a href="&base;/index.html"><img src="&base;/gifs/home.gif"
+ alt="FreeBSD Home Page" border="0" align="right" width="101" height="33"></a>'>
+<!ENTITY stylesheet '&base;/freebsd.css'>
+
+<!--
+ Local Variables:
+ mode: sgml
+ sgml-indent-data: t
+ sgml-omittag: nil
+ sgml-always-quote-attributes: t
+ End:
+-->
diff -ruN www.old/en/FAQ/index.sgml www/en/FAQ/index.sgml
--- www.old/en/FAQ/index.sgml Thu Jan 1 01:00:00 1970
+++ www/en/FAQ/index.sgml Thu May 16 13:08:12 2002
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" [
+<!ENTITY date "$FreeBSD$">
+<!ENTITY title "Frequently Asked Questions for FreeBSD 2.X, 3.X and 4.X">
+<!ENTITY % includes SYSTEM "includes.sgml"> %includes;
+]>
+
+<html>
+ &header;
+
+ <h1>Redirection in progress</h1>
+
+ <blockquote>
+ <p>If your browser does not automatically redirect you, please click
+ <a href="&base;/doc/en_US.ISO8859-1/books/faq/">here</a>.</p>
+ </blockquote>
+
+ &footer;
+ </body>
+</html>
+
+<!--
+ Local Variables:
+ mode: sgml
+ sgml-indent-data: t
+ sgml-omittag: nil
+ sgml-always-quote-attributes: t
+ End:
+-->
diff -ruN www.old/en/Makefile www/en/Makefile
--- www.old/en/Makefile Thu May 9 14:07:12 2002
+++ www/en/Makefile Thu May 16 12:45:36 2002
@@ -36,6 +36,8 @@
SUBDIR+= docproj
SUBDIR+= news
SUBDIR+= advocacy
+SUBDIR+= FAQ
+SUBDIR+= handbook
SUBDIR+= events
SUBDIR+= internal
@@ -72,8 +74,6 @@
WEB_LANG?= ja es ru zh de
-COOKIE= FAQ handbook
-
# Non-English
.if !defined(ENGLISH_ONLY) || empty(ENGLISH_ONLY)
@@ -94,26 +94,6 @@
.if !defined(NO_TIDY)
-${TIDY} ${TIDYOPTS} index.html
.endif
-
-# Handle the FAQ/ and handbook/ directories specially.
-FAQ:
- ${LN} -fs ${.OBJDIR}/../../doc/en_US.ISO8859-1/books/faq FAQ
-
-handbook:
- ${LN} -fs ${.OBJDIR}/../../doc/en_US.ISO8859-1/books/handbook handbook
-
-# In "make obj" case FAQ and handbook are symlinks and have to be removed
-# at "make clean"
-.if ${.OBJDIR} != ${.CURDIR}
-CLEANFILES+= FAQ
-CLEANFILES+= handbook
-.endif
-
-afterinstall:
- cd ${DOCINSTALLDIR}; \
- ${LN} -fs doc/en_US.ISO8859-1/books/faq ${DOCINSTALLDIR}/FAQ
- cd ${DOCINSTALLDIR}; \
- ${LN} -fs doc/en_US.ISO8859-1/books/handbook ${DOCINSTALLDIR}/handbook
LINBOT?= ${PREFIX}/bin/linbot
LINBOTOPTS?= -ab
diff -ruN www.old/en/handbook/Makefile www/en/handbook/Makefile
--- www.old/en/handbook/Makefile Mon Oct 29 10:14:31 2001
+++ www/en/handbook/Makefile Thu May 16 12:42:57 2002
@@ -1,6 +1,6 @@
+# $FreeBSD$
#
-# $FreeBSD: www/en/handbook/Makefile,v 1.8 2001/10/29 10:14:31 murray Exp $
-#
+# Makefile for the top level Handbook directory
.if exists(../Makefile.conf)
.include "../Makefile.conf"
@@ -9,18 +9,6 @@
.include "../Makefile.inc"
.endif
-# At build time, we have to link to the doc/ directory at the same level
-# as the www/ tree.
-all:
- ${LN} -fs ${.OBJDIR}/../../../doc/en_US.ISO8859-1/books/handbook/* .
-
-# At install time the ../doc/ directory has been populated, so we can
-# link in to there instead.
-install:
- [ -d ${DOCINSTALLDIR} ] || ${MKDIR} ${DOCINSTALLDIR}
- cd ${DOCINSTALLDIR}; \
- ${LN} -fs ../doc/en_US.ISO8859-1/books/handbook/* \
- ${DOCINSTALLDIR}
+DOCS= index.sgml
.include "${WEB_PREFIX}/share/mk/web.site.mk"
-
diff -ruN www.old/en/handbook/includes.sgml www/en/handbook/includes.sgml
--- www.old/en/handbook/includes.sgml Thu Jan 1 01:00:00 1970
+++ www/en/handbook/includes.sgml Thu May 16 13:17:45 2002
@@ -0,0 +1,51 @@
+<!-- $FreeBSD$ -->
+<!--
+ Base is the absolute URL for the given page, minus the actual page
+ part. It should either be specified as a fully qualified URL, or
+ relative to the server root. It should be defined in the prolog
+ <em>before</em> including this file if the page does not live at the
+ default location below.
+
+ When making a link, use <a href="&base;/mypage.html">foo</a> and
+ &base; will be expanded appropriately. Base is also used in the
+ definition of standard boilerplate entities in this file, so be sure
+ base is correct!
+-->
+
+<!ENTITY base CDATA "..">
+
+<!-- Non-standard headers and footers -->
+
+<!ENTITY header '<head><title>&title;</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Refresh" content="3; url=&base;/doc/en_US.ISO8859-1/books/faq/">
+<meta name="MSSmartTagsPreventParsing" content="TRUE">
+<link rel="stylesheet" type="text/css" href="&stylesheet;"></head><body
+text="#000000" bgcolor="#FFFFFF" alink="#FFCC33"><img
+src="&base;/gifs/bar.gif" alt="Navigation Bar" width="565" height="33" border="0" usemap="#bar">
+<h1 align="left"><font color="#660000">&title;</font></h1><br clear="all">'>
+
+<!ENTITY footer '<HR NOSHADE>
+<address>&author;<br>&date;</address>'>
+
+<!-- Components making up the standard headers and footers. -->
+<!-- Override in the prolog <em>before</em> including this -->
+<!-- file if necessary. -->
+<!ENTITY copyright 'Copyright © 1995-2002 The FreeBSD Project.
+ All rights reserved.'>
+<!ENTITY email 'freebsd-questions'>
+<!ENTITY author '<a href="&base;/mailto.html">&email@FreeBSD.ORG</a><br>
+ ©right;'>
+<!ENTITY date ''>
+<!ENTITY home '<a href="&base;/index.html"><img src="&base;/gifs/home.gif"
+ alt="FreeBSD Home Page" border="0" align="right" width="101" height="33"></a>'>
+<!ENTITY stylesheet '&base;/freebsd.css'>
+
+<!--
+ Local Variables:
+ mode: sgml
+ sgml-indent-data: t
+ sgml-omittag: nil
+ sgml-always-quote-attributes: t
+ End:
+-->
diff -ruN www.old/en/handbook/index.sgml www/en/handbook/index.sgml
--- www.old/en/handbook/index.sgml Thu Jan 1 01:00:00 1970
+++ www/en/handbook/index.sgml Thu May 16 13:09:49 2002
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" [
+<!ENTITY date "$FreeBSD$">
+<!ENTITY title "FreeBSD Handbook">
+<!ENTITY % includes SYSTEM "includes.sgml"> %includes;
+]>
+
+<html>
+ &header;
+
+ <h1>Redirection in progress</h1>
+
+ <blockquote>
+ <p>If your browser does not automatically redirect you, please click
+ <a href="&base;/doc/en_US.ISO8859-1/books/handbook/">here</a>.</p>
+ </blockquote>
+
+ &footer;
+ </body>
+</html>
+
+<!--
+ Local Variables:
+ mode: sgml
+ sgml-indent-data: t
+ sgml-omittag: nil
+ sgml-always-quote-attributes: t
+ End:
+-->
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020516122731.GA23677>
