Skip to content

Commit

Permalink
Use the script yml-to-json.ts in /src/components/blog to produce a .j…
Browse files Browse the repository at this point in the history
…son from the _config.yml including necessary modifications on the blog posts informations in particular on image widths.
  • Loading branch information
HaudinFlorence committed Jun 13, 2024
1 parent 475c92d commit 719faa6
Show file tree
Hide file tree
Showing 17 changed files with 1,889 additions and 498 deletions.
748 changes: 549 additions & 199 deletions .docusaurus/client-manifest.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"metadata":{"permalink":"/quantstack.github.io/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}}
Original file line number Diff line number Diff line change
@@ -0,0 +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 number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"permalink": "/quantstack.github.io/blog/CondaForge",
"editUrl": "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/CondaForge.md",
"source": "@site/blog/CondaForge.md",
"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
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"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
}
6 changes: 4 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 47 additions & 2 deletions src/components/blog/BlogpostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import React from "react";
import styles from "./styles.module.css";
import Link from "@docusaurus/Link";
import useBaseUrl from '@docusaurus/useBaseUrl';

export function BlogpostPicture({ blogpost }) {
return (
Expand All @@ -12,20 +13,63 @@ export function BlogpostPicture({ blogpost }) {
);
}

export default function BlogpostCard({ blogpost }) {
export default function BlogpostCard({ blogpost, timeIndex }) {
if (blogpost.image.includes("https://")){
return (
<div
className={"card " + styles.blogpost_card}
style={{ marginBottom: "var(--ifm-spacing-lg)" }}
>
<div className={styles.blog_time_index}>{timeIndex}</div>
<Link href={blogpost.url}>
<div className="container">
<div className={"row" + " " + styles.row_custom}></div>

<div className={styles.blogpost_image_container}>
<div className={styles.blogpost_image}>
<img src={blogpost.image} id={blogpost.imageID} width={blogpost.imageWidth} />
</div>
</div>

<div className={styles.blogpost_header}>{blogpost.title}</div>

<div className={styles.blogpost_summary}>
{blogpost.summary.length < 200
? blogpost.summary
: blogpost.summary.substring(0, 200) + "..."}
</div>

<div
className="row"
style={{ marginBottom: "var(--ifm-spacing-md)" }}
>
<div className="col" style={{ padding: "0px" }}>
<div className={styles.blogpost_date}>{blogpost.date}</div>
<div className={styles.blogpost_authors}>{blogpost.authors}</div>
</div>
</div>
</div>
</Link>
</div>
);
} else if(blogpost.image.includes('/img/'))
{
return (
<div
className={"card " + styles.blogpost_card}
style={{ marginBottom: "var(--ifm-spacing-lg)" }}
>
<div className={styles.blog_time_index}>{timeIndex}</div>
<Link href={blogpost.url}>
<div className="container">
<div className={"row" + " " + styles.row_custom}></div>

<div className={styles.blogpost_image_container}>
<div className={styles.blogpost_image}>
<img src={blogpost.image} width={blogpost.imageWidth} />
<img src={useBaseUrl(blogpost.image)} width={blogpost.imageWidth} id={blogpost.imageID} />
</div>
</div>

<div className={styles.blogpost_header}>{blogpost.title}</div>

<div className={styles.blogpost_summary}>
Expand All @@ -48,3 +92,4 @@ export default function BlogpostCard({ blogpost }) {
</div>
);
}
}
7 changes: 7 additions & 0 deletions src/components/blog/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ copyright:

blog:

- url: https://blog.jupyter.org/jupytergis-d63b7adf9d0c
title: "JupyterGIS"
image: https://miro.medium.com/v2/resize:fit:1400/format:webp/1*IkYCf2cbk3SaxaROQ0eUsA.png
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.”"
date: June 12, 2024
authors: Sylvain Corlay, Anne Fouilloux, Monika Weissschnur

- url: https://medium.com/@SylvainCorlay/commit-cdf57415b94b
title: "Commit!"
image: https://miro.medium.com/v2/0*3gKzwBOWprSRs35k
Expand Down
Loading

0 comments on commit 719faa6

Please sign in to comment.