[site][s]: @flowershow/core -> @portaljs/core
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { defaultConfig } from "@flowershow/core";
|
import { defaultConfig } from "@portaljs/core";
|
||||||
import userConfig from "../content/config";
|
import userConfig from "../content/config";
|
||||||
|
|
||||||
export const siteConfig: any = {
|
export const siteConfig: any = {
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
## Setup
|
## 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
|
```sh
|
||||||
npm i @flowershow/core
|
npm i @portaljs/core
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create home page for your blogs
|
## 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`:
|
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
|
```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`
|
// pass a list of blogs, home page title and home page description, e.g. from `getStaticProps`
|
||||||
export default function BlogIndex({ blogs, title, description }) {
|
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`:
|
Add the following code to your blog pages, e.g. to `/pages/blog/[...slug].tsx`:
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
import { BlogLayout } from "@flowershow/core";
|
import { BlogLayout } from "@portaljs/core";
|
||||||
|
|
||||||
export default BlogPost({ content, title, date, authors }) {
|
export default BlogPost({ content, title, date, authors }) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -75,10 +75,10 @@ NEXT_PUBLIC_DISQUS_SHORTNAME=
|
|||||||
|
|
||||||
## Add comments to your page layout
|
## 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
|
```sh
|
||||||
npm i @flowershow/core
|
npm i @portaljs/core
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, add the following to your custom layout (or directly to your pages):
|
Then, add the following to your custom layout (or directly to your pages):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
SimpleLayout,
|
SimpleLayout,
|
||||||
UnstyledLayout,
|
UnstyledLayout,
|
||||||
} from "@flowershow/core";
|
} from "@portaljs/core";
|
||||||
import { BlogLayout } from "./blog";
|
import { BlogLayout } from "./blog";
|
||||||
import DefaultLayout from "./default";
|
import DefaultLayout from "./default";
|
||||||
import { DocsLayout } from "./docs";
|
import { DocsLayout } from "./docs";
|
||||||
|
|||||||
1030
site/package-lock.json
generated
1030
site/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,6 @@
|
|||||||
"mddb": "mddb content"
|
"mddb": "mddb content"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@flowershow/core": "^0.4.11",
|
|
||||||
"@flowershow/markdowndb": "^0.1.1",
|
"@flowershow/markdowndb": "^0.1.1",
|
||||||
"@flowershow/remark-callouts": "^1.0.0",
|
"@flowershow/remark-callouts": "^1.0.0",
|
||||||
"@flowershow/remark-embed": "^1.0.0",
|
"@flowershow/remark-embed": "^1.0.0",
|
||||||
@@ -18,6 +17,7 @@
|
|||||||
"@headlessui/react": "^1.3.0",
|
"@headlessui/react": "^1.3.0",
|
||||||
"@heroicons/react": "^1.0.3",
|
"@heroicons/react": "^1.0.3",
|
||||||
"@mdx-js/loader": "^2.3.0",
|
"@mdx-js/loader": "^2.3.0",
|
||||||
|
"@portaljs/core": "^1.0.3",
|
||||||
"axios": "^1.3.6",
|
"axios": "^1.3.6",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
@@ -45,17 +45,17 @@
|
|||||||
"remark-slug": "^6.1.0",
|
"remark-slug": "^6.1.0",
|
||||||
"remark-smartypants": "^2.0.0",
|
"remark-smartypants": "^2.0.0",
|
||||||
"remark-toc": "^7.2.0",
|
"remark-toc": "^7.2.0",
|
||||||
|
"strip-markdown": "^5.0.0",
|
||||||
"vega": "^5.20.2",
|
"vega": "^5.20.2",
|
||||||
"vega-lite": "^5.1.0",
|
"vega-lite": "^5.1.0"
|
||||||
"strip-markdown": "^5.0.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"postcss": "^8.4.22",
|
"postcss": "^8.4.22",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
|
"remark": "^14.0.2",
|
||||||
"tailwindcss": "^3.3.1",
|
"tailwindcss": "^3.3.1",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4"
|
||||||
"remark": "^14.0.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import clientPromise from '@/lib/mddb';
|
|||||||
import Layout from 'components/Layout';
|
import Layout from 'components/Layout';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useRouter } from 'next/router.js';
|
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 { GetStaticProps, GetStaticPropsResult } from 'next';
|
||||||
import { CustomAppProps } from './_app.jsx';
|
import { CustomAppProps } from './_app.jsx';
|
||||||
import computeFields from '@/lib/computeFields';
|
import computeFields from '@/lib/computeFields';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import Script from "next/script";
|
|||||||
|
|
||||||
import { DefaultSeo } from "next-seo";
|
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 { siteConfig } from "../config/siteConfig";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useRouter } from "next/dist/client/router";
|
import { useRouter } from "next/dist/client/router";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Layout from '@/components/Layout';
|
import Layout from '@/components/Layout';
|
||||||
import computeFields from '@/lib/computeFields';
|
import computeFields from '@/lib/computeFields';
|
||||||
import clientPromise from '@/lib/mddb';
|
import clientPromise from '@/lib/mddb';
|
||||||
import { BlogsList, SimpleLayout } from '@flowershow/core';
|
import { BlogsList, SimpleLayout } from '@portaljs/core';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
export default function Blog({ blogs }) {
|
export default function Blog({ blogs }) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Showcases from '@/components/Showcases';
|
|||||||
import Layout from '../components/Layout';
|
import Layout from '../components/Layout';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { collectHeadings } from '@flowershow/core';
|
import { collectHeadings } from '@portaljs/core';
|
||||||
|
|
||||||
export default function Home({ sidebarTree }) {
|
export default function Home({ sidebarTree }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ module.exports = {
|
|||||||
"./components/**/*.jsx",
|
"./components/**/*.jsx",
|
||||||
"./components/**/*.tsx",
|
"./components/**/*.tsx",
|
||||||
"./lib/markdown.mjs",
|
"./lib/markdown.mjs",
|
||||||
"./node_modules/@flowershow/core/dist/*.js",
|
"./node_modules/@portaljs/core/dist/*.js",
|
||||||
"./node_modules/@flowershow/core/*.js",
|
"./node_modules/@portaljs/core/*.js",
|
||||||
],
|
],
|
||||||
darkMode: "class", // or 'media' or 'class'
|
darkMode: "class", // or 'media' or 'class'
|
||||||
theme: {
|
theme: {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@flowershow/core": ["node_modules/@flowershow/core/dist/src"],
|
"@portaljs/core": ["node_modules/@portaljs/core/dist/src"],
|
||||||
"@flowershow/remark-callouts": [
|
"@flowershow/remark-callouts": [
|
||||||
"node_modules/@flowershow/remark-callouts/dist/src"
|
"node_modules/@flowershow/remark-callouts/dist/src"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user