diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100-italic.woff b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100-italic.woff new file mode 100644 index 000000000..c644b48ee Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100-italic.woff differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100-italic.woff2 b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100-italic.woff2 new file mode 100644 index 000000000..96fd2f9a0 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100-italic.woff2 differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100.woff b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100.woff new file mode 100644 index 000000000..2dc7e182a Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100.woff differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100.woff2 b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100.woff2 new file mode 100644 index 000000000..e13d4a58a Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-100.woff2 differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300-italic.woff b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300-italic.woff new file mode 100644 index 000000000..eb6fea658 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300-italic.woff differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300-italic.woff2 b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300-italic.woff2 new file mode 100644 index 000000000..e430c45cb Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300-italic.woff2 differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300.woff b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300.woff new file mode 100644 index 000000000..46d424475 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300.woff differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300.woff2 b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300.woff2 new file mode 100644 index 000000000..f1c62e099 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-300.woff2 differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700-italic.woff b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700-italic.woff new file mode 100644 index 000000000..9e48d3f72 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700-italic.woff differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700-italic.woff2 b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700-italic.woff2 new file mode 100644 index 000000000..82e86ca32 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700-italic.woff2 differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700.woff b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700.woff new file mode 100644 index 000000000..e8d62dd0a Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700.woff differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700.woff2 b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700.woff2 new file mode 100644 index 000000000..5ba583e88 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-700.woff2 differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900-italic.woff b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900-italic.woff new file mode 100644 index 000000000..76100cc34 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900-italic.woff differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900-italic.woff2 b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900-italic.woff2 new file mode 100644 index 000000000..997ce9577 Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900-italic.woff2 differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900.woff b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900.woff new file mode 100644 index 000000000..7d07cde1b Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900.woff differ diff --git a/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900.woff2 b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900.woff2 new file mode 100644 index 000000000..f8bcda08f Binary files /dev/null and b/pydata_sphinx_theme/static/vendor/lato_latin-ext/1.44.1/files/lato-latin-ext-900.woff2 differ diff --git a/webpack.common.js b/webpack.common.js index 655c27b3e..288004335 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -8,51 +8,62 @@ const staticPath = resolve(__dirname, 'pydata_sphinx_theme', 'static'); const vendor = resolve(staticPath, 'vendor'); const vendorVersions = { - fontAwesome: require("@fortawesome/fontawesome-free/package.json").version, - openSans: require("@openfonts/open-sans_all/package.json").version, - lato: require("@openfonts/lato_latin-ext/package.json").version + fontAwesome: require('@fortawesome/fontawesome-free/package.json').version, + openSans: require('@openfonts/open-sans_all/package.json').version, + lato: require('@openfonts/lato_latin-ext/package.json').version, }; const vendorPaths = { fontAwesome: resolve(vendor, 'fontawesome', vendorVersions.fontAwesome), openSans: resolve(vendor, 'open-sans_all', vendorVersions.openSans), - lato: resolve(vendor, 'lato_latin-ext', vendorVersions.lato) + lato: resolve(vendor, 'lato_latin-ext', vendorVersions.lato), }; // generates cache-busting templates to be used in `layout.html` without knowing versions -function macroTemplate({compilation}){ +function macroTemplate({ compilation }) { + const indexes = Object.keys(compilation.assets).filter( + (file) => file.indexOf('/index.') != -1 + ); - const indexes = Object.keys(compilation.assets).filter((file) => file.indexOf("/index.") != -1); - - const css = indexes.filter((file) => file.endsWith(".css")); - const js = indexes.filter((file) => file.endsWith(".js")); + const css = indexes.filter((file) => file.endsWith('.css')); + const js = indexes.filter((file) => file.endsWith('.js')); const stylesheet = (css) => { return ``; - } + }; const preload = (js) => { - return `` - } + return ``; + }; const script = (js) => { return ``; - } + }; return ` {% macro head_pre_icons() %} + href="{{ pathto('_static/vendor/fontawesome/${ + vendorVersions.fontAwesome + }/css/all.min.css', 1) }}"> + href="{{ pathto('_static/vendor/fontawesome/${ + vendorVersions.fontAwesome + }/webfonts/fa-solid-900.woff2', 1) }}"> + href="{{ pathto('_static/vendor/fontawesome/${ + vendorVersions.fontAwesome + }/webfonts/fa-brands-400.woff2', 1) }}"> {% endmacro %} {% macro head_pre_fonts() %} + href="{{ pathto('_static/vendor/open-sans_all/${ + vendorVersions.openSans + }/index.css', 1) }}"> + href="{{ pathto('_static/vendor/lato_latin-ext/${ + vendorVersions.lato + }/index.css', 1) }}"> {% endmacro %} {% macro head_pre_bootstrap() %} @@ -68,7 +79,6 @@ function macroTemplate({compilation}){ {% endmacro %}`; } - module.exports = { entry: { index: ['./src/js/index.js'], @@ -113,58 +123,58 @@ module.exports = { inject: false, minify: false, css: true, - templateContent: macroTemplate + templateContent: macroTemplate, }), new CopyPlugin([ // fontawesome { context: './node_modules/@fortawesome/fontawesome-free', from: 'LICENSE.txt', - to: resolve(vendorPaths.fontAwesome, 'LICENSE.txt') + to: resolve(vendorPaths.fontAwesome, 'LICENSE.txt'), }, { context: './node_modules/@fortawesome/fontawesome-free/css', from: 'all.min.css', - to: resolve(vendorPaths.fontAwesome, 'css') + to: resolve(vendorPaths.fontAwesome, 'css'), }, { context: './node_modules/@fortawesome/fontawesome-free', from: 'webfonts', - to: resolve(vendorPaths.fontAwesome, 'webfonts') + to: resolve(vendorPaths.fontAwesome, 'webfonts'), }, // opensans { context: './node_modules/@openfonts/open-sans_all', from: 'files/*-400*', flatten: true, - to: resolve(vendorPaths.openSans, 'files') + to: resolve(vendorPaths.openSans, 'files'), }, { context: './node_modules/@openfonts/open-sans_all', from: 'LICENSE.md', - to: resolve(vendorPaths.openSans, 'LICENSE.md') + to: resolve(vendorPaths.openSans, 'LICENSE.md'), }, { context: './node_modules/@openfonts/open-sans_all', from: 'index.css', - to: resolve(vendorPaths.openSans, 'index.css') + to: resolve(vendorPaths.openSans, 'index.css'), }, // lato { context: './node_modules/@openfonts/lato_latin-ext', - from: 'files/*-400*', + from: 'files/*', flatten: true, - to: resolve(vendorPaths.lato, 'files') + to: resolve(vendorPaths.lato, 'files'), }, { context: './node_modules/@openfonts/lato_latin-ext', from: 'LICENSE.md', - to: resolve(vendorPaths.lato, 'LICENSE.md') + to: resolve(vendorPaths.lato, 'LICENSE.md'), }, { context: './node_modules/@openfonts/lato_latin-ext', from: 'index.css', - to: resolve(vendorPaths.lato, 'index.css') + to: resolve(vendorPaths.lato, 'index.css'), }, ]), ],