[PATCH 0/4] Add link to security notices to main page and improve reuse of assets in sub-projects
Build version browsable at: https://pipo.sk.gitlab.io/-/libvirt/-/jobs/12191476209/artifacts/website/ind... Peter Krempa (4): docs: index: Link to security notices from home page docs: css: Split out any main-page CSS to local.css docs: site.xsl: Use separate 'asset_href_base' and 'link_href_base' docs: page.xsl: Convert repository edit URI into a parameter docs/css/local.css | 3 +++ docs/css/main.css | 4 +--- docs/css/meson.build | 1 + docs/go/meson.build | 4 +++- docs/html/meson.build | 4 +++- docs/index.rst | 4 ++-- docs/kbase/internals/meson.build | 4 +++- docs/kbase/meson.build | 4 +++- docs/logos/meson.build | 4 +++- docs/manpages/meson.build | 4 +++- docs/meson.build | 4 +++- docs/page.xsl | 5 +++-- docs/site.xsl | 5 +++-- 13 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 docs/css/local.css -- 2.51.1
From: Peter Krempa <pkrempa@redhat.com> Our main page mentions security notices which we host at https://security.libvirt.org but links to them only from the security process page. Since we already have the wording there, turn it directly into a link. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 95b0995e99..e424d3024e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -34,8 +34,8 @@ Quick Links Already a regular open source contributor and have git set up? Have a quick look at how to propose your changes to libvirt correctly `Security vulnerabilities <securityprocess.html>`__ - View security notices and report vulnerabilities to the libvirt security - response team + View `security notices <https://security.libvirt.org>`__ and report + vulnerabilities to the libvirt security response team `Bug reporting <bugs.html>`__ View and report bugs in libvirt packages `XML configuration <format.html>`__ -- 2.51.1
On a Monday in 2025, Peter Krempa via Devel wrote:
From: Peter Krempa <pkrempa@redhat.com>
Our main page mentions security notices which we host at https://security.libvirt.org but links to them only from the security process page. Since we already have the wording there, turn it directly into a link.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/index.rst b/docs/index.rst index 95b0995e99..e424d3024e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -34,8 +34,8 @@ Quick Links Already a regular open source contributor and have git set up? Have a quick look at how to propose your changes to libvirt correctly `Security vulnerabilities <securityprocess.html>`__ - View security notices and report vulnerabilities to the libvirt security - response team + View `security notices <https://security.libvirt.org>`__ and report + vulnerabilities to the libvirt security response team
Consider repeating the security process list to make it more obvious: and `report vulnerabilities <securityprocess.html>`__ to the Jano
From: Peter Krempa <pkrempa@redhat.com> Our other sub-projects such as the libvirt-wiki and soon also the libvirt-security-notices will use the same CSS via asset import script. Move any specifics into 'local.css' which will be defined by the sub-projects so that 'main.css' can be imported directly. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/css/local.css | 3 +++ docs/css/main.css | 4 +--- docs/css/meson.build | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 docs/css/local.css diff --git a/docs/css/local.css b/docs/css/local.css new file mode 100644 index 0000000000..919d7c4e3e --- /dev/null +++ b/docs/css/local.css @@ -0,0 +1,3 @@ +@import url(libvirt.css); +@import url(libvirt-api.css); +@import url(mobile-libvirt.css); diff --git a/docs/css/main.css b/docs/css/main.css index fdcba22130..2701808217 100644 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -1,7 +1,5 @@ @import url(fonts.css); @import url(generic.css); -@import url(libvirt.css); -@import url(libvirt-api.css); @import url(libvirt-template.css); @import url(mobile-template.css); -@import url(mobile-libvirt.css); +@import url(local.css); diff --git a/docs/css/meson.build b/docs/css/meson.build index 6f4f140ffc..4d0e91497c 100644 --- a/docs/css/meson.build +++ b/docs/css/meson.build @@ -4,6 +4,7 @@ docs_css_files = [ 'libvirt.css', 'libvirt-api.css', 'libvirt-template.css', + 'local.css', 'main.css', 'mobile-template.css', 'mobile-libvirt.css', -- 2.51.1
From: Peter Krempa <pkrempa@redhat.com> While our main page uses same argument for both to ensure that the linking works also when browsed locally sub-projects such as libvirt-wiki and libvirt-security-notice will want to pull 'site.xsl' as is into their build assets. Pass both arguments via the build system so that we don't have to carry distinct instances. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/go/meson.build | 3 ++- docs/html/meson.build | 3 ++- docs/kbase/internals/meson.build | 3 ++- docs/kbase/meson.build | 3 ++- docs/logos/meson.build | 3 ++- docs/manpages/meson.build | 3 ++- docs/meson.build | 3 ++- docs/site.xsl | 4 ++-- 8 files changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/go/meson.build b/docs/go/meson.build index 29467c61f0..102516a6cc 100644 --- a/docs/go/meson.build +++ b/docs/go/meson.build @@ -33,7 +33,8 @@ foreach data : html_xslt_gen '--stringparam', 'pagesrc', data.get('source', ''), '--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'timestamp', docs_timestamp, - '--stringparam', 'href_base', data.get('href_base', ''), + '--stringparam', 'link_href_base', data.get('href_base', ''), + '--stringparam', 'asset_href_base', data.get('href_base', ''), '--nonet', site_xsl, '@INPUT@', diff --git a/docs/html/meson.build b/docs/html/meson.build index abb4fcf72a..c6f1478c78 100644 --- a/docs/html/meson.build +++ b/docs/html/meson.build @@ -101,7 +101,8 @@ foreach data : html_xslt_gen '--stringparam', 'pagesrc', data.get('source', ''), '--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'timestamp', docs_timestamp, - '--stringparam', 'href_base', data.get('href_base', ''), + '--stringparam', 'link_href_base', data.get('href_base', ''), + '--stringparam', 'asset_href_base', data.get('href_base', ''), '--nonet', site_xsl, '@INPUT@', diff --git a/docs/kbase/internals/meson.build b/docs/kbase/internals/meson.build index f1e9122f8f..1d637e0455 100644 --- a/docs/kbase/internals/meson.build +++ b/docs/kbase/internals/meson.build @@ -42,7 +42,8 @@ foreach data : html_xslt_gen '--stringparam', 'pagesrc', data.get('source', ''), '--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'timestamp', docs_timestamp, - '--stringparam', 'href_base', data.get('href_base', ''), + '--stringparam', 'link_href_base', data.get('href_base', ''), + '--stringparam', 'asset_href_base', data.get('href_base', ''), '--nonet', site_xsl, '@INPUT@', diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build index 6d4ca90215..90cdbe8a23 100644 --- a/docs/kbase/meson.build +++ b/docs/kbase/meson.build @@ -53,7 +53,8 @@ foreach data : html_xslt_gen '--stringparam', 'pagesrc', data.get('source', ''), '--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'timestamp', docs_timestamp, - '--stringparam', 'href_base', data.get('href_base', ''), + '--stringparam', 'link_href_base', data.get('href_base', ''), + '--stringparam', 'asset_href_base', data.get('href_base', ''), '--nonet', site_xsl, '@INPUT@', diff --git a/docs/logos/meson.build b/docs/logos/meson.build index 2d9d0fcbb0..dec544fa67 100644 --- a/docs/logos/meson.build +++ b/docs/logos/meson.build @@ -62,7 +62,8 @@ foreach data : html_xslt_gen '--stringparam', 'pagesrc', data.get('source', ''), '--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'timestamp', docs_timestamp, - '--stringparam', 'href_base', data.get('href_base', ''), + '--stringparam', 'link_href_base', data.get('href_base', ''), + '--stringparam', 'asset_href_base', data.get('href_base', ''), '--nonet', site_xsl, '@INPUT@', diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build index bdc17011a8..72c8c0461d 100644 --- a/docs/manpages/meson.build +++ b/docs/manpages/meson.build @@ -152,7 +152,8 @@ foreach data : html_xslt_gen '--stringparam', 'pagesrc', data.get('source', ''), '--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'timestamp', docs_timestamp, - '--stringparam', 'href_base', data.get('href_base', ''), + '--stringparam', 'link_href_base', data.get('href_base', ''), + '--stringparam', 'asset_href_base', data.get('href_base', ''), '--nonet', site_xsl, '@INPUT@', diff --git a/docs/meson.build b/docs/meson.build index 2c7c23271b..651b1d91c6 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -301,7 +301,8 @@ foreach data : html_xslt_gen '--stringparam', 'pagesrc', data.get('source', ''), '--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'timestamp', docs_timestamp, - '--stringparam', 'href_base', data.get('href_base', ''), + '--stringparam', 'link_href_base', data.get('href_base', ''), + '--stringparam', 'asset_href_base', data.get('href_base', ''), '--nonet', site_xsl, '@INPUT@', diff --git a/docs/site.xsl b/docs/site.xsl index 5a5fea2350..13b720bd40 100644 --- a/docs/site.xsl +++ b/docs/site.xsl @@ -28,8 +28,8 @@ <xsl:apply-templates select="." mode="page"> <xsl:with-param name="pagesrc" select="$pagesrc"/> <xsl:with-param name="timestamp" select="$timestamp"/> - <xsl:with-param name="link_href_base" select="$href_base"/> - <xsl:with-param name="asset_href_base" select="$href_base"/> + <xsl:with-param name="link_href_base" select="$link_href_base"/> + <xsl:with-param name="asset_href_base" select="$asset_href_base"/> </xsl:apply-templates> </xsl:template> -- 2.51.1
From: Peter Krempa <pkrempa@redhat.com> Allow other sub-projects using the XSL template without modification. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- docs/go/meson.build | 1 + docs/html/meson.build | 1 + docs/kbase/internals/meson.build | 1 + docs/kbase/meson.build | 1 + docs/logos/meson.build | 1 + docs/manpages/meson.build | 1 + docs/meson.build | 1 + docs/page.xsl | 5 +++-- docs/site.xsl | 1 + 9 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/go/meson.build b/docs/go/meson.build index 102516a6cc..35f7d41f30 100644 --- a/docs/go/meson.build +++ b/docs/go/meson.build @@ -35,6 +35,7 @@ foreach data : html_xslt_gen '--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'link_href_base', data.get('href_base', ''), '--stringparam', 'asset_href_base', data.get('href_base', ''), + '--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/', '--nonet', site_xsl, '@INPUT@', diff --git a/docs/html/meson.build b/docs/html/meson.build index c6f1478c78..d9a763f011 100644 --- a/docs/html/meson.build +++ b/docs/html/meson.build @@ -103,6 +103,7 @@ foreach data : html_xslt_gen '--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'link_href_base', data.get('href_base', ''), '--stringparam', 'asset_href_base', data.get('href_base', ''), + '--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/', '--nonet', site_xsl, '@INPUT@', diff --git a/docs/kbase/internals/meson.build b/docs/kbase/internals/meson.build index 1d637e0455..3340ac411f 100644 --- a/docs/kbase/internals/meson.build +++ b/docs/kbase/internals/meson.build @@ -44,6 +44,7 @@ foreach data : html_xslt_gen '--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'link_href_base', data.get('href_base', ''), '--stringparam', 'asset_href_base', data.get('href_base', ''), + '--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/', '--nonet', site_xsl, '@INPUT@', diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build index 90cdbe8a23..030511c626 100644 --- a/docs/kbase/meson.build +++ b/docs/kbase/meson.build @@ -55,6 +55,7 @@ foreach data : html_xslt_gen '--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'link_href_base', data.get('href_base', ''), '--stringparam', 'asset_href_base', data.get('href_base', ''), + '--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/', '--nonet', site_xsl, '@INPUT@', diff --git a/docs/logos/meson.build b/docs/logos/meson.build index dec544fa67..a7f683cb74 100644 --- a/docs/logos/meson.build +++ b/docs/logos/meson.build @@ -64,6 +64,7 @@ foreach data : html_xslt_gen '--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'link_href_base', data.get('href_base', ''), '--stringparam', 'asset_href_base', data.get('href_base', ''), + '--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/', '--nonet', site_xsl, '@INPUT@', diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build index 72c8c0461d..6504e68a71 100644 --- a/docs/manpages/meson.build +++ b/docs/manpages/meson.build @@ -154,6 +154,7 @@ foreach data : html_xslt_gen '--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'link_href_base', data.get('href_base', ''), '--stringparam', 'asset_href_base', data.get('href_base', ''), + '--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/', '--nonet', site_xsl, '@INPUT@', diff --git a/docs/meson.build b/docs/meson.build index 651b1d91c6..21e0b19c25 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -303,6 +303,7 @@ foreach data : html_xslt_gen '--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'link_href_base', data.get('href_base', ''), '--stringparam', 'asset_href_base', data.get('href_base', ''), + '--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/', '--nonet', site_xsl, '@INPUT@', diff --git a/docs/page.xsl b/docs/page.xsl index 71c7cfba9d..1997bb3ec2 100644 --- a/docs/page.xsl +++ b/docs/page.xsl @@ -19,6 +19,7 @@ <xsl:param name="timestamp"/> <xsl:param name="link_href_base"/> <xsl:param name="asset_href_base"/> + <xsl:param name="edit_href_base"/> <xsl:text disable-output-escaping="yes"><!DOCTYPE html> </xsl:text> <html lang="en" data-sourcedoc="{$pagesrc}"> @@ -105,11 +106,11 @@ <li><a href="https://serverfault.com/questions/tagged/libvirt">serverfault</a></li> </ul> </div> - <xsl:if test="$pagesrc != ''"> + <xsl:if test="$pagesrc != '' and $edit_href_base != ''"> <div id="contribute"> <h3>Contribute</h3> <ul> - <li><a href="https://gitlab.com/libvirt/libvirt/-/blob/master/{$pagesrc}">edit this page</a></li> + <li><a href="{$edit_href_base}{$pagesrc}">edit this page</a></li> </ul> </div> </xsl:if> diff --git a/docs/site.xsl b/docs/site.xsl index 13b720bd40..c65a315593 100644 --- a/docs/site.xsl +++ b/docs/site.xsl @@ -30,6 +30,7 @@ <xsl:with-param name="timestamp" select="$timestamp"/> <xsl:with-param name="link_href_base" select="$link_href_base"/> <xsl:with-param name="asset_href_base" select="$asset_href_base"/> + <xsl:with-param name="edit_href_base" select="$edit_href_base"/> </xsl:apply-templates> </xsl:template> -- 2.51.1
On a Monday in 2025, Peter Krempa via Devel wrote:
Build version browsable at:
https://pipo.sk.gitlab.io/-/libvirt/-/jobs/12191476209/artifacts/website/ind...
Peter Krempa (4): docs: index: Link to security notices from home page docs: css: Split out any main-page CSS to local.css docs: site.xsl: Use separate 'asset_href_base' and 'link_href_base' docs: page.xsl: Convert repository edit URI into a parameter
docs/css/local.css | 3 +++ docs/css/main.css | 4 +--- docs/css/meson.build | 1 + docs/go/meson.build | 4 +++- docs/html/meson.build | 4 +++- docs/index.rst | 4 ++-- docs/kbase/internals/meson.build | 4 +++- docs/kbase/meson.build | 4 +++- docs/logos/meson.build | 4 +++- docs/manpages/meson.build | 4 +++- docs/meson.build | 4 +++- docs/page.xsl | 5 +++-- docs/site.xsl | 5 +++-- 13 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 docs/css/local.css
--
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko -
Peter Krempa