qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] docs: build an index page for the HTML docs
@ 2019-11-11 10:21 Stefan Hajnoczi
  2019-12-17 16:36 ` Stefan Hajnoczi
  2019-12-17 16:47 ` Thomas Huth
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2019-11-11 10:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Stefan Hajnoczi

There is no index.html start page for the QEMU HTML documentation.  An
index page is needed so that documentation can be browsed easily on the
web.

This patch adds an index.html.in template file where the QEMU version
number is expanded.  It is written in HTML instead of using the existing
sphinx (rST) and texi documentation generators because they are
heavyweight and would make this harder.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 Makefile           |  6 ++++++
 docs/index.html.in | 17 +++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 docs/index.html.in

diff --git a/Makefile b/Makefile
index aa9d1a42aa..581bc68918 100644
--- a/Makefile
+++ b/Makefile
@@ -347,6 +347,7 @@ DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/
 DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
 DOCS+=docs/qemu-block-drivers.7
 DOCS+=docs/qemu-cpu-models.7
+DOCS+=$(MANUAL_BUILDDIR)/index.html
 ifdef CONFIG_VIRTFS
 DOCS+=fsdev/virtfs-proxy-helper.1
 endif
@@ -818,6 +819,7 @@ install-sphinxdocs: sphinxdocs
 
 install-doc: $(DOCS) install-sphinxdocs
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
+	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/index.html "$(DESTDIR)$(qemu_docdir)"
 	$(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)"
 	$(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)"
 	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)"
@@ -1024,6 +1026,10 @@ $(MANUAL_BUILDDIR)/specs/index.html: $(call manual-deps,specs)
 $(MANUAL_BUILDDIR)/interop/qemu-ga.8: $(call manual-deps,interop)
 	$(call build-manual,interop,man)
 
+$(MANUAL_BUILDDIR)/index.html: $(SRC_PATH)/docs/index.html.in qemu-version.h
+	$(call quiet-command, sed "s|@@VERSION@@|${VERSION}|g" $< >$@, \
+             "GEN","$@")
+
 qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
 
diff --git a/docs/index.html.in b/docs/index.html.in
new file mode 100644
index 0000000000..c2df85a185
--- /dev/null
+++ b/docs/index.html.in
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="UTF-8">
+        <title>QEMU @@VERSION@@ Documentation</title>
+    </head>
+    <body>
+        <h1>QEMU @@VERSION@@ Documentation</h1>
+        <ul>
+            <li><a href="qemu-doc.html">User Documentation</a></li>
+            <li><a href="qemu-qmp-ref.html">QMP Reference Manual</a></li>
+            <li><a href="qemu-ga-ref.html">Guest Agent Protocol Reference</a></li>
+            <li><a href="interop/index.html">System Emulation Management and Interoperability Guide</a></li>
+            <li><a href="specs/index.html">System Emulation Guest Hardware Specifications</a></li>
+        </ul>
+    </body>
+</html>
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] docs: build an index page for the HTML docs
  2019-11-11 10:21 [PATCH v2] docs: build an index page for the HTML docs Stefan Hajnoczi
@ 2019-12-17 16:36 ` Stefan Hajnoczi
  2019-12-17 16:47 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2019-12-17 16:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Thomas Huth, Daniel Berrange

[-- Attachment #1: Type: text/plain, Size: 3134 bytes --]

On Mon, Nov 11, 2019 at 10:21:57AM +0000, Stefan Hajnoczi wrote:
> There is no index.html start page for the QEMU HTML documentation.  An
> index page is needed so that documentation can be browsed easily on the
> web.
> 
> This patch adds an index.html.in template file where the QEMU version
> number is expanded.  It is written in HTML instead of using the existing
> sphinx (rST) and texi documentation generators because they are
> heavyweight and would make this harder.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  Makefile           |  6 ++++++
>  docs/index.html.in | 17 +++++++++++++++++
>  2 files changed, 23 insertions(+)
>  create mode 100644 docs/index.html.in

Ping?

> diff --git a/Makefile b/Makefile
> index aa9d1a42aa..581bc68918 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -347,6 +347,7 @@ DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/
>  DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
>  DOCS+=docs/qemu-block-drivers.7
>  DOCS+=docs/qemu-cpu-models.7
> +DOCS+=$(MANUAL_BUILDDIR)/index.html
>  ifdef CONFIG_VIRTFS
>  DOCS+=fsdev/virtfs-proxy-helper.1
>  endif
> @@ -818,6 +819,7 @@ install-sphinxdocs: sphinxdocs
>  
>  install-doc: $(DOCS) install-sphinxdocs
>  	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
> +	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/index.html "$(DESTDIR)$(qemu_docdir)"
>  	$(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)"
>  	$(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)"
>  	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)"
> @@ -1024,6 +1026,10 @@ $(MANUAL_BUILDDIR)/specs/index.html: $(call manual-deps,specs)
>  $(MANUAL_BUILDDIR)/interop/qemu-ga.8: $(call manual-deps,interop)
>  	$(call build-manual,interop,man)
>  
> +$(MANUAL_BUILDDIR)/index.html: $(SRC_PATH)/docs/index.html.in qemu-version.h
> +	$(call quiet-command, sed "s|@@VERSION@@|${VERSION}|g" $< >$@, \
> +             "GEN","$@")
> +
>  qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
>  	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
>  
> diff --git a/docs/index.html.in b/docs/index.html.in
> new file mode 100644
> index 0000000000..c2df85a185
> --- /dev/null
> +++ b/docs/index.html.in
> @@ -0,0 +1,17 @@
> +<!DOCTYPE html>
> +<html>
> +    <head>
> +        <meta charset="UTF-8">
> +        <title>QEMU @@VERSION@@ Documentation</title>
> +    </head>
> +    <body>
> +        <h1>QEMU @@VERSION@@ Documentation</h1>
> +        <ul>
> +            <li><a href="qemu-doc.html">User Documentation</a></li>
> +            <li><a href="qemu-qmp-ref.html">QMP Reference Manual</a></li>
> +            <li><a href="qemu-ga-ref.html">Guest Agent Protocol Reference</a></li>
> +            <li><a href="interop/index.html">System Emulation Management and Interoperability Guide</a></li>
> +            <li><a href="specs/index.html">System Emulation Guest Hardware Specifications</a></li>
> +        </ul>
> +    </body>
> +</html>
> -- 
> 2.23.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] docs: build an index page for the HTML docs
  2019-11-11 10:21 [PATCH v2] docs: build an index page for the HTML docs Stefan Hajnoczi
  2019-12-17 16:36 ` Stefan Hajnoczi
