[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

@@ -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):