1
0
Fork 0

add opengraph info maybe

This commit is contained in:
ChaotiCryptidz 2022-05-31 22:22:46 +01:00
parent 91a0082b41
commit 9fb45c0588
No known key found for this signature in database
4 changed files with 87 additions and 68 deletions

View file

@ -5,6 +5,8 @@ import { FoodExcludeTypes } from "./types";
const FONT_TYPES = [ const FONT_TYPES = [
["default", "Default (Comic Sans, Comic Neue or Default)"], ["default", "Default (Comic Sans, Comic Neue or Default)"],
["system", "System Sans Font (as picked by Bootstrap Defaults)"],
["comicneue", "Comic Neue"], ["comicneue", "Comic Neue"],
["opendyslexic", "Open Dyslexic"] ["opendyslexic", "Open Dyslexic"]
]; ];

View file

@ -63,6 +63,9 @@ body {
html [data-font="default"] { html [data-font="default"] {
font-family: $fonts-comic-sans-neue; font-family: $fonts-comic-sans-neue;
} }
html [data-font="system"] {
font-family: $default-fonts;
}
html [data-font="comicneue"] { html [data-font="comicneue"] {
font-family: $fonts-comic-neue; font-family: $fonts-comic-neue;
} }

View file

@ -5,73 +5,80 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = { module.exports = {
mode: "production", mode: "production",
cache: false, cache: false,
entry: './src/main.tsx', entry: './src/main.tsx',
output: { output: {
path: path.resolve(__dirname, 'dist'), path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js', filename: 'bundle.js',
publicPath: '/', publicPath: '/',
}, },
stats: { stats: {
colors: true, colors: true,
timings: true, timings: true,
}, },
performance: { performance: {
hints: false, hints: false,
}, },
devtool: "eval-source-map", devtool: "eval-source-map",
plugins: [ plugins: [
new HtmlWebpackPlugin({ title: "Chaos's Food Likes/Dislikes" }) new HtmlWebpackPlugin({
], title: "Chaos's Food Likes/Dislikes",
devServer: { aseUrl: './',
historyApiFallback: true, meta: {
}, 'og:title': { property: 'og:title', content: "Chaos's Food Likes/Dislikes" },
resolve: { 'og:description': { property: 'og:description', content: "A list for all the foods we like, dislike and find unable to eat due to sensory difficulties." },
modules: ['node_modules'], },
extensions: ['.tsx', '.ts', '.js', ".mjs"], })
alias: { os: false }
},
module: {
rules: [
{
test: /\.(scss)$/,
use: [{
loader: 'style-loader',
}, {
loader: 'css-loader',
}, {
loader: 'postcss-loader',
options: {
postcssOptions: {
options: function () {
return [
require('precss'),
require('autoprefixer')
];
}
}
}
}, {
loader: 'sass-loader'
}]
},
{
test: /\.ts(x?)$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
},
], ],
}, devServer: {
historyApiFallback: true,
},
resolve: {
modules: ['node_modules'],
extensions: ['.tsx', '.ts', '.js', ".mjs"],
alias: { os: false }
},
optimization: { module: {
minimize: false, rules: [
minimizer: [ {
], test: /\.(scss)$/,
}, use: [{
loader: 'style-loader',
}, {
loader: 'css-loader',
}, {
loader: 'postcss-loader',
options: {
postcssOptions: {
options: function () {
return [
require('precss'),
require('autoprefixer')
];
}
}
}
}, {
loader: 'sass-loader'
}]
},
{
test: /\.ts(x?)$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
},
],
},
optimization: {
minimize: false,
minimizer: [
],
},
}; };

View file

@ -20,7 +20,14 @@ module.exports = {
hints: false, hints: false,
}, },
plugins: [ plugins: [
new HtmlWebpackPlugin({ title: "Chaos's Food Likes/Dislikes", baseUrl: './' }) new HtmlWebpackPlugin({
title: "Chaos's Food Likes/Dislikes",
aseUrl: './',
meta: {
'og:title': { property: 'og:title', content: "Chaos's Food Likes/Dislikes" },
'og:description': { property: 'og:description', content: "A list for all the foods we like, dislike and find unable to eat due to sensory difficulties." },
},
})
], ],
devServer: { devServer: {
historyApiFallback: true, historyApiFallback: true,