@ 2019-12-17 16:47 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2019-12-17 16:47 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Peter Maydell, Daniel Berrange

On 11/11/2019 11.21, Stefan Hajnoczi wrote:
> There is no index.html start page for the QEMU HTML documentation.  An
> index page is needed so that documentation can be browsed easily on the
> web.
> 
> This patch adds an index.html.in template file where the QEMU version
> number is expanded.  It is written in HTML instead of using the existing
> sphinx (rST) and texi documentation generators because they are
> heavyweight and would make this harder.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  Makefile           |  6 ++++++
>  docs/index.html.in | 17 +++++++++++++++++
>  2 files changed, 23 insertions(+)
>  create mode 100644 docs/index.html.in
> 
> diff --git a/Makefile b/Makefile
> index aa9d1a42aa..581bc68918 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -347,6 +347,7 @@ DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/
>  DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7
>  DOCS+=docs/qemu-block-drivers.7
>  DOCS+=docs/qemu-cpu-models.7
> +DOCS+=$(MANUAL_BUILDDIR)/index.html
>  ifdef CONFIG_VIRTFS
>  DOCS+=fsdev/virtfs-proxy-helper.1
>  endif
> @@ -818,6 +819,7 @@ install-sphinxdocs: sphinxdocs
>  
>  install-doc: $(DOCS) install-sphinxdocs
>  	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
> +	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/index.html "$(DESTDIR)$(qemu_docdir)"
>  	$(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)"
>  	$(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)"
>  	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)"
> @@ -1024,6 +1026,10 @@ $(MANUAL_BUILDDIR)/specs/index.html: $(call manual-deps,specs)
>  $(MANUAL_BUILDDIR)/interop/qemu-ga.8: $(call manual-deps,interop)
>  	$(call build-manual,interop,man)
>  
> +$(MANUAL_BUILDDIR)/index.html: $(SRC_PATH)/docs/index.html.in qemu-version.h
> +	$(call quiet-command, sed "s|@@VERSION@@|${VERSION}|g" $< >$@, \
> +             "GEN","$@")
> +
>  qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
>  	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
>  
> diff --git a/docs/index.html.in b/docs/index.html.in
> new file mode 100644
> index 0000000000..c2df85a185
> --- /dev/null
> +++ b/docs/index.html.in
> @@ -0,0 +1,17 @@
> +<!DOCTYPE html>
> +<html>

https://validator.w3.org/ says:

"Warning: Consider adding a lang attribute to the html start tag to
declare the language of this document."

... it's just a warning though, but in case you respin, you might want
to add it.

> +    <head>
> +        <meta charset="UTF-8">
> +        <title>QEMU @@VERSION@@ Documentation</title>
> +    </head>
> +    <body>
> +        <h1>QEMU @@VERSION@@ Documentation</h1>
> +        <ul>
> +            <li><a href="qemu-doc.html">User Documentation</a></li>
> +            <li><a href="qemu-qmp-ref.html">QMP Reference Manual</a></li>
> +            <li><a href="qemu-ga-ref.html">Guest Agent Protocol Reference</a></li>
> +            <li><a href="interop/index.html">System Emulation Management and Interoperability Guide</a></li>
> +            <li><a href="specs/index.html">System Emulation Guest Hardware Specifications</a></li>
> +        </ul>
> +    </body>
> +</html>
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-17 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 10:21 [PATCH v2] docs: build an index page for the HTML docs Stefan Hajnoczi
2019-12-17 16:36 ` Stefan Hajnoczi
2019-12-17 16:47 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).