Skip to content
Merged

Deps #21

Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.local

This file was deleted.

33 changes: 2 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@

1. Install

Add Zesty CLI (you may need to sudo this command)
```Bash
npm install -g @zesty-io/cli
```

Run the Next.js marketing
```Bash
npx create-next-app --example https://github.com/zesty-io/nextjs-starter
Expand Down Expand Up @@ -69,9 +64,6 @@ These files should only be modified for customize integrations.

* `pages/[...slug].js` - this is a dynamic catch all routes file, hard written paths and files will superceed it. This file will look for content in zesty relative to the requested path `/about/` for example looks for content in zesty that matches the `/about/` path, if it fails to find content it will 404. Instead of 404ing, you can code this to default to your base application component.
* `pages/index.js` - if you intent to run zesty to power you homepage, you need index.js to reference the [...slug].js file
* `lib/sync.js` this file read the next.config.js file to create new views/zesty/ components to map to the connected instance's content models it can be modified to ignore specific models. Sync will attempt to overwrite your next.config.js file if there are missing values.
* `lib/ZestyView.js` the dynamic component which autoloads the relative content model components from views/zesty based on the url path in the request.
* `lib/api.js` this file includes the dynamic fetch request to get zesty content and navigation bsed on the relative url path form the request.
* `components/ZestyHead.js` Used by ZestyView.js, an optional `<head>` component that dybamic sets up meta data for zesty content items that have pages in nextjs.

**Optional Files**
Expand All @@ -87,32 +79,11 @@ These files can be removed if there references are removed.

### next.config.js

In order for the integration to work, you need `trailingSlash: true` and the `env.zesty: {}` object. See the below example.
In order for the integration to work, you need `trailingSlash: true`.

```next.config.js
// generated by lib/sync.js
module.exports = {
trailingSlash: true,
eslint: {
ignoreDuringBuilds: true
},
env: {
zesty: {
instance_zuid: "", // zesty unique id of content instance
stage: "", // e.g. https://XYZ-dev.webengine.zesty.io
production: "", // e.g. https://www.acme.com
stage_password: "",
src_dir: "", // where the next project has pages, components, etc folders
options: {
skip_config_overwrite: false, // for setups with custom config files, after initial setup of the env.zesty object, set to true
model_ignore_list: [
'6-xyz-xyz',
'6-xyz-xyz' // an array of models ZUIDs to ignore when creating component files in views/zesty
]
}

}
}
trailingSlash: true
}
```

Expand Down
1 change: 0 additions & 1 deletion declarations.d.ts
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
declare module "lib/zesty/fetchPage";
110 changes: 0 additions & 110 deletions lib/zesty/fetchPage.js

This file was deleted.

34 changes: 0 additions & 34 deletions lib/zesty/fetchRedirects.js

This file was deleted.

38 changes: 0 additions & 38 deletions lib/zesty/fetchRoutes.js

This file was deleted.

10 changes: 0 additions & 10 deletions lib/zesty/findLink.js

This file was deleted.

Loading