Compare commits

..

21 Commits

Author SHA1 Message Date
github-actions[bot]
6649f78459 Version Packages (#949)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-13 12:14:38 +02:00
olayway
6f0da8c3a3 [packages][s]: fix public api of remark-* and core packages 2023-06-13 12:11:33 +02:00
olayway
5b1238cc27 [.gitignore][xs]: ignore .tgz files 2023-06-13 12:11:33 +02:00
João Demenech
17803f1f5d [site,blog,#944][m]: add Ola's author info, fix typo in blogs list 2023-06-12 15:17:18 -03:00
João Demenech
81f50bb9a2 Merge pull request #945 from datopian/openspending/frankfort-education
OpenSpending: Frankfurt Education story
2023-06-12 14:38:22 -03:00
João Demenech
f1aee6a93e [openspending,stories][xs]: update file references to point to storage and add authors 2023-06-12 14:34:40 -03:00
João Demenech
053005d784 [openspending,stories][xs]: update file references to point to storage and update story slug 2023-06-12 14:32:05 -03:00
github-actions[bot]
2f5dd4d0f7 Version Packages (#946)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-12 18:46:54 +02:00
olayway
fb7ce8723a [.changeset][xs]: adjst changeset message 2023-06-12 18:42:55 +02:00
olayway
7636c3d26c [package-lock][xs]: sync lock file 2023-06-12 18:35:15 +02:00
olayway
6bf6c8faf4 [core][s]: bump mdx-mermaid and mv to peers 2023-06-12 18:31:35 +02:00
Michael Polidori
095eba606e Update story 2023-06-12 11:58:26 -04:00
Michael Polidori
1097b5077d Add Frankfurt Education story 2023-06-12 11:53:55 -04:00
olayway
aa365cbb0d [blog/markdowndb-basics][xs]: rplc @flowershow/markdowndb with mddb 2023-06-12 16:42:44 +02:00
olayway
038427874a [howto/markdown][xs]: rplc @flowershow/markdowndb with mddb 2023-06-12 16:41:13 +02:00
João Demenech
bdfdb2e6a5 [openspending,drd][xs]: fix FlatUiTable error on first data-driven story 2023-06-09 19:27:45 -03:00
João Demenech
95b3fc03d3 [openspending,drd][xs]: remove sample data-driven story 2023-06-09 18:39:06 -03:00
github-actions[bot]
6aeadd71de Version Packages (#942)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-09 00:16:30 +02:00
olayway
affca05058 [remark-callouts/package.json][xs]: fix export path 2023-06-09 00:12:03 +02:00
github-actions[bot]
f54d238795 Version Packages (#941)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-08 23:57:47 +02:00
olayway
e82e2ae021 [packages][xs]: replace prepublish with prepare 2023-06-08 23:53:42 +02:00
22 changed files with 751 additions and 224 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@
dist
tmp
/out-tsc
**/*.tgz
# dependencies
node_modules

View File

@@ -1,37 +0,0 @@
---
title: Sample Data Story
date: 06/06/2023
---
The below chart clearly shows the steep upward trend of oil prices these are largely due to social-political factors and civil unrest:
<LineChart
data="https://raw.githubusercontent.com/datasets/oil-prices/main/data/wti-year.csv"
title="Oil Price x Year"
xAxis="Date"
yAxis="Price"
/>
But to really understand the different global factors that influence the price of a commodity like oil the long term trends as shown above is not adequate.
When considering the yearly fluctuations it is often beneficial to filter certain time periods.
One can use the below preview to filter year periods. Alternatively, if you want to consider the points in time when the price of oil was the highest the price range can also be filtered.
<FlatUiTable url="https://raw.githubusercontent.com/datasets/oil-prices/main/data/wti-year.csv" />
Careful data analysis has identified instability albeit economic or political to be the major driver of oil price flatuations
```mermaid
graph LR;
A[Socio-Political Instability]-->B[War & Civil Unrest];
A-->C[Economic Factors];
B-->D[Price Increase];
C-->D;
```
___
**To find the raw data used in this article visit https://github.com/datasets/oil-prices/**

View File

@@ -0,0 +1,192 @@
---
title: Frankfurt is Investing in Education, and Your City Should Too
date: 06/12/2023
authors: ['Michael Polidori']
---
_Note: The currency in this post has been converted to USD using an average exchange rate of 1 EUR = 1.20 USD._
Between 2008 and 2016, the population of Frankfurt, Germany grew from approximately 670k to 740k[^1], while
its spending on education climbed from \$465 million to a staggering \$814 million, a 75% increase. That's a
significant surge, bumping education to around 20% of the total budget, only second to social issues.
The stacked bar chart below (using the [City of Frankfurt Expenditure dataset](https://www.openspending.org/@os-data/city-of-frankfurt-expenditure))
helps to bring this data to life. It maps out the city's annual spending across various areas. As you can see,
the education slice has grown noticeably over the years, indicating Frankfurt's intention to prioritize this space.
The city's commitment to education is abundantly clear.
<VegaLite
spec={{
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
data: {
url: 'https://storage.openspending.org/city-of-frankfurt-expenditure/frankfurt-sums.csv',
},
transform: [
{
calculate: "format(datum.amount / 1e6 * 1.20, '$,.1f') + 'M'",
as: 'formattedAmountMillion',
},
{ calculate: 'datum.amount / 1e9 * 1.20', as: 'amountBillion' },
],
mark: 'bar',
width: 350,
height: 400,
encoding: {
x: {
field: 'date',
type: 'ordinal',
title: 'Year',
},
y: {
field: 'amount',
type: 'quantitative',
title: 'Spending (USD in billions)',
axis: {
format: '~s',
labelExpr: "format(datum.value / 1e9 * 1.20, '$,.0f') + 'B'",
},
},
color: {
field: 'label',
type: 'nominal',
title: 'Area',
scale: {
domain: [
'Building supervision and monument protection',
'Business development agency',
'Central finance economy',
'Central services',
'Culture, leisure and sport',
'Education',
'Elections and superordinate matters',
'Environment',
'Finance',
'Fire protection and emergency services',
'Geoinformation and property regulations',
'Head of the city administration',
'Health',
'Local transport and public transport',
'Order and security',
'Personnel and organization',
'Property and building management',
'Reside',
'Revision and law',
'Social issue',
'Town planning',
],
range: [
'#EF5350',
'#F06292',
'#BA68C8',
'#9575CD',
'#7986CB',
'#64B5F6',
'#4FC3F7',
'#4DD0E1',
'#4DB6AC',
'#81C784',
'#AED581',
'#DCE775',
'#FFF176',
'#FFD54F',
'#FFB74D',
'#FF8A65',
'#A1887F',
'#90A4AE',
'#78909C',
'#546E7A',
'#455A64',
],
},
},
tooltip: [
{ field: 'label', type: 'nominal', title: 'Area' },
{
field: 'formattedAmountMillion',
type: 'ordinal',
title: 'Spending (USD in millions)',
},
{ field: 'date', type: 'ordinal', title: 'Year' },
],
},
}}
/>
Now, let's look at a line chart that traces only the trajectory of education spending through these eight
years (using the same dataset). It's not just a line; it's a testament to Frankfurt's growing conviction that investing in education is
the key to a prosperous future.
<VegaLite
spec={{
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
description: 'Frankfurt Education Spending.',
data: {
url: 'https://storage.openspending.org/city-of-frankfurt-expenditure/frankfurt-sums.csv',
},
transform: [
{ filter: "datum.label==='Education'" },
{
calculate: "format(datum.amount / 1e6 * 1.20, '$,.1f') + 'M'",
as: 'formattedAmountMillion',
},
],
mark: {
type: 'area',
line: true,
point: true,
},
width: 400,
height: 400,
encoding: {
x: {
field: 'date',
type: 'ordinal',
title: 'Year',
},
y: {
field: 'amount',
type: 'quantitative',
title: 'Spending (USD in millions)',
axis: {
format: '~s',
labelExpr: "format(datum.value / 1e6 * 1.20, '$,.0f') + 'M'",
},
},
color: {
title: '',
field: 'label',
scale: {
domain: ["Education"],
range: ['#64b5f6']
},
},
tooltip: [
{ field: 'label', type: 'nominal', title: 'Area' },
{
field: 'formattedAmountMillion',
type: 'ordinal',
title: 'Spending (USD in millions)',
},
{ field: 'date', type: 'ordinal', title: 'Year' },
],
},
}}
/>
Despite Frankfurt's population experiencing an increase of less than 100k during this period, the significant
investment in education tells a different story. It sends a clear message: education isn't merely a line item
in their budget—it's their future.
During this period, it's likely that schools underwent major overhauls, more teachers got hired, new educational
programs launched, etc., to give every child in Frankfurt a chance to have an impactful and quality education.
The beauty of good data is that it's not just numbers—it's narratives. And the narrative here is that Frankfurt
is leveraging the power of long-term investment in education for a better, brighter future. This investment in
education is not just about the dollars and cents. It's about recognizing the value of quality education to drive
social and economic progress.
Frankfurt is a city that's recognized the power of education, and it's using that power to redefine its future.
One can only hope that more cities follow suit.
[^1]: https://worldpopulationreview.com/world-cities/frankfurt-population

View File

@@ -29,35 +29,7 @@ Quick observations:
So let's convert all currencies to ~EUR but only include 'eu_cofinancing_amount' values as we will use it for comparison:
<FlatUiTable rawCsv="beneficiary_country_code,eu_cofinancing_amount
AT,0.0
BE,858388537.42
BG,0.0
CY,0.0
CZ,115591108113
DE,912803359.21
DK,492017672
EE,5419641772.0
EL,0.0
ES,0.0
FI,2858282488.0
FR,15027864492.94
HR,0.0
HU,0.0
IE,0.0
IT,34860253672.98
LT,6750675528.74
LU,30852529.89
LV,0.0
MT,0.0
NL,0.0
PL,67537688711
PT,23800568868.02
RO,19970864938.12
SE,0.0
SI,4576151396.24
SK,12295960193.92
UK,12829255012.10" />
<FlatUiTable url="https://storage.openspending.org/eu-esif-funds-beneficiaries-2007-2020--country-code-confinancing-amount.csv" />
With this data table we can easily see top countries by funding. Note that you can use the table component above to sort values by values in 'eu_cofinancing_amount' column which helps you to quickly see top countries. Let's build a quick visualization to make it even more obvious:

449
package-lock.json generated
View File

@@ -14697,7 +14697,7 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true,
"devOptional": true,
"funding": [
{
"type": "github",
@@ -14791,7 +14791,7 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"dev": true,
"devOptional": true,
"dependencies": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
@@ -15108,7 +15108,7 @@
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"devOptional": true,
"funding": [
{
"type": "github",
@@ -15132,7 +15132,7 @@
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
"dev": true,
"devOptional": true,
"engines": {
"node": "*"
}
@@ -16204,6 +16204,62 @@
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"devOptional": true
},
"node_modules/cross-fetch": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
"optional": true,
"peer": true,
"dependencies": {
"node-fetch": "2.6.7"
}
},
"node_modules/cross-fetch/node_modules/node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"optional": true,
"peer": true,
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/cross-fetch/node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"optional": true,
"peer": true
},
"node_modules/cross-fetch/node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"optional": true,
"peer": true
},
"node_modules/cross-fetch/node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"optional": true,
"peer": true,
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -17595,6 +17651,13 @@
"node": ">=0.8.0"
}
},
"node_modules/devtools-protocol": {
"version": "0.0.1045489",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz",
"integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==",
"optional": true,
"peer": true
},
"node_modules/didyoumean": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
@@ -17919,7 +17982,7 @@
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"devOptional": true,
"dependencies": {
"once": "^1.4.0"
}
@@ -19499,7 +19562,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
"integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
"dev": true,
"devOptional": true,
"dependencies": {
"debug": "^4.1.1",
"get-stream": "^5.1.0",
@@ -19606,7 +19669,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
"integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
"dev": true,
"devOptional": true,
"dependencies": {
"pend": "~1.2.0"
}
@@ -20011,7 +20074,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"dev": true
"devOptional": true
},
"node_modules/fs-extra": {
"version": "11.1.1",
@@ -20232,7 +20295,7 @@
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
"integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
"dev": true,
"devOptional": true,
"dependencies": {
"pump": "^3.0.0"
},
@@ -20638,11 +20701,29 @@
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
"dev": true
},
"node_modules/hast-util-from-html": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-1.0.2.tgz",
"integrity": "sha512-LhrTA2gfCbLOGJq2u/asp4kwuG0y6NhWTXiPKP+n0qNukKy7hc10whqqCFfyvIA1Q5U5d0sp9HhNim9gglEH4A==",
"optional": true,
"peer": true,
"dependencies": {
"@types/hast": "^2.0.0",
"hast-util-from-parse5": "^7.0.0",
"parse5": "^7.0.0",
"vfile": "^5.0.0",
"vfile-message": "^3.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-from-parse5": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz",
"integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==",
"dev": true,
"devOptional": true,
"dependencies": {
"@types/hast": "^2.0.0",
"@types/unist": "^2.0.0",
@@ -20661,7 +20742,7 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz",
"integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==",
"dev": true,
"devOptional": true,
"dependencies": {
"@types/hast": "^2.0.0"
},
@@ -20784,7 +20865,7 @@
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz",
"integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==",
"dev": true,
"devOptional": true,
"dependencies": {
"@types/hast": "^2.0.0",
"comma-separated-tokens": "^2.0.0",
@@ -21106,7 +21187,7 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true,
"devOptional": true,
"funding": [
{
"type": "github",
@@ -28570,13 +28651,24 @@
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="
},
"node_modules/mdx-mermaid": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/mdx-mermaid/-/mdx-mermaid-1.3.2.tgz",
"integrity": "sha512-8kw0tg3isKKBFzFwoe2DhIaEgKYtVeJXQtxZCCrdTPO0CTpXHnTHT0atDqsp7YkXi5iUCp/zAZPZu1cmr68T3w==",
"version": "2.0.0-rc7",
"resolved": "https://registry.npmjs.org/mdx-mermaid/-/mdx-mermaid-2.0.0-rc7.tgz",
"integrity": "sha512-AMy3138EsvcGwE4cGqUVytj4mLpJ3TJ2nek82+67Qi4GSOXoelAqmQudHSk26IsP091c3qX4d/4wi9CqLwFl9Q==",
"peer": true,
"optionalDependencies": {
"estree-util-to-js": "^1.1.0",
"estree-util-visit": "^1.2.0",
"hast-util-from-html": "^1.0.1",
"hast-util-to-estree": "^2.1.0",
"mdast-util-from-markdown": "^1.2.0",
"mdast-util-mdx": "^2.0.0",
"micromark-extension-mdxjs": "^1.0.0",
"puppeteer": "^18.0.0"
},
"peerDependencies": {
"mermaid": ">=8.11.0",
"react": "^16.8.4 || ^17.0.0 || ^18.0.0",
"unist-util-visit": "^2.0.0"
"unist-util-visit": "^4.1.0"
}
},
"node_modules/media-typer": {
@@ -29620,7 +29712,7 @@
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
"dev": true
"devOptional": true
},
"node_modules/mlly": {
"version": "1.3.0",
@@ -31131,7 +31223,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
"dev": true
"devOptional": true
},
"node_modules/performance-now": {
"version": "2.1.0",
@@ -31991,7 +32083,7 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true,
"devOptional": true,
"engines": {
"node": ">=0.4.0"
}
@@ -32077,7 +32169,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"devOptional": true,
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@@ -32113,6 +32205,24 @@
"node": ">=6"
}
},
"node_modules/puppeteer": {
"version": "18.2.1",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-18.2.1.tgz",
"integrity": "sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==",
"deprecated": "< 19.4.0 is no longer supported",
"hasInstallScript": true,
"optional": true,
"peer": true,
"dependencies": {
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"puppeteer-core": "18.2.1"
},
"engines": {
"node": ">=14.1.0"
}
},
"node_modules/puppeteer-core": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-2.1.1.tgz",
@@ -32219,6 +32329,57 @@
"async-limiter": "~1.0.0"
}
},
"node_modules/puppeteer/node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"optional": true,
"peer": true
},
"node_modules/puppeteer/node_modules/puppeteer-core": {
"version": "18.2.1",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz",
"integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==",
"optional": true,
"peer": true,
"dependencies": {
"cross-fetch": "3.1.5",
"debug": "4.3.4",
"devtools-protocol": "0.0.1045489",
"extract-zip": "2.0.1",
"https-proxy-agent": "5.0.1",
"proxy-from-env": "1.1.0",
"rimraf": "3.0.2",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"ws": "8.9.0"
},
"engines": {
"node": ">=14.1.0"
}
},
"node_modules/puppeteer/node_modules/ws": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
"integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
"optional": true,
"peer": true,
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
},
"node_modules/pure-rand": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.1.tgz",
@@ -32798,7 +32959,7 @@
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true,
"devOptional": true,
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@@ -33768,7 +33929,7 @@
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true,
"devOptional": true,
"funding": [
{
"type": "github",
@@ -34645,7 +34806,7 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dev": true,
"devOptional": true,
"dependencies": {
"safe-buffer": "~5.2.0"
}
@@ -35259,7 +35420,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
"dev": true,
"devOptional": true,
"dependencies": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
@@ -35271,13 +35432,13 @@
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
"dev": true
"devOptional": true
},
"node_modules/tar-stream": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"dev": true,
"devOptional": true,
"dependencies": {
"bl": "^4.0.3",
"end-of-stream": "^1.4.1",
@@ -35585,7 +35746,7 @@
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
"dev": true
"devOptional": true
},
"node_modules/through2": {
"version": "2.0.5",
@@ -36656,6 +36817,17 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/unbzip2-stream": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
"integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
"optional": true,
"peer": true,
"dependencies": {
"buffer": "^5.2.1",
"through": "^2.3.8"
}
},
"node_modules/unfetch": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
@@ -37727,7 +37899,7 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz",
"integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==",
"dev": true,
"devOptional": true,
"dependencies": {
"@types/unist": "^2.0.0",
"vfile": "^5.0.0"
@@ -38106,7 +38278,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz",
"integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==",
"dev": true,
"devOptional": true,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
@@ -38641,7 +38813,7 @@
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
"dev": true,
"devOptional": true,
"dependencies": {
"buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0"
@@ -38725,7 +38897,7 @@
},
"packages/ckan": {
"name": "@portaljs/ckan",
"version": "0.0.2",
"version": "0.0.3",
"dependencies": {
"formik": "^2.2.9",
"swr": "^2.1.5",
@@ -39082,7 +39254,7 @@
},
"packages/components": {
"name": "@portaljs/components",
"version": "0.1.9",
"version": "0.1.11",
"dependencies": {
"@githubocto/flat-ui": "^0.14.1",
"@heroicons/react": "^2.0.17",
@@ -39455,7 +39627,7 @@
},
"packages/core": {
"name": "@portaljs/core",
"version": "1.0.0",
"version": "1.0.3",
"license": "MIT",
"dependencies": {
"@docsearch/react": "^3.3.3",
@@ -39468,11 +39640,11 @@
"disqus-react": "^1.1.5",
"framer-motion": "^10.0.1",
"kbar": "0.1.0-beta.40",
"mdx-mermaid": "^1.3.2",
"mermaid": "^10.2.2",
"prop-types": "^15.8.1"
},
"peerDependencies": {
"mdx-mermaid": "2.0.0-rc7",
"next": "^13.2.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
@@ -39481,7 +39653,7 @@
},
"packages/remark-callouts": {
"name": "@portaljs/remark-callouts",
"version": "1.0.0",
"version": "1.0.4",
"license": "MIT",
"dependencies": {
"mdast-util-from-markdown": "^1.2.0",
@@ -39491,7 +39663,7 @@
},
"packages/remark-embed": {
"name": "@portaljs/remark-embed",
"version": "1.0.0",
"version": "1.0.3",
"license": "MIT",
"dependencies": {
"unist-util-visit": "^4.1.1"
@@ -39499,7 +39671,7 @@
},
"packages/remark-wiki-link": {
"name": "@portaljs/remark-wiki-link",
"version": "1.0.0",
"version": "1.0.3",
"license": "MIT",
"dependencies": {
"mdast-util-to-markdown": "^1.5.0",
@@ -46514,7 +46686,6 @@
"disqus-react": "^1.1.5",
"framer-motion": "^10.0.1",
"kbar": "0.1.0-beta.40",
"mdx-mermaid": "^1.3.2",
"mermaid": "^10.2.2",
"prop-types": "^15.8.1"
}
@@ -51036,7 +51207,7 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true
"devOptional": true
},
"bcrypt-pbkdf": {
"version": "1.0.2",
@@ -51097,7 +51268,7 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"dev": true,
"devOptional": true,
"requires": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
@@ -51350,7 +51521,7 @@
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"devOptional": true,
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
@@ -51360,7 +51531,7 @@
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
"dev": true
"devOptional": true
},
"buffer-from": {
"version": "1.1.2",
@@ -52159,6 +52330,53 @@
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"devOptional": true
},
"cross-fetch": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
"optional": true,
"peer": true,
"requires": {
"node-fetch": "2.6.7"
},
"dependencies": {
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"optional": true,
"peer": true,
"requires": {
"whatwg-url": "^5.0.0"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"optional": true,
"peer": true
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"optional": true,
"peer": true
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"optional": true,
"peer": true,
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
}
}
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -53199,6 +53417,13 @@
"minimist": "^1.2.6"
}
},
"devtools-protocol": {
"version": "0.0.1045489",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz",
"integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==",
"optional": true,
"peer": true
},
"didyoumean": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
@@ -53458,7 +53683,7 @@
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"devOptional": true,
"requires": {
"once": "^1.4.0"
}
@@ -54683,7 +54908,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
"integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
"dev": true,
"devOptional": true,
"requires": {
"@types/yauzl": "^2.9.1",
"debug": "^4.1.1",
@@ -54776,7 +55001,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
"integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
"dev": true,
"devOptional": true,
"requires": {
"pend": "~1.2.0"
}
@@ -55074,7 +55299,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"dev": true
"devOptional": true
},
"fs-extra": {
"version": "11.1.1",
@@ -55241,7 +55466,7 @@
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
"integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
"dev": true,
"devOptional": true,
"requires": {
"pump": "^3.0.0"
}
@@ -55540,11 +55765,25 @@
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
"dev": true
},
"hast-util-from-html": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-1.0.2.tgz",
"integrity": "sha512-LhrTA2gfCbLOGJq2u/asp4kwuG0y6NhWTXiPKP+n0qNukKy7hc10whqqCFfyvIA1Q5U5d0sp9HhNim9gglEH4A==",
"optional": true,
"peer": true,
"requires": {
"@types/hast": "^2.0.0",
"hast-util-from-parse5": "^7.0.0",
"parse5": "^7.0.0",
"vfile": "^5.0.0",
"vfile-message": "^3.0.0"
}
},
"hast-util-from-parse5": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz",
"integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==",
"dev": true,
"devOptional": true,
"requires": {
"@types/hast": "^2.0.0",
"@types/unist": "^2.0.0",
@@ -55559,7 +55798,7 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz",
"integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==",
"dev": true,
"devOptional": true,
"requires": {
"@types/hast": "^2.0.0"
}
@@ -55662,7 +55901,7 @@
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz",
"integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==",
"dev": true,
"devOptional": true,
"requires": {
"@types/hast": "^2.0.0",
"comma-separated-tokens": "^2.0.0",
@@ -55909,7 +56148,7 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true
"devOptional": true
},
"ignore": {
"version": "5.2.4",
@@ -61610,10 +61849,20 @@
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="
},
"mdx-mermaid": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/mdx-mermaid/-/mdx-mermaid-1.3.2.tgz",
"integrity": "sha512-8kw0tg3isKKBFzFwoe2DhIaEgKYtVeJXQtxZCCrdTPO0CTpXHnTHT0atDqsp7YkXi5iUCp/zAZPZu1cmr68T3w==",
"requires": {}
"version": "2.0.0-rc7",
"resolved": "https://registry.npmjs.org/mdx-mermaid/-/mdx-mermaid-2.0.0-rc7.tgz",
"integrity": "sha512-AMy3138EsvcGwE4cGqUVytj4mLpJ3TJ2nek82+67Qi4GSOXoelAqmQudHSk26IsP091c3qX4d/4wi9CqLwFl9Q==",
"peer": true,
"requires": {
"estree-util-to-js": "^1.1.0",
"estree-util-visit": "^1.2.0",
"hast-util-from-html": "^1.0.1",
"hast-util-to-estree": "^2.1.0",
"mdast-util-from-markdown": "^1.2.0",
"mdast-util-mdx": "^2.0.0",
"micromark-extension-mdxjs": "^1.0.0",
"puppeteer": "^18.0.0"
}
},
"media-typer": {
"version": "0.3.0",
@@ -62306,7 +62555,7 @@
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
"dev": true
"devOptional": true
},
"mlly": {
"version": "1.3.0",
@@ -63416,7 +63665,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
"dev": true
"devOptional": true
},
"performance-now": {
"version": "2.1.0",
@@ -63965,7 +64214,7 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true
"devOptional": true
},
"promise.series": {
"version": "0.2.0",
@@ -64037,7 +64286,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"devOptional": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@@ -64072,6 +64321,55 @@
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
"devOptional": true
},
"puppeteer": {
"version": "18.2.1",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-18.2.1.tgz",
"integrity": "sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==",
"optional": true,
"peer": true,
"requires": {
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"puppeteer-core": "18.2.1"
},
"dependencies": {
"proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"optional": true,
"peer": true
},
"puppeteer-core": {
"version": "18.2.1",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz",
"integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==",
"optional": true,
"peer": true,
"requires": {
"cross-fetch": "3.1.5",
"debug": "4.3.4",
"devtools-protocol": "0.0.1045489",
"extract-zip": "2.0.1",
"https-proxy-agent": "5.0.1",
"proxy-from-env": "1.1.0",
"rimraf": "3.0.2",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"ws": "8.9.0"
}
},
"ws": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
"integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
"optional": true,
"peer": true,
"requires": {}
}
}
},
"puppeteer-core": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-2.1.1.tgz",
@@ -64564,7 +64862,7 @@
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true,
"devOptional": true,
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@@ -65314,7 +65612,7 @@
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true
"devOptional": true
},
"safe-identifier": {
"version": "0.4.2",
@@ -66034,7 +66332,7 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dev": true,
"devOptional": true,
"requires": {
"safe-buffer": "~5.2.0"
}
@@ -66492,7 +66790,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
"dev": true,
"devOptional": true,
"requires": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
@@ -66504,7 +66802,7 @@
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
"dev": true
"devOptional": true
}
}
},
@@ -66512,7 +66810,7 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"dev": true,
"devOptional": true,
"requires": {
"bl": "^4.0.3",
"end-of-stream": "^1.4.1",
@@ -66731,7 +67029,7 @@
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
"dev": true
"devOptional": true
},
"through2": {
"version": "2.0.5",
@@ -67518,6 +67816,17 @@
"which-boxed-primitive": "^1.0.2"
}
},
"unbzip2-stream": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
"integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
"optional": true,
"peer": true,
"requires": {
"buffer": "^5.2.1",
"through": "^2.3.8"
}
},
"unfetch": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
@@ -68392,7 +68701,7 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz",
"integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==",
"dev": true,
"devOptional": true,
"requires": {
"@types/unist": "^2.0.0",
"vfile": "^5.0.0"
@@ -68632,7 +68941,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz",
"integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==",
"dev": true
"devOptional": true
},
"web-worker": {
"version": "1.2.0",
@@ -69029,7 +69338,7 @@
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
"dev": true,
"devOptional": true,
"requires": {
"buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0"

View File

@@ -0,0 +1,7 @@
# @portaljs/ckan
## 0.0.3
### Patch Changes
- [`e82e2ae`](https://github.com/datopian/portaljs/commit/e82e2ae0211ea3e4701703d353b44cf1001434ef) Thanks [@olayway](https://github.com/olayway)! - Fix: replace deprecated `prepublish` script with `prepare`

View File

@@ -1,6 +1,6 @@
{
"name": "@portaljs/ckan",
"version": "0.0.2",
"version": "0.0.3",
"type": "module",
"description": "https://portaljs.org",
"keywords": [
@@ -14,7 +14,7 @@
"build": "tsc && vite build && npm run build-tailwind",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"build-tailwind": "NODE_ENV=production npx tailwindcss -o ./dist/styles.css --minify",
"prepublish": "npm run build"
"prepare": "npm run build"
},
"peerDependencies": {
"react": "^18.2.0",

View File

@@ -1,5 +1,11 @@
# @portaljs/components
## 0.1.11
### Patch Changes
- [`e82e2ae`](https://github.com/datopian/portaljs/commit/e82e2ae0211ea3e4701703d353b44cf1001434ef) Thanks [@olayway](https://github.com/olayway)! - Fix: replace deprecated `prepublish` script with `prepare`
## 0.1.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@portaljs/components",
"version": "0.1.10",
"version": "0.1.11",
"type": "module",
"description": "https://portaljs.org",
"keywords": [
@@ -17,7 +17,7 @@
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"build-tailwind": "NODE_ENV=production npx tailwindcss -o ./dist/styles.css --minify",
"prepublish": "npm run build"
"prepare": "npm run build"
},
"peerDependencies": {
"react": "^18.2.0",

View File

@@ -1,5 +1,23 @@
# @portaljs/core
## 1.0.5
### Patch Changes
- [`6f0da8c3`](https://github.com/datopian/portaljs/commit/6f0da8c3a3cde4dc7512c6529eb662de6f4fe56a) Thanks [@olayway](https://github.com/olayway)! - Fix public API (`exports`, `types`, and `main` fields in `package.json`).
## 1.0.4
### Patch Changes
- [`6bf6c8fa`](https://github.com/datopian/portaljs/commit/6bf6c8faf4eefc2b0a7f309d83ba8aac19141bb7) Thanks [@olayway](https://github.com/olayway)! - Bump mdx-mermaid to v2.0.0-rc7 as a workaround for [mermaid import tag showing at the top of pages as plain text](https://github.com/sjwall/mdx-mermaid/issues/88), and move it to peer-dependencies.
## 1.0.3
### Patch Changes
- [`e82e2ae`](https://github.com/datopian/portaljs/commit/e82e2ae0211ea3e4701703d353b44cf1001434ef) Thanks [@olayway](https://github.com/olayway)! - Fix: replace deprecated `prepublish` script with `prepare`
## 1.0.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@portaljs/core",
"version": "1.0.2",
"version": "1.0.5",
"description": "Core Portal.JS components, configs and utils.",
"repository": {
"type": "git",
@@ -17,13 +17,20 @@
"access": "public"
},
"scripts": {
"prepublish": "nx build core"
"prepare": "nx build core"
},
"files": [
"dist"
],
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js"
}
},
"dependencies": {
"@docsearch/react": "^3.3.3",
"@floating-ui/react-dom": "^1.3.0",
@@ -35,7 +42,6 @@
"disqus-react": "^1.1.5",
"framer-motion": "^10.0.1",
"kbar": "0.1.0-beta.40",
"mdx-mermaid": "^1.3.2",
"mermaid": "^10.2.2",
"prop-types": "^15.8.1"
},
@@ -43,6 +49,7 @@
"next": "^13.2.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"mdx-mermaid": "2.0.0-rc7"
}
}

View File

@@ -1,5 +1,23 @@
# @portaljs/remark-callouts
## 1.0.5
### Patch Changes
- [`6f0da8c3`](https://github.com/datopian/portaljs/commit/6f0da8c3a3cde4dc7512c6529eb662de6f4fe56a) Thanks [@olayway](https://github.com/olayway)! - Fix public API (`exports`, `types`, and `main` fields in `package.json`).
## 1.0.4
### Patch Changes
- [`affca05`](https://github.com/datopian/portaljs/commit/affca0505851a87a4295045b60a78926d34eef78) Thanks [@olayway](https://github.com/olayway)! - Fix: incorrect path to styles.css in package.json exports field.
## 1.0.3
### Patch Changes
- [`e82e2ae`](https://github.com/datopian/portaljs/commit/e82e2ae0211ea3e4701703d353b44cf1001434ef) Thanks [@olayway](https://github.com/olayway)! - Fix: replace deprecated `prepublish` script with `prepare`
## 1.0.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@portaljs/remark-callouts",
"version": "1.0.2",
"version": "1.0.5",
"description": "Remark plugin to add support for blockquote-based admonitions/callouts",
"repository": {
"type": "git",
@@ -25,7 +25,7 @@
"access": "public"
},
"scripts": {
"prepublish": "nx build remark-callouts"
"prepare": "nx build remark-callouts"
},
"files": [
"dist"
@@ -36,12 +36,15 @@
"unist-util-visit": "^4.1.0"
},
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./styles.css": "./styles.css"
"./styles.css": "./dist/styles.css"
}
}

View File

@@ -1,5 +1,17 @@
# @portaljs/remark-embed
## 1.0.4
### Patch Changes
- [`6f0da8c3`](https://github.com/datopian/portaljs/commit/6f0da8c3a3cde4dc7512c6529eb662de6f4fe56a) Thanks [@olayway](https://github.com/olayway)! - Fix public API (`exports`, `types`, and `main` fields in `package.json`).
## 1.0.3
### Patch Changes
- [`e82e2ae`](https://github.com/datopian/portaljs/commit/e82e2ae0211ea3e4701703d353b44cf1001434ef) Thanks [@olayway](https://github.com/olayway)! - Fix: replace deprecated `prepublish` script with `prepare`
## 1.0.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@portaljs/remark-embed",
"version": "1.0.2",
"version": "1.0.4",
"description": "Converts youtube link in mdx to an iframe embed",
"repository": {
"type": "git",
@@ -23,7 +23,7 @@
"access": "public"
},
"scripts": {
"prepublish": "nx build remark-embed"
"prepare": "nx build remark-embed"
},
"files": [
"dist"
@@ -32,9 +32,12 @@
"unist-util-visit": "^4.1.1"
},
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}

View File

@@ -1,5 +1,17 @@
# @portaljs/remark-wiki-link
## 1.0.4
### Patch Changes
- [`6f0da8c3`](https://github.com/datopian/portaljs/commit/6f0da8c3a3cde4dc7512c6529eb662de6f4fe56a) Thanks [@olayway](https://github.com/olayway)! - Fix public API (`exports`, `types`, and `main` fields in `package.json`).
## 1.0.3
### Patch Changes
- [`e82e2ae`](https://github.com/datopian/portaljs/commit/e82e2ae0211ea3e4701703d353b44cf1001434ef) Thanks [@olayway](https://github.com/olayway)! - Fix: replace deprecated `prepublish` script with `prepare`
## 1.0.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@portaljs/remark-wiki-link",
"version": "1.0.2",
"version": "1.0.4",
"description": "Parse and render wiki-style links in markdown especially Obsidian style links.",
"repository": {
"type": "git",
@@ -24,7 +24,7 @@
"access": "public"
},
"scripts": {
"prepublish": "nx build remark-wiki-link"
"prepare": "nx build remark-wiki-link"
},
"files": [
"dist"
@@ -35,9 +35,12 @@
"micromark-util-symbol": "^1.0.1"
},
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}

View File

@@ -3,8 +3,9 @@
"compilerOptions": {
"types": ["node"],
"outDir": "dist",
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"declaration": true
},
"exclude": ["**/*.spec.ts"],
"include": ["**/*.ts", "**/*.js"]
"include": ["src/**/*.ts"]
}

View File

@@ -2,7 +2,8 @@
title: Learn how to use MarkdownDB with our First Tutorial!
description: We've just released our first tutorial that covers the fundamentals of MarkdownDB - our new package for treating markdown files as a database. If you've been curious about how to manage your markdown files more effectively, check it out!
date: 2023-05-26
author: Ola Rubaj
authors: ['Ola Rubaj']
filetype: 'blog'
---
We've just released our first tutorial that covers the fundamentals of [MarkdownDB](https://github.com/datopian/markdowndb) - our new package for treating markdown files as a database. If you've been curious about how to manage your markdown files more effectively, this tutorial is an excellent starting point!
@@ -45,8 +46,8 @@ MarkdownDB is a javascript library for treating markdown files as a database --
Once we have prepared our markdown files, we can store them (or more precisely - their metadata) in a database, so that we can then query it later for specific project files.
```bash
# npx @flowershow/markdowndb <path-to-folder-with-md-files>
npx @flowershow/markdowndb ./projects
# npx mddb <path-to-folder-with-md-files>
npx mddb ./projects
```
The above command will output a `markdown.db` file in the directory where it was executed. So, in our case, the folder structure will look like this:
@@ -108,16 +109,16 @@ cd projects-list
npm init -y
```
Then, let's install the `@flowershow/markdowndb` package:
Then, let's install the `mddb` package:
```bash
npm install @flowershow/markdowndb
npm install mddb
```
Now, let's create a new file `index.js` and add the following code:
```js
import { MarkdownDB } from '@flowershow/markdowndb';
import { MarkdownDB } from 'mddb';
// change this to the path to your markdown.db file
const dbPath = 'markdown.db';
@@ -141,7 +142,7 @@ process.exit(0);
Since we're using ES6 modules, we also need to add `"type": "module"` to our `package.json` file.
Before we run the above script, we need to make sure that the `dbPath` variable is pointing to our `markdown.db` file. If you want to store the database outside of your project folder, you can update the `dbPath` variable to point to the correct location. If you want to have it inside your project folder, you can copy it there, or simply re-run the `npx @flowershow/markdowndb <path-to-markdown-folder>` command from within your project folder.
Before we run the above script, we need to make sure that the `dbPath` variable is pointing to our `markdown.db` file. If you want to store the database outside of your project folder, you can update the `dbPath` variable to point to the correct location. If you want to have it inside your project folder, you can copy it there, or simply re-run the `npx mddb` {'<'}path-to-markdown-folder{'>'}` command from within your project folder.
Now, let's run the script:
@@ -181,7 +182,7 @@ forks: 0
After adding the metadata, we need to re-index our markdown files into the database:
```bash
npx @flowershow/markdowndb ../projects
npx mddb ../projects
```
Now, if we run our script again, we'll see that the `metadata` field in the output contains the metadata we've added to our project files:
@@ -215,7 +216,7 @@ npm install columnify
And then we'll update our `index.js` file:
```js {2,16-38}
import { MarkdownDB } from '@flowershow/markdowndb';
import { MarkdownDB } from 'mddb';
import columnify from 'columnify';
const dbPath = 'markdown.db';

View File

@@ -5,7 +5,7 @@ date: 2023-05-24
filetype: blog
---
The PortalJS CKAN example intends to provide users with an easy way to bootstrap a data catalog and share data stories backed by a CKAN back end.
The PortalJS CKAN example intends to provide users with an easy way to bootstrap a data catalog and share data stories backed by a CKAN back end. The configuration is simple, being a matter of simply setting up an environment variable, which determines from which CKAN instance the data is going to be pulled.
## Demo

View File

@@ -13,7 +13,7 @@ mkdir content
Install [MarkdownDB](https://github.com/datopian/markdowndb) package:
```
npm i @flowershow/markdowndb
npm i mddb
```
And add the following to your `package.json`:
@@ -23,7 +23,7 @@ And add the following to your `package.json`:
"scripts": {
"mddb": "mddb <path-to-your-content-folder>",
"prebuild": "npm run mddb"
},
}
}
```
@@ -33,16 +33,16 @@ Now, once the data is in the database, you can add the following script to your
```ts
// lib/mddb.ts
import { MarkdownDB } from "@flowershow/markdowndb";
import { MarkdownDB } from 'mddb;
// path to the markdown.db file created by the mddb script
const dbPath = "markdown.db";
const dbPath = 'markdown.db';
const client = new MarkdownDB({
client: "sqlite3",
connection: {
filename: dbPath,
},
client: 'sqlite3',
connection: {
filename: dbPath,
},
});
const clientPromise = client.init();
@@ -53,12 +53,12 @@ export default clientPromise;
Now you can import it across your project to query the database, e.g.:
```ts
import clientPromise from "@/lib/mddb";
import clientPromise from '@/lib/mddb';
const mddb = await clientPromise;
const blogs = await mddb.getFiles({
folder: "blog",
extensions: ["md", "mdx"],
folder: 'blog',
extensions: ['md', 'mdx'],
});
```
@@ -70,13 +70,12 @@ Install [next-mdx-remote](https://github.com/hashicorp/next-mdx-remote) package,
npm i next-mdx-remote
```
Create the following basic parser for your markdown files, e.g. in `/lib/markdown.ts`:
Create the following basic parser for your markdown files, e.g. in `/lib/markdown.ts`:
```ts
import matter from "gray-matter";
import remarkGfm from "remark-gfm";
import { serialize } from "next-mdx-remote/serialize";
import matter from 'gray-matter';
import remarkGfm from 'remark-gfm';
import { serialize } from 'next-mdx-remote/serialize';
const parse = async function (source) {
const { content } = matter(source);
@@ -93,17 +92,16 @@ const parse = async function (source) {
// ... your plugins
],
format,
}
},
}
);
return {
mdxSource
mdxSource,
};
};
export default parse;
```
## Import, parse and render your markdown files
@@ -111,59 +109,55 @@ export default parse;
Create a page in the `/pages` folder that will render your markdown content, e.g. `pages/blog/[[...slug]].tsx`:
```tsx
import fs from "fs";
import { MdxRemote } from "next-mdx-remote";
import clientPromise from "@/lib/mddb.mjs";
import parse from "@/lib/markdown";
import fs from 'fs';
import { MdxRemote } from 'next-mdx-remote';
import clientPromise from '@/lib/mddb.mjs';
import parse from '@/lib/markdown';
export default function Page({ source }) {
source = JSON.parse(source);
source = JSON.parse(source);
return (
<>
<MdxRemote source={source} />
</>
);
return (
<>
<MdxRemote source={source} />
</>
);
}
// Import metadata of a file matching the static path and return its parsed source and frontmatter object
export const getStaticProps = async ({ params }) => {
const urlPath = params?.slug ? (params.slug as string[]).join("/") : "/";
const urlPath = params?.slug ? (params.slug as string[]).join('/') : '/';
const mddb = await clientPromise;
const dbFile = await mddb.getFileByUrl(urlPath);
const filePath = dbFile!.file_path;
// const frontMatter = dbFile!.metadata ?? {};
const mddb = await clientPromise;
const dbFile = await mddb.getFileByUrl(urlPath);
const filePath = dbFile!.file_path;
// const frontMatter = dbFile!.metadata ?? {};
const source = fs.readFileSync(filePath, { encoding: "utf-8" });
const { mdxSource } = await parse(source, "mdx", {});
const source = fs.readFileSync(filePath, { encoding: 'utf-8' });
const { mdxSource } = await parse(source, 'mdx', {});
return {
props: {
source: JSON.stringify(mdxSource),
// frontMatter
},
};
return {
props: {
source: JSON.stringify(mdxSource),
// frontMatter
},
};
};
// Import metadata of your markdown files from MarkdownDB and return a list of static paths
export const getStaticPaths = async () => {
const mddb = await clientPromise;
const allDocuments = await mddb.getFiles({ extensions: ["md", "mdx"] });
const paths = allDocuments
.map((page) => {
const url = decodeURI(page.url_path);
const parts = url.split("/");
return { params: { slug: parts } };
});
const mddb = await clientPromise;
const allDocuments = await mddb.getFiles({ extensions: ['md', 'mdx'] });
const paths = allDocuments.map((page) => {
const url = decodeURI(page.url_path);
const parts = url.split('/');
return { params: { slug: parts } };
});
return {
paths,
fallback: false,
};
return {
paths,
fallback: false,
};
};
```

View File

@@ -0,0 +1,5 @@
---
id: ola-rubaj
name: Ola Rubaj
avatar: https://avatars.githubusercontent.com/olayway
---