mirror of
https://github.com/kremalicious/blog.git
synced 2024-06-24 10:16:27 +02:00
downloads solution
This commit is contained in:
parent
5335b407b7
commit
cafb9521b2
|
@ -4,9 +4,10 @@ import remarkToc from './src/lib/remark-toc.mjs'
|
|||
import react from '@astrojs/react'
|
||||
|
||||
// https://astro.build/config
|
||||
/** @type {import('astro').AstroUserConfig} */
|
||||
/** @type {import('astro/config').AstroUserConfig} */
|
||||
export default defineConfig({
|
||||
site: 'https://kremalicious.com',
|
||||
output: 'static',
|
||||
markdown: {
|
||||
remarkPlugins: [remarkLeadParagraph, remarkToc],
|
||||
shikiConfig: {
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es2020": true,
|
||||
"jest": true
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest",
|
||||
|
@ -18,6 +12,7 @@
|
|||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:astro/recommended",
|
||||
"plugin:prettier/recommended"
|
||||
],
|
||||
"rules": {
|
||||
|
|
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,16 +1,17 @@
|
|||
node_modules
|
||||
.yarnclean
|
||||
.cache
|
||||
plugins/gatsby-redirect-from
|
||||
coverage
|
||||
.env
|
||||
.env.development
|
||||
.nova
|
||||
src/@types/Gatsby.d.ts
|
||||
|
||||
# build output
|
||||
dist/
|
||||
src/images/icons/
|
||||
|
||||
# generated types
|
||||
.astro/
|
||||
.astro/
|
||||
|
||||
# autogenerated stuff
|
||||
public/get/
|
|
@ -23,7 +23,8 @@ const schemaShared = {
|
|||
author: z.string().optional(),
|
||||
featured: z.boolean().optional(),
|
||||
style: z.string().optional(),
|
||||
toc: z.boolean().optional()
|
||||
toc: z.boolean().optional(),
|
||||
slug: z.string().optional()
|
||||
}
|
||||
|
||||
export const schemaArticles = (image: ImageFunction) =>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Aperture File Types
|
||||
image: ./Teaser-Aperture-File-Types.jpg
|
||||
download: ./aperturefiletypes_by_kremalicious.zip
|
||||
download: /get/aperturefiletypes_by_kremalicious.zip
|
||||
author: Matthias Kretschmann
|
||||
date: 2008-04-04T01:55:54.000Z
|
||||
|
||||
|
@ -29,7 +29,7 @@ These icons are free for your personal use and include icons for all file types
|
|||
Get them and have fun.
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="../media/aperturefiletypes_by_kremalicious.zip">Download</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/aperturefiletypes_by_kremalicious.zip">Download</a>
|
||||
</p>
|
||||
|
||||
And don't forget to read my article about [how to change the generic image icons in Mac OS X Leopard](/changing-the-image-icons-in-mac-os-x-leopard/).
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Chives
|
||||
image: ./Teaser-Chives.jpg
|
||||
download: ./chives_by_kremalicious.zip
|
||||
download: /get/chives_by_kremalicious.zip
|
||||
author: Matthias Kretschmann
|
||||
|
||||
date: 2008-06-01 18:43:40+00:00
|
||||
|
@ -19,5 +19,5 @@ I have added my first wallpaper to the Goodies section on this website. It's a s
|
|||
You can get the wallpaper by browsing [my Goodies section](https://kremalicious.com/goodies/) and clicking on the download link for the wallpaper. The download package also includes a custom folder icon (512px as .icns, .png, .ico) with the Chives wallpaper on it.
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./chives_by_kremalicious.zip">Download Chives Wallpaper</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/chives_by_kremalicious.zip">Download Chives Wallpaper</a>
|
||||
</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Niépce's Camera Obscura And The History Of The First Photograph
|
||||
image: ./Teaser-Camera-Obscura-Icons.jpg
|
||||
download: ./niepces_camera_obscura_by_kremalicious.zip
|
||||
download: /get/niepces_camera_obscura_by_kremalicious.zip
|
||||
|
||||
date: 2008-06-03 14:34:03+00:00
|
||||
|
||||
|
@ -92,7 +92,7 @@ Brief description of Daguerres role in the invention of photography process by T
|
|||
This icon package was exclusively announced first on [MacThemes](http://macthemes2.net) and you can download it from the [Goodies section on this website](/goodies/) or directly via this link:
|
||||
|
||||
<p class="content-download">
|
||||
<a class="btn btn-primary icon-download" href="./niepces_camera_obscura_by_kremalicious.zip">Download</a>
|
||||
<a class="btn btn-primary icon-download" href="/get/niepces_camera_obscura_by_kremalicious.zip">Download</a>
|
||||
</p>
|
||||
|
||||
In addition to these icons you can download the [associated wallpapers for your desktop or your iPhone](http://www.kremalicious.com/2008/06/new-goodie-niepces-camera-obscura-wallpaper-pack/).
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Niépce's Camera Obscura Wallpaper Pack
|
||||
image: ./Teaser-Camera-Obscura-Walls.jpg
|
||||
download: ./niepces_camera_obscura_wallpaper_pack_by_kremalicious.zip
|
||||
download: /get/niepces_camera_obscura_wallpaper_pack_by_kremalicious.zip
|
||||
author: Matthias Kretschmann
|
||||
|
||||
date: 2008-06-03 13:32:24+00:00
|
||||
|
@ -19,7 +19,7 @@ In addition to my Niépce's Camera Obscura icons for Aperture and iPhoto I have
|
|||
All Wallpapers are using a custom designed background which imitates the look of a metal plate like it was used in Niépce's experiments although it wasn't golden. To make it more Mac style I have added a stenciled dots pattern (which is a commonly used reference to the front design of the MacPro).
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./niepces_camera_obscura_wallpaper_pack_by_kremalicious.zip">Download Niépce's Camera Obscura Wallpaper</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/niepces_camera_obscura_wallpaper_pack_by_kremalicious.zip">Download Niépce's Camera Obscura Wallpaper</a>
|
||||
</p>
|
||||
|
||||
Here are the details:
|
||||
|
|
|
@ -376,7 +376,7 @@ Here you can see the icons included in the Server Displays icon pack:
|
|||
Because I've just modified Apple's standard icons these icons are just available via this blog post and they will not show up in my Goodies section. Just download the whole package directly via this link:
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./server_displays_by_kremalicious.zip">Download Server Display Icons <span>zip</span></a>
|
||||
<a class="icon-download btn btn-primary" href="/get/server_displays_by_kremalicious.zip">Download Server Display Icons <span>zip</span></a>
|
||||
</p>
|
||||
|
||||
### How to use the icons
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Icy Box Icons
|
||||
image: ./Teaser-Icy-Box.jpg
|
||||
download: ./icybox_by_kremalicious.zip
|
||||
download: /get/icybox_by_kremalicious.zip
|
||||
|
||||
date: 2008-08-26 19:16:38+00:00
|
||||
|
||||
|
@ -20,7 +20,7 @@ As always these desktop icons are free for you personal and non-commercial use.
|
|||
The whole package includes 7 icons either packed in a nice tagged iContainer for use with Candybar or in Mac + Win + Linux compatible formats. If you have such an Icy Box case grab the icons. Have fun!
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./icybox_by_kremalicious.zip">Download Icy Box Icons <span>zip</span></a>
|
||||
<a class="icon-download btn btn-primary" href="/get/icybox_by_kremalicious.zip">Download Icy Box Icons <span>zip</span></a>
|
||||
</p>
|
||||
|
||||
- Replacement icons for the silver and black Icy Box external aluminium case with USB interface
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Futurama Mars University Wallpaper
|
||||
image: ./Teaser-Mars-U.jpg
|
||||
download: ./mars-u-wall-by-kremalicious.zip
|
||||
download: /get/mars-u-wall-by-kremalicious.zip
|
||||
author: Matthias Kretschmann
|
||||
|
||||
date: 2008-09-23 23:22:16+00:00
|
||||
|
@ -18,5 +18,5 @@ redirect_from:
|
|||
Show your geeky love for extraterrestrial universities! This is a simple Futurama tribute wallpaper displaying the logo of the Mars University as seen in the first season (1ACV11/S02E02). But I've modified it a bit to get it out of the 2D. Including one high-resolution desktop version for widescreen displays (2560x1600) and one iPhone version (320x480).
|
||||
|
||||
<p class="content-download ">
|
||||
<a class="icon-download btn btn-primary" href="./mars-u-wall-by-kremalicious.zip">Download Futurama Mars U Wallpaper <span>zip</span></a>
|
||||
<a class="icon-download btn btn-primary" href="/get/mars-u-wall-by-kremalicious.zip">Download Futurama Mars U Wallpaper <span>zip</span></a>
|
||||
</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Coffee Cup Icon
|
||||
image: ./Teaser-Coffee-Cup-Icon.jpg
|
||||
download: ./coffee_cup_by_kremalicious.zip
|
||||
download: /get/coffee_cup_by_kremalicious.zip
|
||||
author: Matthias Kretschmann
|
||||
|
||||
date: 2008-10-23 14:59:23+00:00
|
||||
|
@ -22,5 +22,5 @@ I’ve just released my own coffee cup icon, enjoy:
|
|||
## Download
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./coffee_cup_by_kremalicious.zip">Download Coffee Cup Icons</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/coffee_cup_by_kremalicious.zip">Download Coffee Cup Icons</a>
|
||||
</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: We Are Out Of Whale Oil
|
||||
image: ./Teaser-Out-Of-Whale-Oil.jpg
|
||||
download: ./out-of-whale-oil-wall-by-kremalicious.zip
|
||||
download: /get/out-of-whale-oil-wall-by-kremalicious.zip
|
||||
|
||||
date: 2009-02-17 20:11:55+00:00
|
||||
|
||||
|
@ -29,5 +29,5 @@ Simple, high-resolution Futurama tribute wallpaper pack inspired by the latest F
|
|||
Seriously, the pink versions are burning my eyes but the pink is a good reference to the events in the recent movie.
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./out-of-whale-oil-wall-by-kremalicious.zip">Download</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/out-of-whale-oil-wall-by-kremalicious.zip">Download</a>
|
||||
</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Ultimate Share Link Bonanza For Coda, WordPress And Everything Else
|
||||
download: ./share-link-bonanza-coda-clips.zip
|
||||
download: /get/share-link-bonanza-coda-clips.zip
|
||||
|
||||
date: 2009-03-29 23:12:15+00:00
|
||||
|
||||
|
@ -28,7 +28,7 @@ But I think you don't want to load tons of scripts on your websites if you inclu
|
|||
|
||||
To make this a bit more straightforward I provide these links compiled within two Coda Clip files for use with [Panic's Coda](http://panic.com/coda). While the first clip group contains all the plain link snippets the second group includes those snippets for use with Wordpress. Just download and add them to your Coda Clips collection:
|
||||
|
||||
<a class="btn btn-primary icon icon-download" href="./share-link-bonanza-coda-clips.zip" title="Download Share Links Coda Clips">Download Share Links Coda Clips</a>
|
||||
<a class="btn btn-primary icon icon-download" href="/get/share-link-bonanza-coda-clips.zip" title="Download Share Links Coda Clips">Download Share Links Coda Clips</a>
|
||||
|
||||
Included are a **total of 40 share links per clip group** for the following social/bookmark sites. This list uses the links provided in the Coda clips so you can test them out here with this article:
|
||||
|
||||
|
@ -41,7 +41,7 @@ _
|
|||
|
||||
If you download the above Coda Clip files this icon is already applied on the clip files but here're just the icon files (icns, folder, iContainer, PNGs):
|
||||
|
||||
<a class="btn btn-primary icon icon-download" href="./coda-clips-icon-files.zip" title="Download Coda Clips Icon">Download Coda Clips Icon</a>
|
||||
<a class="btn btn-primary icon icon-download" href="/get/coda-clips-icon-files.zip" title="Download Coda Clips Icon">Download Coda Clips Icon</a>
|
||||
|
||||
## 2. Usage
|
||||
|
||||
|
@ -142,7 +142,7 @@ If you want to use just icons and no text you should provide a link text anyway
|
|||
|
||||
Sadly Coda's clips aren't in a portable format ([Panic guys](http://panic.com), consider this is a feature request!) so here's a comprehensive list for the non-Coda users of all the links included in the above Coda Clips with plain and the Wordpress version for every site. This comes as a downloadable stripped-down HTML file (meaning there's no HTML site structure included) and as a long list within in this article. First, here's the HTML file download. Just open this locally in your browser or in your favorite editor:
|
||||
|
||||
<a class="btn btn-primary icon icon-download" href="./share-link-bonanza-html.zip" title="Download Share Links HTML File">Download Share Links HTML File</a>
|
||||
<a class="btn btn-primary icon icon-download" href="/get/share-link-bonanza-html.zip" title="Download Share Links HTML File">Download Share Links HTML File</a>
|
||||
|
||||
And here's the huge list with all the share links in case you quickly want to grab just one of them. But be warned that this is a huge list so this is hidden by default.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Twitter Crisp
|
||||
image: ./Teaser-Twitter-Crisp.jpg
|
||||
download: ./twitter-crisp-by-kremalicious.zip
|
||||
download: /get/twitter-crisp-by-kremalicious.zip
|
||||
author: Matthias Kretschmann
|
||||
|
||||
date: 2009-06-04 00:16:40+00:00
|
||||
|
@ -16,7 +16,7 @@ Here's a quick twitter icon for use on your websites which is kind of a by-produ
|
|||
This icon comes in various formats (PNG, ICNS, iContainer) and in 4 different sizes (128px, 48px, 32px, 16px) with each icon size redrawn (of course).
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./twitter-crisp-by-kremalicious.zip">Download</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/twitter-crisp-by-kremalicious.zip">Download</a>
|
||||
</p>
|
||||
|
||||
Use them on any web project you like and/or [convert them into a send to twitter link](http://kremalicious.com/ultimate-coda-wordpress-share-link-bonanza/). Have fun!
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Adiumeetie. Tweetie Style Adium Icon
|
||||
image: ./Teaser-Adiumeetie.jpg
|
||||
download: ./adiumeetie-by-kremalicious.zip
|
||||
download: /get/adiumeetie-by-kremalicious.zip
|
||||
|
||||
date: 2009-06-24 21:00:38+00:00
|
||||
|
||||
|
@ -26,7 +26,7 @@ The icon comes in various formats (iContainer, icns, png) in sizes from 512px-16
|
|||
Just head over [to my Goodies page](http://www.kremalicious.com/goodies/) or click the following download button and grab this icon while it's hot.
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./adiumeetie-by-kremalicious.zip">Download</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/adiumeetie-by-kremalicious.zip">Download</a>
|
||||
</p>
|
||||
|
||||
## Adium Icon Usage
|
||||
|
|
|
@ -22,7 +22,7 @@ But the default menubar icon and the other interface icons look quite disturbing
|
|||
Just head over [to my Goodies page](http://www.kremalicious.com/goodies/) or click the following download button and grab these replacement icons.
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./delibar-by-kremalicious.zip">Download</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/delibar-by-kremalicious.zip">Download</a>
|
||||
</p>
|
||||
|
||||
## Icon Usage
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: iPixelPad - Tongue Twisting But Crisp iPad Icons
|
||||
image: ./Teaser-iPixelPad.png
|
||||
download: ./ipixelpad_by_kremalicious.zip
|
||||
download: /get/ipixelpad_by_kremalicious.zip
|
||||
date: 2010-02-04 15:21:42+00:00
|
||||
|
||||
tags:
|
||||
|
@ -29,7 +29,7 @@ The homescreen icons pixels in the 16px version needed all more vivid colors to
|
|||
The icons come in various formats: iContainer, ICNS, ICO and PNG files for each size. Just click the following download button to grab the whole pack:
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./ipixelpad_by_kremalicious.zip">Download</a>
|
||||
<a class="icon-download btn btn-primary" href="/get/ipixelpad_by_kremalicious.zip">Download</a>
|
||||
</p>
|
||||
|
||||
## License
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: MomCorp Wallpaper
|
||||
image: ./Teaser-MomCorp-Wall.png
|
||||
download: ./momcorp_wall_by_kremalicious.zip
|
||||
download: /get/momcorp_wall_by_kremalicious.zip
|
||||
author: Matthias Kretschmann
|
||||
|
||||
date: 2010-07-03 17:12:53+00:00
|
||||
|
@ -23,6 +23,6 @@ The wallpaper comes in four versions with two color variations and two text vari
|
|||
You can grab the full zip-package with versions for Desktop, iPad, iPhone & Android included:
|
||||
|
||||
<p class="content-download">
|
||||
<a class="btn btn-primary icon-download" href="./momcorp_wall_by_kremalicious.zip">Download</a>
|
||||
<a class="btn btn-primary icon-download" href="/get/momcorp_wall_by_kremalicious.zip">Download</a>
|
||||
<a href="http://krlc.us/givecoffee" class="btn icon-heart">Donate</a>
|
||||
</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Project Purple
|
||||
image: ./Teaser-Project-Purple.png
|
||||
download: ./project-purple-kremalicious.zip
|
||||
download: /get/project-purple-kremalicious.zip
|
||||
author: Matthias Kretschmann
|
||||
|
||||
date: 2012-08-07 13:15:44+00:00
|
||||
|
@ -30,7 +30,7 @@ The full size I designed the wallpaper in is 3200x2048px. I don't know why Apple
|
|||
Download the whole package with all the sizes included or grab the individual ones from the list, all linked to the image files:
|
||||
|
||||
<p class="content-download">
|
||||
<a class="icon-download btn btn-primary" href="./project-purple-kremalicious.zip">Download <span> zip</span></a>
|
||||
<a class="icon-download btn btn-primary" href="/get/project-purple-kremalicious.zip">Download <span> zip</span></a>
|
||||
</p>
|
||||
|
||||
- [Desktop/rMBP/iPad 3 (3200x2048)](./project-purple-kremalicious.png)
|
||||
|
|
211
package-lock.json
generated
211
package-lock.json
generated
|
@ -48,6 +48,8 @@
|
|||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-testing-library": "^6.0.1",
|
||||
"front-matter": "^4.0.2",
|
||||
"glob": "^10.3.4",
|
||||
"hast-util-to-html": "^9.0.0",
|
||||
"jest": "^29.6.4",
|
||||
"jest-environment-jsdom": "^29.6.4",
|
||||
|
@ -1586,6 +1588,26 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@jest/reporters/node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/@jest/reporters/node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"dev": true,
|
||||
|
@ -7748,14 +7770,46 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/front-matter": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz",
|
||||
"integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"js-yaml": "^3.13.1"
|
||||
}
|
||||
},
|
||||
"node_modules/front-matter/node_modules/argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/front-matter/node_modules/js-yaml": {
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
||||
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"js-yaml": "bin/js-yaml.js"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"devOptional": true,
|
||||
"license": "ISC"
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
||||
"devOptional": true
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.2",
|
||||
|
@ -7885,19 +7939,22 @@
|
|||
"license": "ISC"
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"devOptional": true,
|
||||
"license": "ISC",
|
||||
"version": "10.3.4",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz",
|
||||
"integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
"foreground-child": "^3.1.0",
|
||||
"jackspeak": "^2.0.3",
|
||||
"minimatch": "^9.0.1",
|
||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
|
||||
"path-scurry": "^1.10.1"
|
||||
},
|
||||
"bin": {
|
||||
"glob": "dist/cjs/src/bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
|
@ -7914,6 +7971,30 @@
|
|||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/glob/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/glob/node_modules/minimatch": {
|
||||
"version": "9.0.3",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/global-modules": {
|
||||
"version": "2.0.0",
|
||||
"dev": true,
|
||||
|
@ -8659,8 +8740,9 @@
|
|||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
||||
"devOptional": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
|
@ -9757,6 +9839,26 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/jest-config/node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-config/node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"dev": true,
|
||||
|
@ -10733,6 +10835,26 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/jest-runtime/node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-runtime/node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"dev": true,
|
||||
|
@ -13776,8 +13898,9 @@
|
|||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
|
@ -15540,6 +15663,26 @@
|
|||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf/node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "3.28.1",
|
||||
"license": "MIT",
|
||||
|
@ -16619,6 +16762,26 @@
|
|||
"url": "https://opencollective.com/stylus"
|
||||
}
|
||||
},
|
||||
"node_modules/stylus/node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"devOptional": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/suf-log": {
|
||||
"version": "2.5.3",
|
||||
"dev": true,
|
||||
|
@ -16808,6 +16971,26 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/test-exclude/node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/text-encoding-utf-8": {
|
||||
"version": "1.0.2"
|
||||
},
|
||||
|
|
11
package.json
11
package.json
|
@ -7,8 +7,9 @@
|
|||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "npm run create:icons && astro dev --config .config/astro.config.mjs",
|
||||
"build": "npm run create:icons && astro build --config .config/astro.config.mjs",
|
||||
"prebuild": "npm run create:icons && npm run move:downloads",
|
||||
"start": "npm run prebuild && astro dev --config .config/astro.config.mjs",
|
||||
"build": "npm run prebuild && astro build --config .config/astro.config.mjs",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"test": "astro check && tsc --noEmit && npm run lint && npm run type-check && npm run jest",
|
||||
|
@ -21,7 +22,9 @@
|
|||
"type-check": "tsc --noEmit",
|
||||
"deploy:s3": "./scripts/deploy-s3.sh",
|
||||
"new": "ts-node --esm scripts/new.ts",
|
||||
"create:icons": "ts-node --esm scripts/create-icons/index.ts"
|
||||
"create:icons": "ts-node --esm scripts/create-icons/index.ts",
|
||||
"move:downloads": "ts-node --esm scripts/move-downloads.ts",
|
||||
"create:redirects": "ts-node --esm scripts/redirect-from.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/react": "^3.0.0",
|
||||
|
@ -63,6 +66,8 @@
|
|||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-testing-library": "^6.0.1",
|
||||
"front-matter": "^4.0.2",
|
||||
"glob": "^10.3.4",
|
||||
"hast-util-to-html": "^9.0.0",
|
||||
"jest": "^29.6.4",
|
||||
"jest-environment-jsdom": "^29.6.4",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
//
|
||||
import fs from 'node:fs/promises'
|
||||
import ps from 'node:path/posix'
|
||||
import ora from 'ora'
|
||||
import { toAstroComponent, toInnerSvg } from './svg.ts'
|
||||
|
||||
// Current directory.
|
||||
|
@ -21,6 +22,8 @@ const distDir = ps.resolve(currentDir, 'src/images/icons')
|
|||
// Data related to each icon exported by this package.
|
||||
const icons = []
|
||||
|
||||
const spinner = ora('Create icon components').start()
|
||||
|
||||
// clean the distribution directory
|
||||
await fs.rm(distDir, { force: true, recursive: true })
|
||||
await fs.mkdir(distDir, { recursive: true })
|
||||
|
@ -86,4 +89,4 @@ for (const src of srcDirs) {
|
|||
// write the main entry `index.ts` file
|
||||
await fs.writeFile(ps.resolve(distDir, 'index.ts'), contentOfIndexJS, 'utf8')
|
||||
|
||||
console.log(`✔️ Generated ${icons.length} icons into @images/icons.`)
|
||||
spinner.succeed(`Generated ${icons.length} icons into @images/icons.`)
|
||||
|
|
58
scripts/move-downloads.ts
Normal file
58
scripts/move-downloads.ts
Normal file
|
@ -0,0 +1,58 @@
|
|||
//
|
||||
// Find all zip files in all article folders
|
||||
// and copy them to public/get/ folder.
|
||||
//
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { glob } from 'glob'
|
||||
import ora from 'ora'
|
||||
|
||||
const sourceFolder = './content/articles/'
|
||||
const destinationFolder = './public/get/'
|
||||
const filesGlob = '**/*.zip'
|
||||
|
||||
const spinner = ora('Move downloads').start()
|
||||
|
||||
function removeFolderContents(folderPath: string) {
|
||||
if (fs.existsSync(folderPath)) {
|
||||
fs.readdirSync(folderPath).forEach((file) => {
|
||||
const filePath = path.join(folderPath, file)
|
||||
if (fs.lstatSync(filePath).isDirectory()) {
|
||||
removeFolderContents(filePath)
|
||||
fs.rmdirSync(filePath)
|
||||
} else {
|
||||
fs.unlinkSync(filePath)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function copyZipFiles(source: string, destination: string) {
|
||||
// Clean out the destination folder
|
||||
removeFolderContents(destination)
|
||||
|
||||
// Create the destination folder if it doesn't exist
|
||||
if (!fs.existsSync(destination)) {
|
||||
fs.mkdirSync(destination, { recursive: true })
|
||||
}
|
||||
|
||||
// Find all files recursively in the source folder
|
||||
const zipFiles = glob.sync(filesGlob, { cwd: source })
|
||||
|
||||
zipFiles.forEach((zipFile: string) => {
|
||||
const sourcePath = path.join(source, zipFile)
|
||||
const destinationPath = path.join(destination, path.basename(zipFile))
|
||||
|
||||
try {
|
||||
// Copy the file to the destination folder
|
||||
fs.copyFileSync(sourcePath, destinationPath)
|
||||
} catch (error: any) {
|
||||
spinner.fail(`Error copying ${zipFile}: ${(error as Error).message}`)
|
||||
return
|
||||
}
|
||||
})
|
||||
|
||||
spinner.succeed(`Copied ${zipFiles.length} .zip files to ${destination}`)
|
||||
}
|
||||
|
||||
copyZipFiles(sourceFolder, destinationFolder)
|
0
src/pages/thanks.astro
Normal file
0
src/pages/thanks.astro
Normal file
Loading…
Reference in New Issue
Block a user