Skip to content

Fix commitMessage and pass CMSContent through templates and routes #8

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

Merged
merged 4 commits into from
Mar 9, 2024

Conversation

revgum
Copy link
Contributor

@revgum revgum commented Mar 8, 2024

See issue #7

@oscarotero
Copy link
Member

Thanks for this! Sorry for the commitMessage bug, I should test it before releasing.

Regarding to basePath issue, I like your approach but would rather to narrow the variable type to CMSContent instead of the entire context.

For example, instead of this:

await collectionList({
  context: c,
  collection,
  version: await versioning?.current(),
}),

We can change it to this:

await collectionList({
  options: c.var.options,
  collection,
  version: await versioning?.current(),
}),

This makes the templates more independent of Hono, reducing the internal dependency.

It could even be narrowed to:

await collectionList({
  basePath: c.var.options.basePath,
  collection,
  version: await versioning?.current(),
}),

But passing the entire options object allows to include more values in the future without changing much code.

@revgum
Copy link
Contributor Author

revgum commented Mar 9, 2024

Seems reasonable! The PR is updated!

@revgum revgum changed the title Fix commitMessage and handle basePath in Hono context Fix commitMessage and pass CMSContent through templates and routes Mar 9, 2024
@oscarotero oscarotero merged commit 0376584 into lumeland:main Mar 9, 2024
@oscarotero
Copy link
Member

Thank you!

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