Skip to content

Commit

Permalink
v0.3.112
Browse files Browse the repository at this point in the history
  • Loading branch information
CarcajadaArtificial committed Sep 21, 2024
1 parent 91f3a98 commit fe01b8a
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.3.112

- Added plugin fix that points to jsDelivr github cdn.

## v0.3.111

- Added plugin fix that points to jsDelivr github cdn.
Expand Down
95 changes: 76 additions & 19 deletions plugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Plugin } from '$fresh/server.ts';
import { ResinCssEmitter } from './deps.ts';
// import { ensureDir, walk } from 'https://deno.land/[email protected]/fs/mod.ts';
// import { join } from 'https://deno.land/[email protected]/path/mod.ts';

export default function lunchboxPlugin(): Plugin {
return {
Expand All @@ -16,26 +14,85 @@ export default function lunchboxPlugin(): Plugin {
cssText: ResinCssEmitter({})!.props.children,
},
],
head: [
// Link to your main CSS file
`<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/styles.css"></link>`,

links: [
{
rel: 'stylesheet',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/styles.css',
},
// Preload Figtree fonts
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-700.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`,
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`,
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`,

{
rel: 'preload',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-700.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
{
rel: 'preload',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-Italic.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
{
rel: 'preload',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/Figtree/Figtree-Regular.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
// Preload FiraCode fonts
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/FiraCode/FiraCode-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`,
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/FiraCode/FiraCode-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`,

{
rel: 'preload',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/FiraCode/FiraCode-Bold.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
{
rel: 'preload',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/FiraCode/FiraCode-Regular.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
// Preload Libre Caslon Text fonts
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-700.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`,
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`,
`<link rel="preload" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"></link>`,

// Load fonts.css for any additional font-related styles
`<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/fonts.css"></link>`,
{
rel: 'preload',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-700.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
{
rel: 'preload',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-Italic.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
{
rel: 'preload',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/LibreCaslonText/Libre-Caslon-Text-Regular.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
// Load the fonts.css for font definitions
{
rel: 'stylesheet',
href:
'https://cdn.jsdelivr.net/gh/CarcajadaArtificial/lunchbox/static/fonts/fonts.css',
},
],
};
},
Expand Down

0 comments on commit fe01b8a

Please sign in to comment.