Skip to content

Commit

Permalink
Merge pull request #843 from essenmitsosse/fix-build-when-fonts-are-n…
Browse files Browse the repository at this point in the history
…ot-present
  • Loading branch information
ines authored Jan 18, 2023
2 parents 8f29389 + b96b14e commit 2ef308c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions website/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ const plugins = [
`gatsby-plugin-offline`,
]

plugins.push({
resolve: `gatsby-plugin-sass-resources`,
options: {
resources: ['./src/styles/base.sass'],
},
})

if (fs.existsSync('./src/fonts')) {
plugins.push({
resolve: `gatsby-plugin-sass-resources`,
Expand Down
2 changes: 0 additions & 2 deletions website/src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React from 'react'

import SEO from './seo'

import '../styles/base.sass'

const Layout = ({ title, description, className, children }) => (
<>
<SEO title={title} description={description} />
Expand Down
3 changes: 3 additions & 0 deletions website/src/styles/base.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

@use 'sass:math'

\:root
--font-primary: 'Calibre', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'
--font-code: 'IBM Plex Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace
Expand Down
1 change: 0 additions & 1 deletion website/src/styles/fonts.sass
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* Fonts */
@use 'sass:math'

@font-face
font-family: "Calibre"
Expand Down

0 comments on commit 2ef308c

Please sign in to comment.