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

[EXPERIMENTAL]: Extract git log info to display version of documentation #62

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lille-morille
Copy link
Collaborator

Background

Current documentation displays no metadata about the article itself. This is problematic for two reasons

  1. No info about created time/updated time means not knowing if documentation is stale/up-to-date
  2. No info about the author means now knowing who to ask for further explanation about the content

Proposed changes

Since we use git to version control all documentation, we can extract this data and provide it in the documentation itself.

This implementation consists of extracting git information about the documentation using a webpack function, which executes at "compile-time", recursively scraping the documentation, then spawning child-processes to execute git shell commands on those files on the host's machine. This data is then collected into a map of path -> git info which can be accessed by components on the client side to display the data.

Notes

Since the nature of this implementation could be platform specific and dangerous, this branch shall be left unmerged until further user testing is completed on a variety of operating systems.

Copy link

vercel bot commented Nov 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
codex ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 3:26pm

@MadsNyl
Copy link
Contributor

MadsNyl commented Nov 28, 2024

Når jeg tester på Windows får jeg en feil angående de nye git filene.

image

@lille-morille
Copy link
Collaborator Author

Hmm var det jeg tenkte. Noen kommandoer bare finnes ikke på Windows. Kan evt bare disable den featuren på Windows, siden prod kommer til å kjøre på linux uansett.

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

Successfully merging this pull request may close these issues.

Add system to track created_at and updated_at for documentation pages based on git commit history
2 participants