Closed giladgd closed 4 weeks ago
I use Vitepress' transformPageData to modify frontmatter for pages, and having the changelog plugin respect those changes would make it easier for me to disable or enable it for specific pages.
What do you mean by respect those changes would make it easier for me to disable or enable it
? You can always disable markdown affacted Nolebase plugins with
nolebase:
<pluginNameCamelCase>: false
For git-changelog plugin, it is stated here: https://nolebase-integrations.ayaka.io/pages/en/integrations/vitepress-plugin-git-changelog/configure-vite-plugins#excluding-a-page-from-the-transformation-of-gitchangelogmarkdownsection
Is this what you are expecting to have?
In my .vitepress/config.ts
file I have this code:
export default defineConfig({
transformPageData(pageData) {
if (pageData.filePath.startsWith("api/")) {
pageData.frontmatter.editLink = false;
pageData.frontmatter.lastUpdated = false;
pageData.frontmatter ||= {};
pageData.frontmatter.outline = [2, 3];
// This doesn't seem to affect the page
pageData.frontmatter.nolebase = {
gitChangelog: false
};
}
}
})
The problem is that the changelog still appears on pages where this code should have disabled it
I see. The git-changelog injected the markdown page too early at the time that the transformPageData hasn't been invoked yet. This might be a little bit tricky to deal with if you need to use GitChangelogMarkdownSection
.
The only way to fix this is by manully mount and template the NolebaseGitChangelog
and NolebaseGitContributors
when creating the layout.
Anyway, welcome to Nolebase community!
Thank you so much for the rest of the feature requests, I accepted them. Should be able to ship them ASAP since they are not relatively hard to implement.
And always, feel free to ask any questions 😄
Adding on this issue thread, it would be nice if github avatars of commit authors will be used by default instead of manually mapping authors in config.
Adding on this issue thread, it would be nice if github avatars of commit authors will be used by default instead of manually mapping authors in config.
@northword was this even possible?
@giladgd Btw, all accepted requests has been implemented and released. Sorry that I forgot to close this but this issue should already be closed.
cc @taskylizard we can move to another issue to discuss this further.
Sure thing, thanks!
@nekomeowww Thank you for implementing everything :) I've just tested it, and it works great!
I've opened a PR to use GitHub avatars when possible since I found that this is the main thing missing for me in the current implementation (#277)
The git changelog plugin is awesome!
However, there are some small things about it that I'd like to be able to configure before I can adopt it in my Vitepress website:
2 weeks ago
) instead of a fixed date255
h2
header (so the changelog component will just appear at the bottom of the page with no title)256
258
257
transformPageData
to modify frontmatter for pages, and having the changelog plugin respect those changes would make it easier for me to disable or enable it for specific pagesThanks for making this awesome plugin :)