[site][s]: @flowershow/core -> @portaljs/core

This commit is contained in:
olayway 2023-06-12 17:05:40 +02:00
parent 6649f78459
commit 4bfcd4373b
12 changed files with 308 additions and 762 deletions

View File

@ -1,4 +1,4 @@
import { defaultConfig } from "@flowershow/core";
import { defaultConfig } from "@portaljs/core";
import userConfig from "../content/config";
export const siteConfig: any = {

View File

@ -2,10 +2,10 @@
## Setup
The following example uses components imported from the [`@flowershow/core` package](https://github.com/datopian/flowershow). If you want to follow along install it too:
The following example uses components imported from the [`@portaljs/core` package](https://www.npmjs.com/package/@portaljs/core). If you want to follow along install it too:
```sh
npm i @flowershow/core
npm i @portaljs/core
```
## Create home page for your blogs
@ -13,7 +13,7 @@ npm i @flowershow/core
Add the following code to the Next.js page that is going to be your blog home page, e.g. to `/pages/blog/index.tsx`:
```tsx
import { BlogsList, SimpleLayout } from "@flowershow/core";
import { BlogsList, SimpleLayout } from "@portaljs/core";
// pass a list of blogs, home page title and home page description, e.g. from `getStaticProps`
export default function BlogIndex({ blogs, title, description }) {
@ -47,7 +47,7 @@ interface Blog {
Add the following code to your blog pages, e.g. to `/pages/blog/[...slug].tsx`:
```tsx
import { BlogLayout } from "@flowershow/core";
import { BlogLayout } from "@portaljs/core";
export default BlogPost({ content, title, date, authors }) {
return (

View File

@ -75,10 +75,10 @@ NEXT_PUBLIC_DISQUS_SHORTNAME=
## Add comments to your page layout
You can use `@flowershow/core` to import the comments section component. Install it with:
You can use `@portaljs/core` to import the comments section component. Install it with:
```sh
npm i @flowershow/core
npm i @portaljs/core
```
Then, add the following to your custom layout (or directly to your pages):

View File

@ -1,7 +1,7 @@
import {
SimpleLayout,
UnstyledLayout,
} from "@flowershow/core";
} from "@portaljs/core";
import { BlogLayout } from "./blog";
import DefaultLayout from "./default";
import { DocsLayout } from "./docs";

1030
site/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,6 @@
"mddb": "mddb content"
},
"dependencies": {
"@flowershow/core": "^0.4.11",
"@flowershow/markdowndb": "^0.1.1",
"@flowershow/remark-callouts": "^1.0.0",
"@flowershow/remark-embed": "^1.0.0",
@ -18,6 +17,7 @@
"@headlessui/react": "^1.3.0",
"@heroicons/react": "^1.0.3",
"@mdx-js/loader": "^2.3.0",
"@portaljs/core": "^1.0.3",
"axios": "^1.3.6",
"clsx": "^1.2.1",
"gray-matter": "^4.0.3",
@ -45,17 +45,17 @@
"remark-slug": "^6.1.0",
"remark-smartypants": "^2.0.0",
"remark-toc": "^7.2.0",
"strip-markdown": "^5.0.0",
"vega": "^5.20.2",
"vega-lite": "^5.1.0",
"strip-markdown": "^5.0.0"
"vega-lite": "^5.1.0"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.22",
"prettier": "^2.8.7",
"remark": "^14.0.2",
"tailwindcss": "^3.3.1",
"typescript": "^5.0.4",
"remark": "^14.0.2"
"typescript": "^5.0.4"
}
}

View File

@ -7,7 +7,7 @@ import clientPromise from '@/lib/mddb';
import Layout from 'components/Layout';
import { useEffect, useState } from 'react';
import { useRouter } from 'next/router.js';
import { NavGroup, NavItem, collectHeadings } from '@flowershow/core';
import { NavGroup, NavItem, collectHeadings } from '@portaljs/core';
import { GetStaticProps, GetStaticPropsResult } from 'next';
import { CustomAppProps } from './_app.jsx';
import computeFields from '@/lib/computeFields';

View File

@ -5,7 +5,7 @@ import Script from "next/script";
import { DefaultSeo } from "next-seo";
import { NavGroup, NavItem, pageview, ThemeProvider } from "@flowershow/core";
import { NavGroup, NavItem, pageview, ThemeProvider } from "@portaljs/core";
import { siteConfig } from "../config/siteConfig";
import { useEffect } from "react";
import { useRouter } from "next/dist/client/router";

View File

@ -1,7 +1,7 @@
import Layout from '@/components/Layout';
import computeFields from '@/lib/computeFields';
import clientPromise from '@/lib/mddb';
import { BlogsList, SimpleLayout } from '@flowershow/core';
import { BlogsList, SimpleLayout } from '@portaljs/core';
import * as fs from 'fs';
export default function Blog({ blogs }) {

View File

@ -6,7 +6,7 @@ import Showcases from '@/components/Showcases';
import Layout from '../components/Layout';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { collectHeadings } from '@flowershow/core';
import { collectHeadings } from '@portaljs/core';
export default function Home({ sidebarTree }) {
const router = useRouter();

View File

@ -13,8 +13,8 @@ module.exports = {
"./components/**/*.jsx",
"./components/**/*.tsx",
"./lib/markdown.mjs",
"./node_modules/@flowershow/core/dist/*.js",
"./node_modules/@flowershow/core/*.js",
"./node_modules/@portaljs/core/dist/*.js",
"./node_modules/@portaljs/core/*.js",
],
darkMode: "class", // or 'media' or 'class'
theme: {

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@flowershow/core": ["node_modules/@flowershow/core/dist/src"],
"@portaljs/core": ["node_modules/@portaljs/core/dist/src"],
"@flowershow/remark-callouts": [
"node_modules/@flowershow/remark-callouts/dist/src"
],