-
Notifications
You must be signed in to change notification settings - Fork 57
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
Include current CLI version in generated docs page #279
Conversation
Just realized that this will look strange with our current version format |
@@ -190,6 +190,7 @@ jobs: | |||
git config --global user.name "${GITHUB_ACTOR}" | |||
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | |||
|
|||
(cd docs; npm pkg set version=$TAG_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a frontend developer, i approve this message 🤝
<script setup> | ||
import { version } from '../../../package.json' | ||
</script> | ||
# Kit CLI Reference {{ version }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely will want to update this :D but later, ill leave this to Annika but i think that having the version in the h1 is not ideal as it changes with each release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I wasn't sure where to put it honestly.
As it lives in the package.json maybe we can just show it in the sidebar, in a smaller, less "eye catching" way? just throwing ideas... |
I agree, I was not expecting it on the header. Somewhere on the sidebar makes sense. |
We can put it wherever we like, I just don't see a good spot in the sidebar (unless we want to do a dropdown + previous versions, but that seems like a v1.0 problem). |
We're doing this so we can check for consistency, not because we're doing a fancy drop-dow-to-view-old-versions thing. So my vote would be:
|
63d0ad9
to
8a673fc
Compare
<template> | ||
<div class="flex justify-between items-center"> | ||
<h1 id="kit-cli-reference" tabindex="-1"> | ||
Kit CLI Reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these changes are good to me, but in the future, and for a bigger reusability, we want this line to be a <slot />
so we can pass any title content that we want, and therefor, reuse it from anyplace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to do something like that, but I couldn't figure out a good way to parameterize the id/anchor bits -- if you've got tips I'm happy to fix it 👍
TBH I copied the anchor from what Vite autogens for a markdown #
🙂
Description
Add version to CLI reference page, now (slightly) less ugly:
Linked issues
Closes #146