*ping* Re: [PATCH, wwwdocs] Fix PR 50642
diff mbox

Message ID alpine.LSU.2.20.1609042138400.3437@anthias.pfeifer.com
State New
Headers show

Commit Message

Gerald Pfeifer Sept. 4, 2016, 7:49 p.m. UTC
On Wed, 22 May 2013, Shakthi Kannan wrote:
> Is the following patch okay for trunk?

Sorry for the enormous delay in getting to this.  Not sure why that 
fell through the cracks. :-(

The idea is a fine one, and would have worked back then.  Since the 
end of last year or so, the web server at gcc.gnu.org signals a strict 
Content Security Policy which does not allow for inline CSS styles,

With the patch below I follow a slightly different approach, 
referring to the global CSS we already have in place now instead.  
That also allows tweaking this more dynamically.

I'll be looking into the actual style change next.

Gerald

2016-09-04  Gerald Pfeifer  <gerald@pfeifer.com>

	PR documentation/50642
	* update_web_docs_svn (CSS): Introduce.
	Have generated files refer to it.


> ----- Original Message -----
> From: "Shakthi Kannan" <skannan@redhat.com>
> To: "Joseph S. Myers" <joseph@codesourcery.com>
> Cc: gcc-patches@gcc.gnu.org
> Sent: Monday, May 6, 2013 4:00:06 PM
> Subject: Re: [PATCH, wwwdocs] Fix PR 50642
> 
> Hi,
> 
> I am re-submitting the patch to use html.css from the update_web_docs_svn script present in the maintainer-scripts folder. The smallexample attributes are defined to use a medium font size with a light blue background for readability and clarity.
> 
> 2013-05-06 Shakthi Kannan <skannan@redhat.com>
> 
>     PR wwwdocs/50642
>     * maintainer-scripts/update_web_docs_svn: Use --css-include with makeinfo.
>     * gcc/doc/include/html.css: New CSS file for HTML docs.
> 
> ---
>  gcc/doc/include/html.css               | 6 ++++++
>  maintainer-scripts/update_web_docs_svn | 4 +++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
>  create mode 100644 gcc/doc/include/html.css
> 
> diff --git a/gcc/doc/include/html.css b/gcc/doc/include/html.css
> new file mode 100644
> index 0000000..6cc0284
> --- /dev/null
> +++ b/gcc/doc/include/html.css
> @@ -0,0 +1,6 @@
> +pre.smallexample { 
> +    font-family: sans-serif; 
> +    font-size: medium; 
> +    padding: 4px; 
> +    background: #f2f2f9 
> +}
> \ No newline at end of file
> diff --git a/maintainer-scripts/update_web_docs_svn b/maintainer-scripts/update_web_docs_svn
> index cfc33c4..2cea078 100755
> --- a/maintainer-scripts/update_web_docs_svn
> +++ b/maintainer-scripts/update_web_docs_svn
> @@ -36,6 +36,8 @@ WWWBASE=/www/gcc/htdocs
>  WWWBASE_PREFORMATTED=/www/gcc/htdocs-preformatted
>  WWWPREPROCESS='/www/gcc/bin/preprocess -r'
>  
> +HTMLCSS=gcc/doc/include/html.css
> +
>  # Process options -rrelease and -ddirectory
>  RELEASE=""
>  SUBDIR=""
> @@ -164,7 +166,7 @@ for file in $MANUALS; do
>      if [ "$file" = "gnat_ugn_unw" ]; then
>        includes="$includes -I gcc/gcc/ada"
>      fi
> -    makeinfo --html $includes -o ${file} ${filename}
> +    makeinfo --css-include=../$HTMLCSS --html $includes -o ${file} ${filename}
>      tar cf ${file}-html.tar ${file}/*.html
>      texi2dvi $includes -o ${file}.dvi ${filename} </dev/null >/dev/null && dvips -o ${file}.ps ${file}.dvi
>      texi2pdf $includes -o ${file}.pdf ${filename} </dev/null
>

Patch
diff mbox

Index: update_web_docs_svn
===================================================================
--- update_web_docs_svn	(revision 239978)
+++ update_web_docs_svn	(working copy)
@@ -28,6 +28,8 @@ 
   libiberty
   porting"
 
+CSS=/gcc.css
+
 WWWBASE=/www/gcc/htdocs
 WWWBASE_PREFORMATTED=/www/gcc/htdocs-preformatted
 WWWPREPROCESS='/www/gcc/bin/preprocess -r'
@@ -156,7 +158,7 @@ 
     if [ "$file" = "gnat_ugn" ]; then
       includes="$includes -I gcc/gcc/ada -I gcc/gcc/ada/doc/gnat_ugn"
     fi
-    makeinfo --html $includes -o ${file} ${filename}
+    makeinfo --html --css-ref $CSS $includes -o ${file} ${filename}
     tar cf ${file}-html.tar ${file}/*.html
     texi2dvi $includes -o ${file}.dvi ${filename} </dev/null >/dev/null && dvips -o ${file}.ps ${file}.dvi
     texi2pdf $includes -o ${file}.pdf ${filename} </dev/null