Skip to content

Commit

Permalink
Merge pull request #34 from olliethedev/feat/blog-plugin
Browse files Browse the repository at this point in the history
Feat/blog plugin
  • Loading branch information
olliethedev authored Nov 6, 2023
2 parents 8c4e1a2 + 8c58a7c commit b1e55b3
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 15 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.3",
"version": "1.3.4",
"private": true,
"workspaces": [
"./packages/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-graphql-amplifiers-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amplifiers/amplify-graphql-amplifiers-core",
"version": "1.3.3",
"version": "1.3.4",
"description": "Amplify GraphQL @createModel transformer. This directive is intended to be used for creating a new model once a Cognito Event is fired.",
"keywords": [
"aws",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amplifiers/amplify-graphql-create-model-transformer",
"version": "1.3.3",
"version": "1.3.4",
"description": "Amplify GraphQL @createModel transformer. This directive is intended to be used for creating a new model once a Cognito Event is fired.",
"keywords": [
"aws",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amplifiers/amplify-graphql-process-image-transformer",
"version": "1.3.3",
"version": "1.3.4",
"description": "This directive allows you to process images.",
"keywords": [
"aws",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amplifiers/amplify-graphql-send-email-transformer",
"version": "1.3.3",
"version": "1.3.4",
"description": "Amplify GraphQL @sendEmail transformer.",
"keywords": [
"aws",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-util-blog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ npm install -g @amplifiers/amplify-util-blog
```
The plugin uses typesense transformer for search, and ui supports markdown for blog content and rest of the components are amplify-ui, so we will also need to install the following:
```bash
npm install -s amplify-graphql-typesense-transformer @aws-amplify/ui-react @aws-amplify/ui-react-storage aws-amplify react-markdown remark-gfm react-syntax-highlighter @uiw/[email protected]
npm install -s amplify-graphql-typesense-transformer @aws-amplify/ui-react @aws-amplify/ui-react-storage aws-amplify react-markdown remark-gfm remark-footnotes react-syntax-highlighter @uiw/[email protected]
```
```bash
npm install --save-dev @types/react-syntax-highlighter
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-util-blog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amplifiers/amplify-util-blog",
"version": "1.3.3",
"version": "1.3.4",
"description": "Amplify Util Blog is a utility plugin for the Amplify CLI that helps you add blog functionality to your Amplify project.",
"keywords": [
"aws",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { FC, memo } from 'react'
import ReactMarkdown, { Options, Components } from "react-markdown";
import remarkGfm from "remark-gfm";
import remarkFootnotes from "remark-footnotes";

import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { vs } from "react-syntax-highlighter/dist/cjs/styles/prism";
Expand Down Expand Up @@ -33,7 +34,10 @@ const components: Components = {
const MemoizedReactMarkdown: FC<Options> = memo(
(props) => (
<div style={{ width: "100%" }}>
<ReactMarkdown {...props} components={components} />
<ReactMarkdown
{...props}
components={components}
remarkPlugins={[remarkFootnotes as any]} />
</div>
),
(prevProps, nextProps) =>
Expand Down

0 comments on commit b1e55b3

Please sign in to comment.