Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new method getStaticPages #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add new method getStaticPages #12

wants to merge 1 commit into from

Conversation

JugglerX
Copy link

No description provided.

Comment on lines +381 to +385
async getStaticPages() {
const data = await this.getData();
let paths = _.map(data.pages, (page) => page);
return paths;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JugglerX isn't the path variable should be pages?
And also, why not:

    async getStaticPages() {
      const data = await this.getData();
      return data.pages;
  }

And if are already there, do we really need this low resolution helper methods?
Wouldn't calling sourcebitDataClient.getData().pages be enough?

Comment on lines -384 to -386
if (process.env.NODE_ENV === 'development') {
paths = paths.concat(_.map(paths, (pagePath) => pagePath + (pagePath !== '/' ? '/' : '')));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"react": ">=16",
"next": "10.x"
"react": ">=17",
"next": "^11.0.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JugglerX we have existing projects that use sourcebit and are running under next 10.
So I suggest making it ">=10"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"next": "^11.0.0"
"next": ">=10"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants