You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/07/08 11:52:09 UTC
[isis-antora] 03/18: adds support for site-custom.css
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis-antora.git
commit 57877779ad25d1b5d5691249bda67a2c6aba1e26
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Apr 29 07:23:02 2019 +0100
adds support for site-custom.css
---
gulpfile.js/tasks/build.js | 1 +
src/css/site-custom.css | 15 +++++++++++++++
src/layouts/404.hbs | 1 +
src/layouts/default.hbs | 1 +
4 files changed, 18 insertions(+)
diff --git a/gulpfile.js/tasks/build.js b/gulpfile.js/tasks/build.js
index fa75b08..deb7d65 100644
--- a/gulpfile.js/tasks/build.js
+++ b/gulpfile.js/tasks/build.js
@@ -59,6 +59,7 @@ module.exports = (src, dest, preview) => () => {
.pipe(buffer())
.pipe(uglify()),
vfs.src('css/site.css', opts).pipe(postcss(postcssPlugins)),
+ vfs.src('css/site-custom.css', opts).pipe(postcss(postcssPlugins)),
vfs.src('font/*.woff*(2)', opts),
vfs
.src('img/**/*.{jpg,ico,png,svg}', opts)
diff --git a/src/css/site-custom.css b/src/css/site-custom.css
new file mode 100644
index 0000000..c5767ff
--- /dev/null
+++ b/src/css/site-custom.css
@@ -0,0 +1,15 @@
+/*
+websites can add additional CSS by creating a file:
+
+_docs/
+ supplemental-ui/
+ css/
+ site-custom.css
+
+and referencing in site.yml:
+
+ui:
+ supplemental_files: _docs/supplemental-ui
+
+Any CSS defined their will replace *this* file in the template.
+*/
diff --git a/src/layouts/404.hbs b/src/layouts/404.hbs
index 46bc48e..e08a0e3 100644
--- a/src/layouts/404.hbs
+++ b/src/layouts/404.hbs
@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{detag (or page.title 'Page Not Found')}}{{#if site.title}} :: {{site.title}}{{/if}}</title>
<link rel="stylesheet" href="{{uiRootPath}}/css/site.css">
+ <link rel="stylesheet" href="{{uiRootPath}}/css/site-custom.css">
{{> head}}
</head>
<body class="status-404">
diff --git a/src/layouts/default.hbs b/src/layouts/default.hbs
index e7710ca..7fa1c50 100644
--- a/src/layouts/default.hbs
+++ b/src/layouts/default.hbs
@@ -17,6 +17,7 @@
<meta name="generator" content="Antora {{or antoraVersion site.antoraVersion}}">
{{/if}}
<link rel="stylesheet" href="{{uiRootPath}}/css/site.css">
+ <link rel="stylesheet" href="{{uiRootPath}}/css/site-custom.css">
{{> head}}
</head>
<body class="article">