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

Feat/website rewrite #1276

Open
wants to merge 72 commits into
base: main
Choose a base branch
from

Conversation

jacobdalamb
Copy link

A rewrite of Nushell docs using Starlight

Related issue: #1231

There may be a way to build a versioning system on top of Starlight using routing and is a feature the team currently has a discussion open on it withastro/starlight#957

  • Average build speed: 53 seconds
  • Should be easier to manage using autogenerated groups
  • Personally think it has a better design
  • Translations are as good as they are currently (maybe better?)

Copy link
Member

@sholderbach sholderbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working through all of this! I gave it a try locally to get a feel for it.

Before we decide on whether we make a switch and you having to tweak more things I have a few questions mostly on how we manage the pages:

  • Would there be a clear path towards how we could build our own docs versioning?
  • a few pages have changed so much that git doesn't recognize them as moved and instead just reports a deletion and a new creation. This needs extra care and attention when resolving the merge with the changes from the main branch.
  • (see comments)

When looking at the pages:

  • the missing top menu on the homepage made it less usable to quickly go to either the release notes/blog, or documentation or the different documentation topics (same happens on the 404 page)
    • Does starlight allow you to have different sidebars under the same overall project?
  • the search didn't work for me locally, is this still using the algolia backend or something provided by astro? (@fdncred is looking at the algolia analytics for FAQ questions)
  • Nit: While the look generally feels modern, I personally don't really dig the fake-macOS- windows around the code blocks, as they seem to disrupt the flow in longer text

Comment on lines +24 to +25
**/*.js
**/*.ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should they all be ignored during formatting?

.typos.toml Outdated
Comment on lines 2 to 4
[files]
extend-exclude = ["pt-BR", "de", "ja", "es", "book/commands"]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you run into any new problems with the typos ci step?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no, I wasn't sure what the file was for. I'll add it back.

CONTRIBUTING.md Outdated
@@ -14,7 +14,7 @@ If you're adding a new page to the book, to make it appear, put it also to `.vue

## Display Nu Code Snippets With Syntax Highlighting

To display Nushell code snippets with syntax highlighting support you can wrap the Nu codes with \```nu \``` or \```nushell \```, for example:
To display Nushell code snippets with syntax highlighting support you can wrap the Nu codes with \```nu \``` or \```nu \```, for example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nu twice for the codeblock annotation doesn't make sense. Did you maybe run a global search and replace here?

While it makes sense for most of the Nushell code to standardize on one there may be a few snippets around that use different languages.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I did run a global search and replaced there.

---

# Nushell 0.3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I reading this right that the h1 headings are completely replaced by the title in the metadata and the highest level you can declare yourself is markdown h2?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the h1 headings are completely replaced by the title in the metadata.

---
title: Moving around your system
sidebar:
order: 6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we always need to figure out the sidebar order in the subpages?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easier than having to manually configure the navbar navigation. It's a relatively low cost trade.


<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# <code>{{ $frontmatter.title }}</code> for core
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the pages are already autogenerated from the internal help via a script, templating this again feels a little bit overkill :)

@fdncred
Copy link
Collaborator

fdncred commented Mar 5, 2024

I also noticed that some things don't look quite right.

Markdown
image

Nushell Tables
image

Command Reference is really slow. Maybe should be broken up by letter than having one massive page.

Search

Cookbook 404

Not a bad first start.

@jacobdalamb
Copy link
Author

Thanks for working through all of this! I gave it a try locally to get a feel for it.

Before we decide on whether we make a switch and you having to tweak more things I have a few questions mostly on how we manage the pages:

  • Would there be a clear path towards how we could build our own docs versioning?
  • a few pages have changed so much that git doesn't recognize them as moved and instead just reports a deletion and a new creation. This needs extra care and attention when resolving the merge with the changes from the main branch.
  • (see comments)

When looking at the pages:

  • the missing top menu on the homepage made it less usable to quickly go to either the release notes/blog, or documentation or the different documentation topics (same happens on the 404 page)

    • Does starlight allow you to have different sidebars under the same overall project?
  • the search didn't work for me locally, is this still using the algolia backend or something provided by astro? (@fdncred is looking at the algolia analytics for FAQ questions)

  • Nit: While the look generally feels modern, I personally don't really dig the fake-macOS- windows around the code blocks, as they seem to disrupt the flow in longer text

It seems that some people from the discussion I mentioned earlier about including docs versioning into Starlight said that branches would be the best way as "Folders can get tricky and start to require a lot of manual work" which I agree with.

I'm not sure what you mean by "different sidebars under the same overall project"

Search doesn't work locally, search is provided by Pagefind

No problem, you remove the windows around the code blocks by adding frame="none" or frame="code"

@jacobdalamb
Copy link
Author

I also noticed that some things don't look quite right.

Markdown image

Nushell Tables image

Command Reference is really slow. Maybe should be broken up by letter than having one massive page.

Search

Cookbook 404

Not a bad first start.

Oh yeah, for some particular reason prettier changes the format of the coming from bash page and messes it up. I will just go back and fix it then tell prettier not to format that page.

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.

None yet

3 participants