Skip to content

Commit

Permalink
chore: cleanup site
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Oct 6, 2023
1 parent 2fffe69 commit 84adfd1
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 426 deletions.
2 changes: 1 addition & 1 deletion examples/basic/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
assetPrefix: process.env.NODE_ENV === 'production' ? '/examples/basic' : '',
assetPrefix: process.env.NODE_ENV === 'production' ? '/examples/basic' : '/',
};
2 changes: 1 addition & 1 deletion examples/landing/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
assetPrefix: process.env.NODE_ENV === 'production' ? '/examples/landing' : '',
assetPrefix: process.env.NODE_ENV === 'production' ? '/examples/landing' : '/',
};
2 changes: 1 addition & 1 deletion site/docs/api/useEditor.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const { connectors, actions, query, ...collected } = useEditor(collector);
"(sourceNodeId: NodeId, targetNodeId: NodeId, pos: {x: number, y: number}, nodesToDOM?: (node: Node) => HTMLElement = node => node.dom)",
"Given the target Node and mouse coordinates on the screen, determine the best possible location to drop the source Node. By default, the Node's DOM property is taken into consideration."
],
["node", "(id: NodeId) => NodeHelpers", "Returns an object containing helper methods to describe the specified Node. Click <a href='/docs/api/helpers/'>here</a> for more information."],
["node", "(id: NodeId) => NodeHelpers", "Returns an object containing helper methods to describe the specified Node. Click <a href='/docs/api/helpers'>here</a> for more information."],
["parseReactElement", "(element: React.ReactElement) => Object", [
["toNodeTree", "(normalize?: (node: Node, jsx: React.ReactElement) => void) => NodeTree", "Parse a given React element into a NodeTree"]
]],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: editor-components
id: editor
title: Interacting with the Editor
---

Expand Down
2 changes: 1 addition & 1 deletion site/docs/concepts/nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ By default, a non-Canvas Node is created. So, how do we actually create a Canvas
In the above example, using the `<Element />` component with the `canvas` prop, we've created a Canvas node of the type `div`. Since our `div` element is now handled by a Canvas node, therefore it is now a droppable region. On the other hand, since `h1`, `MyComp` and `MyContainerComp` are child Nodes of a Canvas, they are now draggable.

The `<Element />` component can also be used to configure other values of a Node, which is further detailed [here](../api/Element)
The `<Element />` component can also be used to configure other values of a Node, which is further detailed [here](../api/element)

<!-- We could also specify other things with the `<Element />` component, such as we could tell Craft to prevent parsing the children of an element as Nodes:
Expand Down
57 changes: 0 additions & 57 deletions site/docs/concepts/serializing.md

This file was deleted.

263 changes: 0 additions & 263 deletions site/docs/dev.md

This file was deleted.

10 changes: 10 additions & 0 deletions site/docs/sponsor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: sponsor
title: Sponsor
---

Craft.js is released under the [MIT license](https://github.com/prevwong/craft.js/blob/master/LICENSE) and is built with 100% love. Since it's first release in early 2020, it has been used by various individuals and companies to power their own page editor solution.

In July 2022, I left my full-time job and in that time to focus on Craft and it's [future](https://github.com/prevwong/craft.js/issues/507). If you found this project useful and would like to ensure its continued development, please consider sponsoring/donating to the project. Your contribution would mean a lot to me!

You can choose to contribute via [Github Sponsors](https://github.com/sponsors/prevwong), [OpenCollective](https://opencollective.com/craftjs), [Patreon](https://patreon.com/imprev) or [Ko-fi](https://ko-fi.com/prevwong).
5 changes: 3 additions & 2 deletions site/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
appId: 'PH8YTBNA7Q',
apiKey: '7a21621f37e010ec9a8c39298d71b045',
indexName: 'craft-js',
contextualSearch: false
},
prism: {
theme: require('prism-react-renderer/themes/shadesOfPurple'),
Expand All @@ -38,7 +39,7 @@ module.exports = {
position: 'right',
items: [
{
to: 'pathname:///examples/landing/',
to: 'pathname:///examples/landing',
label: 'Landing',
},
{
Expand All @@ -47,7 +48,7 @@ module.exports = {
},
],
},
{ to: 'support', label: 'Support', position: 'right' },
{ to: 'docs/sponsor', label: 'Sponsor', position: 'right' },
{
href: 'https://github.com/prevwong/craft.js',
label: 'GitHub',
Expand Down
Loading

0 comments on commit 84adfd1

Please sign in to comment.