Skip to content

Commit f1ecc98

Browse files
HaudinFlorenceSylvainCorlay
authored andcommitted
Use the script yml-to-json.ts in /src/components/blog to produce a .json from the _config.yml including necessary modifications on the blog posts informations in particular on image widths.
1 parent 3b17575 commit f1ecc98

17 files changed

+1889
-498
lines changed

.docusaurus/client-manifest.json

+549-199
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"metadata":{"permalink":"/quantstack.github.io/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"archive":{"blogPosts":[{"id":"/CondaForge","metadata":{"permalink":"/quantstack.github.io/blog/CondaForge","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/CondaForge.mdx","source":"@site/blog/CondaForge.mdx","title":"CondaForge","description":"QuantStack is one of the key organizations supporting the","date":"2024-06-13T09:41:00.645Z","tags":[],"readingTime":0.435,"hasTruncateMarker":false,"authors":[],"frontMatter":{},"unlisted":false},"content":"QuantStack is one of the key organizations supporting the\nconda-forge project, a community-led collection of recipes, build\ninfrastructure and distributions for the conda/mamba package\nmanager.\n\nAdopted at the global scale, conda-forge has become the reference\nsource of build artifacts for the scientific computing ecosystem,\naccounting for over 150 million package downloads monthly.\n\nQuantStack developed key components of the conda-forge\ninfrastructure, including the mamba package manager and the\nmamba-build utility, which underlie the build system of conda-forge.\nQuantStack team members also maintain a large number of conda-forge\npackages."}]}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"permalink": "/quantstack.github.io/blog/CondaForge",
3+
"editUrl": "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/CondaForge.md",
4+
"source": "@site/blog/CondaForge.md",
5+
"title": "CondaForge",
6+
"description": "QuantStack is one of the key organizations supporting the",
7+
"date": "2024-06-13T09:41:00.645Z",
8+
"tags": [],
9+
"readingTime": 0.435,
10+
"hasTruncateMarker": false,
11+
"authors": [],
12+
"frontMatter": {},
13+
"unlisted": false
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"permalink": "/quantstack.github.io/blog/CondaForge",
3+
"editUrl": "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/CondaForge.mdx",
4+
"source": "@site/blog/CondaForge.mdx",
5+
"title": "CondaForge",
6+
"description": "QuantStack is one of the key organizations supporting the",
7+
"date": "2024-06-13T09:41:00.645Z",
8+
"tags": [],
9+
"readingTime": 0.435,
10+
"hasTruncateMarker": false,
11+
"authors": [],
12+
"frontMatter": {},
13+
"unlisted": false
14+
}

package-lock.json

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/blog/BlogpostCard.tsx

+47-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import React from "react";
44
import styles from "./styles.module.css";
55
import Link from "@docusaurus/Link";
6+
import useBaseUrl from '@docusaurus/useBaseUrl';
67

78
export function BlogpostPicture({ blogpost }) {
89
return (
@@ -12,20 +13,63 @@ export function BlogpostPicture({ blogpost }) {
1213
);
1314
}
1415

15-
export default function BlogpostCard({ blogpost }) {
16+
export default function BlogpostCard({ blogpost, timeIndex }) {
17+
if (blogpost.image.includes("https://")){
1618
return (
1719
<div
1820
className={"card " + styles.blogpost_card}
1921
style={{ marginBottom: "var(--ifm-spacing-lg)" }}
2022
>
23+
<div className={styles.blog_time_index}>{timeIndex}</div>
2124
<Link href={blogpost.url}>
2225
<div className="container">
2326
<div className={"row" + " " + styles.row_custom}></div>
27+
28+
<div className={styles.blogpost_image_container}>
29+
<div className={styles.blogpost_image}>
30+
<img src={blogpost.image} id={blogpost.imageID} width={blogpost.imageWidth} />
31+
</div>
32+
</div>
33+
34+
<div className={styles.blogpost_header}>{blogpost.title}</div>
35+
36+
<div className={styles.blogpost_summary}>
37+
{blogpost.summary.length < 200
38+
? blogpost.summary
39+
: blogpost.summary.substring(0, 200) + "..."}
40+
</div>
41+
42+
<div
43+
className="row"
44+
style={{ marginBottom: "var(--ifm-spacing-md)" }}
45+
>
46+
<div className="col" style={{ padding: "0px" }}>
47+
<div className={styles.blogpost_date}>{blogpost.date}</div>
48+
<div className={styles.blogpost_authors}>{blogpost.authors}</div>
49+
</div>
50+
</div>
51+
</div>
52+
</Link>
53+
</div>
54+
);
55+
} else if(blogpost.image.includes('/img/'))
56+
{
57+
return (
58+
<div
59+
className={"card " + styles.blogpost_card}
60+
style={{ marginBottom: "var(--ifm-spacing-lg)" }}
61+
>
62+
<div className={styles.blog_time_index}>{timeIndex}</div>
63+
<Link href={blogpost.url}>
64+
<div className="container">
65+
<div className={"row" + " " + styles.row_custom}></div>
66+
2467
<div className={styles.blogpost_image_container}>
2568
<div className={styles.blogpost_image}>
26-
<img src={blogpost.image} width={blogpost.imageWidth} />
69+
<img src={useBaseUrl(blogpost.image)} width={blogpost.imageWidth} id={blogpost.imageID} />
2770
</div>
2871
</div>
72+
2973
<div className={styles.blogpost_header}>{blogpost.title}</div>
3074

3175
<div className={styles.blogpost_summary}>
@@ -48,3 +92,4 @@ export default function BlogpostCard({ blogpost }) {
4892
</div>
4993
);
5094
}
95+
}

src/components/blog/_config.yml

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ copyright:
55

66
blog:
77

8+
- url: https://blog.jupyter.org/jupytergis-d63b7adf9d0c
9+
title: "JupyterGIS"
10+
image: https://miro.medium.com/v2/resize:fit:1400/format:webp/1*IkYCf2cbk3SaxaROQ0eUsA.png
11+
summary: "We are thrilled to announce that the European Space Agency (ESA) is funding our proposal “Real-time collaboration and collaborative editing for GIS workflows with Jupyter and QGIS.”"
12+
date: June 12, 2024
13+
authors: Sylvain Corlay, Anne Fouilloux, Monika Weissschnur
14+
815
- url: https://medium.com/@SylvainCorlay/commit-cdf57415b94b
916
title: "Commit!"
1017
image: https://miro.medium.com/v2/0*3gKzwBOWprSRs35k

0 commit comments

Comments
 (0)