Skip to content

Commit 13d7323

Browse files
authored
Correct image import for collections (#65)
* Correct image import for collections * Common layout for PastEvent, correct image use in PeopleLayout * Update images in new libraries
1 parent dba65f8 commit 13d7323

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+251
-264
lines changed

Diff for: public/images/examples/cute-kitten-Hauskaz.jpeg

162 KB
Loading

Diff for: src/content/libraries/config.ts

+29-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { z, defineCollection } from "astro:content";
2-
import { author, image } from "../shared";
2+
import { author } from "../shared";
33

44
const categories = [
55
"drawing",
@@ -26,23 +26,32 @@ const categories = [
2626
*/
2727
export const librariesCollection = defineCollection({
2828
type: "data",
29-
schema: z.object({
30-
// Name of the library
31-
name: z.string(),
32-
// Description of the library
33-
description: z.string(),
34-
// Which category the library falls in
35-
category: z.enum(categories),
36-
// Url to the source of the library (for example: on GitHub)
37-
sourceUrl: z.string().url(),
38-
// Url to a website for the library
39-
websiteUrl: z.string().url().optional(),
40-
// 1500x1000
41-
featuredImage: image(),
42-
author: author().transform((val) => [val]).or(z.array(author())),
43-
// What license is the library licensed with?
44-
license: z.string().optional(),
45-
npm: z.string().optional(),
46-
npmFilePath: z.string().optional(),
47-
}),
29+
schema: ({ image }) =>
30+
z.object({
31+
// Name of the library
32+
name: z.string(),
33+
// Description of the library
34+
description: z.string(),
35+
// Which category the library falls in
36+
category: z.enum(categories),
37+
// Url to the source of the library (for example: on GitHub)
38+
sourceUrl: z.string().url(),
39+
// Url to a website for the library
40+
websiteUrl: z.string().url().optional(),
41+
// 1500x1000
42+
featuredImage: image().refine(
43+
(img) => img.width >= 1500 && img.height >= 1000,
44+
{
45+
message: "Featured image must be 1500x1000",
46+
},
47+
),
48+
featuredImageAlt: z.string(),
49+
author: author()
50+
.transform((val) => [val])
51+
.or(z.array(author())),
52+
// What license is the library licensed with?
53+
license: z.string().optional(),
54+
npm: z.string().optional(),
55+
npmFilePath: z.string().optional(),
56+
}),
4857
});

Diff for: src/content/libraries/en/c2.js.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ sourceUrl: https://github.com/ren-yuan/c2.js
88
websiteUrl: https://c2js.org
99
npm: c2.js
1010
npmFilePath: dist/c2.min.js
11-
featuredImage:
12-
url: ../images/c2.js.png
13-
altText: Limited Voronoi
11+
featuredImage: ../images/c2.js.png
12+
featuredImageAlt: Limited Voronoi
1413
license: MIT

Diff for: src/content/libraries/en/canvasGUI.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ websiteUrl: http://www.lagers.org.uk/canvasgui/index.html
66
author:
77
name: Peter Lager
88
url: http://www.lagers.org.uk
9-
featuredImage:
10-
url: ../images/canvasGUI.png
11-
altText: Various controls shown on a canvas
9+
featuredImage: ../images/canvasGUI.png
10+
featuredImageAlt: Various controls shown on a canvas
1211
license: MIT

Diff for: src/content/libraries/en/hy5.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ author:
77
sourceUrl: https://github.com/ffd8/hy5
88
websiteUrl: https://hy5live.teddavis.org
99
npmFilePath: ffd8/hy5@main/hy5.js
10-
featuredImage:
11-
url: ../images/hy5.jpg
12-
altText: p5.js spheres with texture from hydra and 'HY5' text, processed a second time with hydra.
13-
license: GNU General Public License v3.0
10+
featuredImage: ../images/hy5.jpg
11+
featuredImageAlt: p5.js spheres with texture from hydra and 'HY5' text, processed a second time with hydra.
12+
license: GNU General Public License v3.0

Diff for: src/content/libraries/en/lygia.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
name: lygia
22
description: |
3-
LYGIA is a shader library of reusable functions that will let you prototype, port or ship a project in just few minutes. It's very granular, flexible and efficient. Support multiple shading languages and can easily be added to any project, enviroment or framework of your choice.
3+
LYGIA is a shader library of reusable functions that will let you prototype, port or ship a project in just few minutes. It's very granular, flexible and efficient. Support multiple shading languages and can easily be added to any project, enviroment or framework of your choice.
44
category: shaders
55
sourceUrl: https://github.com/patriciogonzalezvivo/lygia
66
websiteUrl: https://lygia.xyz/
7-
featuredImage:
8-
url: ../images/lygia.png
9-
altText: Different property materials and color adjustments applied to Standford Dragon geometry, using LYGIA's reusable functions
7+
featuredImage: ../images/lygia.png
8+
featuredImageAlt: Different property materials and color adjustments applied to Standford Dragon geometry, using LYGIA's reusable functions
109
author:
1110
name: Patricio Gonzalez Vivo
1211
url: https://github.com/patriciogonzalezvivo

Diff for: src/content/libraries/en/p5.FIP.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ description: Real-time image processing library - add filters and post-processin
33
category: shaders
44
sourceUrl: https://github.com/prontopablo/p5.FIP
55
websiteUrl: https://prontopablo.github.io/p5.FIP/
6-
featuredImage:
7-
url: ../images/p5.FIP.png
8-
altText: The cover image for the p5.FIP library. Depicts a collage of three photos created using the filters in p5.FIP.
6+
featuredImage: ../images/p5.FIP.png
7+
featuredImageAlt: The cover image for the p5.FIP library. Depicts a collage of three photos created using the filters in p5.FIP.
98
author:
109
name: Darragh Nolan
1110
url: https://github.com/prontopablo

Diff for: src/content/libraries/en/p5.Utils.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ name: p5.Utils
22
category: utils
33
description: p5.Utils is a tool collection for my coding class, featuring a pixel ruler, gradient fill color bindings, and other helpful shortcuts for beginners.
44
author:
5-
name: Alp Tuğan
6-
url: https://www.alptugan.com
5+
name: Alp Tuğan
6+
url: https://www.alptugan.com
77
sourceUrl: https://github.com/alptugan/p5.utils
88
websiteUrl: https://alptugan.github.io/p5.utils/
9-
featuredImage:
10-
url: ../images/p5.utils.png
11-
altText: The cover image for p5Utils library. Depicts the ruler on a yellow background with p5.Utils text in the center.
9+
featuredImage: ../images/p5.utils.png
10+
featuredImageAlt: The cover image for p5Utils library. Depicts the ruler on a yellow background with p5.Utils text in the center.
1211
license: MIT

Diff for: src/content/libraries/en/p5.anims.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ description: Animates p5.js shapes by rendering their drawing processes.
33
category: animation
44
sourceUrl: https://github.com/wixette/p5.animS
55
websiteUrl: https://wixette.github.io/p5.animS
6-
featuredImage:
7-
url: ../images/p5.anims.png
8-
altText: A circle and a Bézier curve animated with p5.animS
6+
featuredImage: ../images/p5.anims.png
7+
featuredImageAlt: A circle and a Bézier curve animated with p5.animS
98
author:
109
name: wixette
1110
url: https://github.com/wixette

Diff for: src/content/libraries/en/p5.bezier.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.bezier
22
description: p5.bezier helps draw Bézier curves with more than four control points and closed curves.
33
category: drawing
44
sourceUrl: https://github.com/peilingjiang/p5.bezier
5-
featuredImage:
6-
url: ../images/p5.bezier.png
7-
altText: The p5.bezier text with curves of different colors.
5+
featuredImage: ../images/p5.bezier.png
6+
featuredImageAlt: The p5.bezier text with curves of different colors.
87
author:
98
name: Peiling Jiang
109
url: https://jiang.pl/

Diff for: src/content/libraries/en/p5.capture.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.capture
22
description: Record your p5.js sketches effortlessly!
33
category: export
44
sourceUrl: https://github.com/tapioca24/p5.capture
5-
featuredImage:
6-
url: ../images/p5.capture.png
7-
altText: "p5.capture: Record your p5.js sketches effortlessly!"
5+
featuredImage: ../images/p5.capture.png
6+
featuredImageAlt: "p5.capture: Record your p5.js sketches effortlessly!"
87
author:
98
name: tapioca24
109
url: https://github.com/tapioca24

Diff for: src/content/libraries/en/p5.createLoop.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ category: animation
33
description: Create animation loops with noise and GIF exports in one line of code.
44
sourceUrl: https://github.com/mrchantey/p5.createLoop
55
websiteUrl: https://www.npmjs.com/package/p5.createloop
6-
featuredImage:
7-
url: ../images/p5.createLoop.png
8-
altText: Three cascading waves created using p5.createLoop
6+
featuredImage: ../images/p5.createLoop.png
7+
featuredImageAlt: Three cascading waves created using p5.createLoop
98
author:
109
name: mrchantey
1110
url: https://github.com/mrchantey

Diff for: src/content/libraries/en/p5.csg.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.csg
22
description: A library for constructive solid geometry. Do Boolean operations on your p5.Geometry to make new shapes!
33
category: 3d
44
sourceUrl: https://github.com/davepagurek/p5.csg
5-
featuredImage:
6-
url: ../images/p5.csg.png
7-
altText: An egg cut up into slices
5+
featuredImage: ../images/p5.csg.png
6+
featuredImageAlt: An egg cut up into slices
87
author:
98
name: Dave Pagurek
109
url: https://www.davepagurek.com

Diff for: src/content/libraries/en/p5.fillGradient.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ category: drawing
33
description: Fill shapes in p5.js with Linear, Radial and Conic Gradients.
44
sourceUrl: https://github.com/alterebro/p5.fillGradient
55
websiteUrl: https://www.npmjs.com/package/p5.fillgradient
6-
featuredImage:
7-
url: ../images/p5.fillGradient.png
8-
altText: Three gradients (linear, radial, and conic) created using p5.fillGradient
6+
featuredImage: ../images/p5.fillGradient.png
7+
featuredImageAlt: Three gradients (linear, radial, and conic) created using p5.fillGradient
98
author:
109
name: Jorge Moreno
1110
url: https://alterebro.com

Diff for: src/content/libraries/en/p5.filterRenderer.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.filterRenderer
22
description: A library for rendering 3D scenes with depth-of-field blur and with ambient occlusion shadows.
33
category: 3d
44
sourceUrl: https://github.com/davepagurek/p5.filterRenderer
5-
featuredImage:
6-
url: ../images/p5.filterRenderer.png
7-
altText: A ladder looking up a shaft towards some light, going progressively more out of focus as it goes into the distance
5+
featuredImage: ../images/p5.filterRenderer.png
6+
featuredImageAlt: A ladder looking up a shaft towards some light, going progressively more out of focus as it goes into the distance
87
author:
98
name: Dave Pagurek
109
url: https://www.davepagurek.com

Diff for: src/content/libraries/en/p5.flex.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.flex
22
description: p5 container with responsive canvas feature.
33
category: utils
44
sourceUrl: https://github.com/ZRNOF/p5.flex
5-
featuredImage:
6-
url: ../images/p5.flex.png
7-
altText: p5.flex preview image
5+
featuredImage: ../images/p5.flex.png
6+
featuredImageAlt: p5.flex preview image
87
author:
98
name: Zaron Chen
109
url: https://zrnof.github.io/

Diff for: src/content/libraries/en/p5.glitch.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ category: animation
33
description: p5.js library for glitching images and binary files in the web browser
44
sourceUrl: https://github.com/ffd8/p5.glitch
55
websiteUrl: https://p5.glitch.me
6-
featuredImage:
7-
url: ../images/p5.glitch.gif
8-
altText: animated p5.glitch logo glitching as a webp file
6+
featuredImage: ../images/p5.glitch.jpg
7+
featuredImageAlt: animated p5.glitch logo glitching as a webp file
98
author:
109
name: Ted Davis
1110
url: https://teddavis.org
1211
npm: p5.glitch
13-
license: MIT
12+
license: MIT

Diff for: src/content/libraries/en/p5.grain.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.grain
22
description: Conveniently add film grain, seamless texture overlays, and manipulate pixels to achieve nostalgic and artistic effects in p5.js sketches and artworks.
33
category: drawing
44
sourceUrl: https://github.com/meezwhite/p5.grain
5-
featuredImage:
6-
url: ../images/p5.grain.png
7-
altText: Colorful hexagonal cubes tessellation spelling "p5.grain"
5+
featuredImage: ../images/p5.grain.png
6+
featuredImageAlt: Colorful hexagonal cubes tessellation spelling "p5.grain"
87
author:
98
name: meezwhite
109
url: https://www.meezwhite.xyz

Diff for: src/content/libraries/en/p5.joystick.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.joystick
22
description: Connect and play with physical joysticks.
33
category: hardware
44
sourceUrl: https://github.com/Vamoss/p5.joystick
5-
featuredImage:
6-
url: ../images/p5.joystick.png
7-
altText: Joystick image
5+
featuredImage: ../images/p5.joystick.png
6+
featuredImageAlt: Joystick image
87
author:
98
name: Vamoss
109
url: https://www.vamoss.com.br

Diff for: src/content/libraries/en/p5.party.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: p5.party
22
category: networking
33
description: quickly prototype networked multiplayer games and apps
4-
author:
4+
author:
55
name: Justin Bakse
66
url: http://justinbakse.com
77
sourceUrl: https://github.com/jbakse/p5.party
88
websiteUrl: https://p5party.org
99
npm: p5.party
1010
npmFilePath: dist/p5.party.js
11-
featuredImage:
12-
url: ../images/p5.party.png
13-
altText: p5.party logo. cheerful pastel block letters spelling "p5.party"
11+
featuredImage: ../images/p5.party.png
12+
featuredImageAlt: p5.party logo. cheerful pastel block letters spelling "p5.party"
1413
license: MIT

Diff for: src/content/libraries/en/p5.tween.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ name: p5.tween
22
description: With p5.tween you can create easily animations as tween in a few keyframes.
33
category: animation
44
sourceUrl: https://github.com/Milchreis/p5.tween
5-
featuredImage:
6-
url: ../images/p5.tween.png
7-
altText: Two circles in different colors and sizes and an arrow from left to right that stylizes a transition.
5+
featuredImage: ../images/p5.tween.png
6+
featuredImageAlt: Two circles in different colors and sizes and an arrow from left to right that stylizes a transition.
87
author:
98
name: Nick Müller
109
url: https://github.com/Milchreis
1110
npm: p5.tween
12-
license: MIT
11+
license: MIT

Diff for: src/content/libraries/en/p5.warp.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.warp
22
description: Fast 3D domain warping using shaders.
33
category: 3d
44
sourceUrl: https://github.com/davepagurek/p5.warp
5-
featuredImage:
6-
url: ../images/p5.warp.png
7-
altText: Four images of a 3D airplane twisting upside-down
5+
featuredImage: ../images/p5.warp.png
6+
featuredImageAlt: Four images of a 3D airplane twisting upside-down
87
author:
98
name: Dave Pagurek
109
url: https://www.davepagurek.com

Diff for: src/content/libraries/en/p5.webserial.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: p5.webserial
22
description: A library for interacting with Serial devices from within the browser, based on Web Serial API (available on Chrome and Edge).
33
category: hardware
44
sourceUrl: https://github.com/gohai/p5.webserial
5-
featuredImage:
6-
url: ../images/p5.webserial.png
7-
altText: Fingers resting on an acrylic cube sporting buttons to control a game unfolding on a laptop screen visible in the background
5+
featuredImage: ../images/p5.webserial.png
6+
featuredImageAlt: Fingers resting on an acrylic cube sporting buttons to control a game unfolding on a laptop screen visible in the background
87
author:
98
name: Gottfried Haider
109
url: https://github.com/gohai/

Diff for: src/content/libraries/en/p5.xr.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ description: A library for creating VR and AR sketches with p5.
33
category: 3d
44
sourceUrl: https://github.com/stalgiag/p5.xr
55
websiteUrl: https://p5xr.org
6-
featuredImage:
7-
url: ../images/p5.xr.png
8-
altText: A crying face
6+
featuredImage: ../images/p5.xr.png
7+
featuredImageAlt: A crying face
98
author:
109
name: Stalgia Grigg
1110
url: https://www.stalgiagrigg.name/

Diff for: src/content/libraries/en/p5play.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ name: p5play
22
description: JS game engine that uses p5.js for graphics and Box2D for physics.
33
category: physics
44
sourceUrl: https://github.com/quinton-ashley/p5play
5-
featuredImage:
6-
url: ../images/p5play.png
7-
altText: The text 'made with p5play' on top of a collage of projects
8-
author:
5+
featuredImage: ../images/p5play.png
6+
featuredImageAlt: The text 'made with p5play' on top of a collage of projects
7+
author:
98
- name: Quinton Ashley
109
url: https://p5play.org
1110
- name: Paolo Pedercini

Diff for: src/content/libraries/en/total-serialism.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ description: A toolbox full of methods for procedurally generating and transform
33
category: algorithms
44
sourceUrl: https://github.com/tmhglnd/total-serialism
55
websiteUrl: https://tmhglnd.github.io/total-serialism/
6-
featuredImage:
7-
url: ../images/'total-serialism.png'
8-
altText: 'A colorful image of circles and squares generated with procedural functions like a cellular automaton, fibonacci sequence and drunk randomness from this library.'
6+
featuredImage: ../images/total-serialism.png
7+
featuredImageAlt: "A colorful image of circles and squares generated with procedural functions like a cellular automaton, fibonacci sequence and drunk randomness from this library."
98
author:
109
name: Timo Hoogland
1110
url: https://www.timohoogland.name/
1211
npm: total-serialism
1312
npmFilePath: build/ts.es5.min.js
14-
license: MIT
13+
license: MIT

Diff for: src/content/libraries/en/webmidi.js.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: WEBMIDI.js
22
description: A user-friendly library to send and receive MIDI messages with ease.
33
category: sound
44
sourceUrl: https://github.com/djipco/webmidi
5-
featuredImage:
6-
url: ../images/webmidi.js.png
7-
altText: Kickstart your JavaScript MIDI projects!
5+
featuredImage: ../images/webmidi.js.png
6+
featuredImageAlt: Kickstart your JavaScript MIDI projects!
87
author:
98
name: Jean-Philippe Côté
109
url: https://djip.co

Diff for: src/content/libraries/es/p5.xr.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ description: Librería
33
category: 3d
44
sourceUrl: https://github.com/stalgiag/p5.xr
55
websiteUrl: https://p5xr.org
6-
featuredImage:
7-
url: p5.xr.png
8-
altText: Cara lorrando
6+
featuredImage: ../images/p5.xr.png
7+
featuredImageAlt: Cara lorrando
98
author:
109
name: Stalgia Grigg
1110
url: https://www.stalgiagrigg.name/

Diff for: src/content/libraries/images/p5.glitch.jpg

60.5 KB
Loading

Diff for: src/content/libraries/images/p5play.png

390 KB
Loading

0 commit comments

Comments
 (0)