Modify the name of the 'IRC discussion' paragraph to just 'IRC' so that
the links keep working and remove the raw HTML anchors.
Adjustment is needed for documents which were using the '#email' anchor
which has now become '#mailing-lists'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Docutils-0.17 switched to using <main> instead of a <div
class='document'> and <section> instead of <div class='section'>.
To ensure that our pages still work we need to slightly adapt our XSL
stylesheet to select the <main> tag properly and adapt the CSS to also
select the 'section' element instead of a class and to apply to a <main>
tag with the appropriate names.
Docutils-0.17 also changed to use 'h2' for section heading instead of
'h1'.
Note the styles applied to the 'main' element with certain id can't be
made more universal by just applying to the id itself, as in certain
cases (e.g. 'documentation') we also have sections with that name. This
was previously ensured by also matching the 'document' class which would
make it equal to the 'main' element.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Our last default template had a match of "node()" which incidentally matched
everything, including text nodes. Since this has the same priority according to
the XSLT spec, section 5.5:
https://www.w3.org/TR/1999/REC-xslt-19991116#conflict
this is an error. Also according to the same spec section, the XSLT processor
may signal the error or pick the last rule.
This was uncovered with libxslt 1.1.35 which contains the following commit:
b0074eeca3
which makes the build fail with:
runtime error: file ../docs/page.xsl line 223 element element
xsl:element: The effective name '' is not a valid QName.
because our last rule also matches text nodes and we are trying to extract the
node name out of them.
To fix this we change the match to "*" which only matches elements and not all
the nodes, and to avoid any possible errors with different XSLT processors we
also bump the priority of the match="text()" rule a little higher, just in case
someone needs to use an XSLT processor that chooses signalling the error instead
of the optional recovery.
https://bugs.gentoo.org/833586
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This unclutters the top-level docs directory.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
The gitlab.com repos are the primary source, with libvirt.org just a
read-only mirror.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
page.xsl was adding '<div id="content">' wrapper for the content picked
up from the <body> element from the original input file. Optionally
class="$DOCNAME" was added for some documents taken from <body>.
Since docs generated from RST by docutils have a '<div class='document'
id='$DOCNAME>' we actually don't need an extra wrapper for them.
Additionally if we standardize on one of them we can use the same styles
for both. I've picked the latter because it makes more sense to use the
document name as 'id'.
This patch:
1) Modifies the XSL trasformation to add the wrapper only if it's not
present.
2) Modifies the XSL transformation to use 'id' for document name and
class='document' for the wrapper element.
3) Changes docs.html/index.html/hvsupport.html to use 'id' instead of
'class' for document name.
4) Modifies the main stylesheet to keep styling the elements properly
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
The anchors are based on the article or chapter headers, thus they are
not 100% permanent. Especially with pages generated from RST.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Use the 'parent' axis to check whether the parent is a div with
class='section' rather than looking for 'toc-backref' anchor to see
whether to generate one of the headerlink alternatives. Both hare
docutils-specific thus apply to docs generated from RST documents.
This adds the links for pages generated from RST documents which don't
have a table of contents (and thus lack the 'toc-backref' anchors) and
thus fixes pages such as hacking.html and news.html to have reasonable
links which can be shared.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Use https: links for websites that support them.
The URIs which are used as namespace identifiers
are left alone.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
The meson conversion lost the <meta> tags providing the go-import,
because the "$pagename" variable lost the .html suffix. Rather
than fix that, just change to using "$pagesrc" instead, as it is a
better fit.
The 404 page also needs to use absolute links to work correctly for
pages in sub-folders.
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
NEWS.rst is based in the root of the repository and 'hvsupport.html'
doesn't have a backing file which can be edited since it's fully
generated. Our 'contribute -> edit this page' link on the bottom of the
page is wrong in those cases.
Fix it by adding the contribute section only when there's a source and
base the 'source' of a html file in the root of the repository.
Along with that we need to modify the scripts/meson-html-gen.py script
to accept optional 'pagesrc' and the XSL template to skip the
'contribute' section when we don't have a source.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
To encourage contributors to make changes to the main website, add a
footer link to every page which links to the corresponding source file
in git. With gitlab, they are able to edit content directly in the web
browser and then submit a merge request. This gives a way to contribute
content that is arguably easier than our wiki which requires manual
account creation, while this will also benefit from maintainer review.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Currently the libvirt Go modules are accessed by applications using
their github repository URLs. This is undesirable as we don't want
applications to have a direct dependancy on a specific source repo
location. We want to enable applications to use the Go packages via
the libvirt.org namespace.
When you do "go get libvirt.org/libvirt-go", the Go client will do an
HTTPS request to that URL, and parse the HTML content to look for a
<meta> tag which tells it where to the find the GIT repository.
https://golang.org/cmd/go/#hdr-Remote_import_paths
This adds two pages to support this Go module resolution. They are
not linked from anywhere as we don't expect users to actually look
at them. If someone does happen upon them, there's some boilerplate
text to send them off to godoc.org for API documentation.
Since the pages we're adding have a .html extension, we will also
use a small apache config tweak on the server
RewriteEngine on
RewriteRule ^/libvirt-go$ /libvirt-go.html [L]
RewriteRule ^/libvirt-go-xml$ /libvirt-go-xml.html [L]
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The rst2html output generates the links for headings in a slightly
different way than we do for docs written in HTML, so we must match
another scenario when generating back links.
rst2html will also use <h1> tags for both the document title and
the first level of section titles, so we must expand the matching
to allow for this too.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The HTML from rst2html doesn't have <h1> immediately under the <body>
tag, instead there is at least one <div> in between.
There are also many things added in the <head> section that we don't
want to have copied over, since our templating system already adds
suitable <head> elements.
We only need to copy the <script> to make index.html work.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The XSL generator loads included HTML files relative to the source dir
but we need to tell it to load them from the build dir instead.
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Allow targetting the search scope to the website, wiki or mailing lists
only. When javascript is disabled this should gracefully fallback to
only searching the website.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Instead of duplicating javascript in every single page, put it in a
standalone file which can be cached by the browser.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The website search is perpetually broken, has had XSS issues in the
past, and I suspect when it's working it's not as fast or capable as
a simple google site:libvirt.org search
Replace the <form> implementation with one that sends the user to
google.com with 'site:libvirt.org' appended to the search string
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Google is shutting down Google+, with no replacement, in the very near
future so we are losing the Libvirt community group there.
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The website does not look good in a mobile device as the text is
far too small and the layout assumes a wide screen.
Make the style dynamically adapt based on viewport size, so a
mobile device gets a layout more suited to its dimensions,
also changing "Learn" to "Docs"
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Use of the relation "shortcut" for a favicon was an Internet
Explorer only feature. Other browsers just require "icon".
The new icons & metadata are generated using
https://realfavicongenerator.net/
which is user tested to work well across all modern clients
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
The HTML5 doctype is simply
<!DOCTYPE html>
no DTD is present because HTML5 is no longer defined as an
extension of SGML.
XSL has no way to natively output a doctype without a public
or system identifier, so we have to use an <xsl:text> hack
instead.
See also
https://dev.w3.org/html5/html-author/#doctype-declaration
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
The 'name' attribute on <a...> elements is deprecated in favour
of the 'id' attribute which is allowed on any element. HTML5
drops 'name' support entirely.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
In order not to make the build even less reproducible, honour
SOURCE_DATE_EPOCH environment variable as specified:
https://reproducible-builds.org/specs/source-date-epoch/
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
A combination of the index page, top nav bar and docs.html page
provide links to all pages on the site. The left hand nav bar
is thus redundant and can be removed to provide a simpler style
for the site.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
The front page contains a bunch of content that is either
outdated (eg links to libvirt qpid) or not particularly
useful (links to vendor hypervisor sites).
This rewrites it to be more directly useful to visitors,
providing a updated intro to libvirt project, direct
links to key pieces of website content (new contributors
guide, security process, bug reporting, XML formats), and
feed showing recent 5 blog posts on the virt tools planet.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add links to download, communicate and learn in the
header bar, as the main jumping off points for
navigation.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add a footer to all pages containing a blurb about the
code of conduct, and links to various communication
channels / social media / user self-help sites.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Use a dark banner whose color matches the dark green used in
the logo. Introduce a newly rendered version of the header
logo derived from new SVG file, instead of old one from
(now lost) Adobe Illustrator file.
The top banner logo now links to the front page as is common
practice for most websites.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Since libvirt.h was split into multiple files and similarly
docs/libvirt-libvirt.html, docs/hvsupport.html have bad hyperlinks. The
same happens for all the html.in files that used <code class='docref'>
tag, because page.xsl has no idea where to point the link that's found.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
It breaks the build on RHEL-5.10 and because it's only optional we
could remove it from the code. The default namespace will be used.
This hunk was introduced by commit 237a088ba4.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Quite often, I need to cite URLs like
http://libvirt.org/formatnetwork.html#elementQoS
but it is annoying to copy them from the table of contents or the html
source.
This patch borrows from the Python documentation in order to make it
easier to cite headers on libvirt's oneline documentation.
This adds two new pages to the website, acl.html describing
the general access control framework and permissions models,
and aclpolkit.html describing the use of polkit as an
access control driver.
page.xsl is modified to support a new syntax
<div id="include" filename="somefile.htmlinc"/>
which will cause the XSL transform to replace that <div>
with the contents of 'somefile.htmlinc'. We use this in
the acl.html.in file, to pull the table of permissions
for each libvirt object. This table is autogenerated
from the enums in src/access/viraccessperms.h by the
genaclperms.pl script.
newapi.xsl is modified so that the list of permissions
checks shown against each API will link to the description
of the permissions in acl.html
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add missing 'html:' namespace prefix to a few more XSL
rules for generating the table of contents links
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
The previous commit failed to update the XSL to take account
of fact that in XHTML mode the elements need namespace
prefixes. This caused every web page to be blank!
Links to the FAQ didn't work on pages in subdirectories, like
devhelp/libvirt-virterror.html or internals/command.html, because
they have had href_base prepended to them.
* docs/Makefile.am docs/api.html docs/api.html.in docs/archdomain.html
docs/archnetwork.html docs/archnode.html docs/archstorage.html
docs/goals.html docs/intro.html
docs/libvirt-daemon-arch.fig docs/libvirt-daemon-arch.png
docs/libvirt-driver-arch.fig docs/libvirt-driver-arch.png
docs/libvirt-object-model.fig docs/libvirt-object-model.png
docs/page.xsl docs/sitemap.html docs/sitemap.html.in:
adding a new api page, extending the stylesheet to allow references
and including images from Dan Berrange
daniel