Merge pull request #950 from datopian/site-deps-update

Replace `@flowershow/*` with `@portaljs/*` packages in /site
This commit is contained in:
João Demenech
2023-06-16 09:04:42 -03:00
committed by GitHub
16 changed files with 728 additions and 850 deletions

View File

@@ -142,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 mddb` {'<'}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:

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