Skip to content

Commit

Permalink
Move reveal template build to pre-prepared step
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesdring committed Jan 31, 2025
1 parent 8ad7c77 commit 3d302a3
Show file tree
Hide file tree
Showing 6 changed files with 471 additions and 7 deletions.
2 changes: 0 additions & 2 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import metas from "lume/plugins/metas.ts";
import openGraphImages from "lume/plugins/og_images.ts";
import postcss from "lume/plugins/postcss.ts";
import redirects from "lume/plugins/redirects.ts";
import sass from "lume/plugins/sass.ts";
import sheets from "lume/plugins/sheets.ts";
import sitemap from "lume/plugins/sitemap.ts";
import svgo from "lume/plugins/svgo.ts";
Expand Down Expand Up @@ -60,7 +59,6 @@ site.use(esbuild({
treeShaking: true,
},
}));
site.use(sass()); // Requried for Reveal themes
site.use(postcss());
site.use(redirects());
site.use(favicon());
Expand Down
17 changes: 15 additions & 2 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions reveal-theme/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as sass from 'npm:[email protected]';
import 'npm:[email protected]';

const sourceFile = new URL(import.meta.resolve('./reveal-bd25.scss')).pathname;
const targetFile = new URL(import.meta.resolve('../src/assets/css/reveal-bd25.css'));

await Deno.writeTextFile(targetFile, sass.compile(sourceFile).css);
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

// Default mixins and settings -----------------
@import 'scss/mixins.scss';
@import 'scss/settings.scss';
@import 'css/theme/template/mixins.scss';
@import 'css/theme/template/settings.scss';
// ---------------------------------------------

// Include theme-specific fonts
Expand Down Expand Up @@ -37,7 +37,7 @@ $overlayElementFgColor: 240, 240, 240;
@include dark-bg-text-color(#fff);

// Theme template ------------------------------
@import 'scss/theme.scss';
@import 'css/theme/template/theme.scss';
// ---------------------------------------------

// Reveal overrides
Expand Down
9 changes: 9 additions & 0 deletions scripts.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
scripts:
prepare_reveal:
cmd: reveal-theme/build.ts
allow: # or a map
env: SASS_PATH
read: .
write: src/assets/css/reveal-bd25.css
env:
SASS_PATH: node_modules/reveal.js/

get_typefaces:
- mkdir --parents vendor/bd25
- curl --location -o vendor/bd25/DenimINK-Bold-5SFPWNGF.woff https://bradford2025.co.uk/wp-content/themes/bd25/dist/DenimINK-Bold-5SFPWNGF.woff
Expand Down
Loading

0 comments on commit 3d302a3

Please sign in to comment.