Skip to content

Add --ignoreuncategorized flag #953

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

Merged
merged 5 commits into from
Apr 23, 2025
Merged

Add --ignoreuncategorized flag #953

merged 5 commits into from
Apr 23, 2025

Conversation

simontreanor
Copy link
Contributor

Sometimes it is necessary to link to documents that you do not want to appear on the navigation sidebar, perhaps as they are too numerous and therefore swamp the menu structure.

I've added an ignoreuncategorized flag to the build arguments, the effect of which is for the menu to ignore any documents that do not have any category defined in their front matter. It does not prevent the documents' contents from showing, just that they do not appear in the sidebar.

Usage e.g.: dotnet fsdocs build --clean --properties Configuration=Release --eval --ignoreuncategorized=true

This flag defaults to false if omitted.

@nojaf
Copy link
Collaborator

nojaf commented Apr 22, 2025

Hello, this seems reasonable. However, I would prefer to use --ignoreuncategorized without =true. Does the absence of the flag set the value to false?
@nhirschey, what are your thoughts?

If we add this, I would like to see a reference to it in our own documentation. Otherwise, nobody will ever know it exists.

@simontreanor
Copy link
Contributor Author

Hi Florian, thanks for the feedback. I've just checked that the flag can be used on its own, without =true, and also that omitting it sets the value to false. I've also added it to the documentation.

@nhirschey
Copy link
Collaborator

The functionality seems like a nice addition. Thank you @simontreanor

I would prefer to use --ignoreuncategorized without =true

Agreed.

I've also added it to the documentation.

Thank you. However, when I build the docs the styling is messed up as shown in this screenshot. Can you prevent the wrapping without changing the style? If not, I'd take out the no-wrap span styling. Our styles are defined in .css, and there must be some clash.

image

@simontreanor
Copy link
Contributor Author

I've taken out the no-wrap span styling, which I think is the simplest remedy.

@nojaf
Copy link
Collaborator

nojaf commented Apr 23, 2025

@simontreanor would you like a release after this is merged?

@simontreanor
Copy link
Contributor Author

simontreanor commented Apr 23, 2025 via email

@nojaf
Copy link
Collaborator

nojaf commented Apr 23, 2025

That would be great, thank you!

Could you add

## 21.0.0-beta-005 - 2025-04-23

### Added
* Add --ignoreuncategorized flag. [#953](https://github.com/fsprojects/FSharp.Formatting/pull/953)

to the RELEASE_NOTES.md file?

(I couldn't push to your branch because you used your main branch, avoid using your default branch when creating PRs using GitHub in general)

@simontreanor
Copy link
Contributor Author

Done, and duly noted. Thank you for all your help!

Copy link
Collaborator

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Thanks!

@nojaf nojaf merged commit 2bd545e into fsprojects:main Apr 23, 2025
3 checks passed
@nojaf
Copy link
Collaborator

nojaf commented Apr 23, 2025

New beta available on NuGet: https://www.nuget.org/packages/fsdocs-tool/21.0.0-beta-005
Let me know if this works for you and we can probably call 21 stable.

@simontreanor
Copy link
Contributor Author

Seems to be working fine. I was updating documentation for FSharp.Finance.Personal and included the output of ~250 unit tests as reference (see here). The navigation menu is a whole lot tidier now without those 250 other entries!

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.

3 participants