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

Include current CLI version in generated docs page #279

Merged
merged 2 commits into from
May 16, 2024

Conversation

amisevsk
Copy link
Contributor

@amisevsk amisevsk commented Apr 30, 2024

Description

Add version to CLI reference page, now (slightly) less ugly:

Screenshot 2024-05-15 at 5 53 07 PM

Linked issues

Closes #146

@amisevsk
Copy link
Contributor Author

amisevsk commented May 1, 2024

Just realized that this will look strange with our current version format 0.2.0-93739be

@@ -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)
Copy link
Contributor

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 }}
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@javisperez
Copy link
Contributor

Just realized that this will look strange with our current version format 0.2.0-93739be

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...

@gorkem
Copy link
Contributor

gorkem commented May 1, 2024

I agree, I was not expecting it on the header. Somewhere on the sidebar makes sense.

@amisevsk
Copy link
Contributor Author

amisevsk commented May 1, 2024

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).

@bmicklea
Copy link
Contributor

bmicklea commented May 1, 2024

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:

  • Small text below the title, normal font
  • Small text at the bottom of the page, normal font

<template>
<div class="flex justify-between items-center">
<h1 id="kit-cli-reference" tabindex="-1">
Kit CLI Reference
Copy link
Contributor

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.

Copy link
Contributor Author

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 # 🙂

@amisevsk amisevsk merged commit c7cc96f into jozu-ai:main May 16, 2024
3 checks passed
@amisevsk amisevsk deleted the version-in-cli-ref branch May 16, 2024 16:54
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.

version number for the cli reference
5 participants