Merge pull request #755 from datopian/fix/site-build

Site build and deployment
This commit is contained in:
Anuar Ustayev (aka Anu) 2023-04-12 19:02:42 +06:00 committed by GitHub
commit 8465947902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14893 additions and 6674 deletions

1
.nxignore Normal file
View File

@ -0,0 +1 @@
site

14882
site/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,9 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
"build": "npm run mddb && next build",
"start": "next start",
"mddb": "mddb content"
},
"dependencies": {
"@flowershow/core": "^0.4.9",
@ -31,7 +32,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-next-github-btn": "^1.2.1",
"react-vega": "^7.4.4",
"react-vega": "^7.6.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-katex": "^6.0.2",
"rehype-prism-plus": "^1.5.1",

View File

@ -62,7 +62,10 @@ export const getStaticProps = async ({ params }) => {
export async function getStaticPaths() {
const mddb = await clientPromise;
const allDocuments = await mddb.getFiles({ extensions: ["md", "mdx"] });
let allDocuments = await mddb.getFiles({ extensions: ["md", "mdx"] });
// Avoid duplicate path
allDocuments = allDocuments.filter(doc => !doc.url_path.startsWith('data-literate/'));
const paths = allDocuments.map((page) => {
const parts = page.url_path.split("/");

View File

@ -11,7 +11,8 @@ module.exports = {
"./components/**/*.js",
"./components/**/*.ts",
"./components/**/*.jsx",
"./components/**/*.tsx"
"./components/**/*.tsx",
"./lib/markdown.mjs"
],
darkMode: false, // or 'media' or 'class'
theme: {

File diff suppressed because it is too large Load Diff