Fix/optimizations (#3)

* revamped js/css asset build

* update favicon compilation and color; cleanup package.json

* fix spacing

* update social media display and references

* adjust about page sizing and mobile display

* update jobs and page titles

* abstract links to single source, small style fixes

* adjust footer

* update pro viddeo page and seo

* seo and video fixes

* fix seo display

* move tor link to footer

* sizing adjustments and add hosted video

* video and sizing adjustments

* wip video

* final video

* update pro link

* temp fix for ticker start

* update link, add auto orient, remove video border

* fix contact form submission and mobile submit
This commit is contained in:
Lucy C
2022-11-08 13:31:00 -07:00
committed by GitHub
parent 78b5014be8
commit b495794a03
81 changed files with 3340 additions and 5566 deletions

View File

@@ -1,61 +1,23 @@
const eleventySass = require("eleventy-sass");
const faviconPlugin = require("eleventy-favicon");
const faviconPlugin = require("eleventy-plugin-gen-favicons");
const format = require('date-fns/format')
// https://github.com/artstorm/eleventy-plugin-seo
const pluginSEO = require("eleventy-plugin-seo");
// https://github.com/saneef/eleventy-plugin-img2picture
const img2picture = require("eleventy-plugin-img2picture");
// https://www.npmjs.com/package/@sardine/eleventy-plugin-tinysvg
const tinysvg = require('@sardine/eleventy-plugin-tinysvg');
// https://www.npmjs.com/package/@sardine/eleventy-plugin-tinyhtml
const tinyHTML = require('@sardine/eleventy-plugin-tinyhtml');
const slinkity = require('slinkity')
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy('src/assets/fonts');
eleventyConfig.addPassthroughCopy("./src/assets/js");
if (process.env.ELEVENTY_ENV === "enable-image-optim") {
// img2picture (recommend not enabling)
////// this plugin smartly optimizes images on build, such as converting pngs to smaller jpegs.
////// did not see noticable speed gains when enabled, but it did cause rendering issues on older versions of Safari (e.g. on Calalina).
////// specifially, jpeg masking (as a replacement for alpha pngs) doesn't seem to work for all browsers.
eleventyConfig.addPlugin(img2picture, {
// Should be same as Eleventy input folder set using `dir.input`.
eleventyInputDir: "src",
// Output folder for optimized images.
imagesOutputDir: "_site/assets/images",
// URL prefix for images src URLS.
// It should match with path suffix in `imagesOutputDir`.
// Eg: imagesOutputDir with `_site/images` likely need urlPath as `/images/`
urlPath: "/assets/images/",
sharpPngOptions: { pallette: true },
sharpJpegOptions: { quality: 100 }
});
} else {
// During development, copy the files to Eleventy's `dir.output`
eleventyConfig.addPassthroughCopy('./src/assets/images/');
}
eleventyConfig.addPassthroughCopy('./src/assets/images/');
eleventyConfig.addPassthroughCopy('./src/assets/videos/');
eleventyConfig.addPassthroughCopy('public')
//plugins
eleventyConfig.addPlugin(eleventySass);
eleventyConfig.addPlugin(faviconPlugin, { destination: './_site' });
eleventyConfig.addPlugin(faviconPlugin, { outputDir: './public' });
eleventyConfig.addPlugin(slinkity.plugin, slinkity.defineConfig({}))
eleventyConfig.addPlugin(pluginSEO, require("./src/_data/seo.json"));
eleventyConfig.addPlugin(tinyHTML);
eleventyConfig.addPlugin(tinysvg, {
baseUrl: 'src/_includes/svgs/',
});
eleventyConfig.addWatchTarget('./src/assets/styles/**/*')
// add date filter for human readability
//filters
eleventyConfig.addFilter('date', function (date, dateFormat) {
return format(date, dateFormat)
})