-
Notifications
You must be signed in to change notification settings - Fork 701
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
Restructure user guide into top-level guides, reference and explanation parts #9379
Restructure user guide into top-level guides, reference and explanation parts #9379
Conversation
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 appreciate the new TOC
doc/how-to-integrate-into-nix.rst
Outdated
@@ -1,5 +1,5 @@ | |||
Nix Integration | |||
=============== | |||
How to integrate Cabal into Nix |
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.
Do we need this? IIRC there's a ticket noting that the functionality is broken and suggesting to delete it.
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 kept it for now to show how a consistent guide naming could look like. I'd like to remove it in a separate PR, copy over possibly useful information into the Nix docs, and a reference here.
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.
There is already an open PR for the deletion of this section (which also removes the nix integration from cabal itself) here: #9239
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.
Yes, I think, it's better to remove it ASAP (at least the docs): it's a wart that is actively harming ux.
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.
Done
.. TIP:: | ||
If this is your first time using `cabal` you should check out the :doc:`Getting Started guide <getting-started>`. | ||
|
||
Starting from scratch, we're going to walk you through creating a simple |
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.
This sounds like it is the Getting Started guide.
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.
On second thought, given @ffaf1's comment on a deleted line, this whole thing is just relocated and this confusion was already there. We should probably still figure out what we want.
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, the idea is that the getting started is a heavily condensed version of the more detailed package guide, just enough to get a feel for the tool/library
doc/how-to-package-haskell-code.rst
Outdated
- ``pkgname >=n`` | ||
- ``pkgname ^>=n`` (since Cabal 2.0) | ||
- ``pkgname >=n && <m`` | ||
- ``pkgname ==n.*`` (since Cabal 1.6) |
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.
Do we care about the "since" here?
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.
Not, sure, but i like to add more explicit examples in a later PR. Let's keep it for now as is.
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.
If it's not the reference part of the manual, things like since Cabal 1.6
are better omitted. Of course, if you feel like leaving it as a future work, that's fine.
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.
Removed.
17cc303
to
82371cf
Compare
I've cleaned up the commits |
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.
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.
The new TOC with 4+2 main sections is very good.
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 like the overall direction, but it’s a little hard to navigate all the changes. Please, expand the description of the PR (+ the commit message, which I haven’t checked, but should be identical to the PR description), and explain what exactly this achieves. References to 3rd party sites is allowed but the description should be self-contained nevertheless. Right now it’s not.
one clear flaw in the current PR is renaming of the source files. Let’s probably try to avoid this since it’ll break a lot of links to the latest
version of the docs. The name of the file doesn’t need to match the name of the section.
Since it’s a significant restructure of our main documentation source, I invite the main contributors to chime In @Kleidukos @Mikolaj @fgaz @gbaz @andreasabel @andreabedini |
I love the restructure. BTW, I wonder how the structure in the aborted project https://github.com/haskell/cabal-userguide compares with this one? Does it correspond to just the "Cabal Guilde" part? Is there anything to be learned or scavenged? @JonathanLorimer, would you have any remarks about the new restructure proposed in this ticket or generally an advice from a veteran? |
I like David's version more. There's no reason to number the highest-level sections like Guide / Reference / Explanation in my opinion. |
That's a really nice layout. I've copied it over. |
d036b0a
to
2b5a8a9
Compare
I've expanded the PR message and squashed the relevant commits to use that same message. Regarding file renames i've added SEO as the reason. Our aim should be to have our latest Cabal pages rank highest for typical search queries like "how to package Haskell", "cabal file", and related variations instead of GHC, stack or blogs. |
The structure of that alternative looks like what the authors of https://documentation.divio.com/ would call a tutorial, teaching a user step-by-step more and more involved usages of Cabal. This may not be needed with Cabal, although some the topics would make good guides as well. |
I said something similar in #9214 already, but I think that this is an absolutely essential step in improving the documentation of cabal. Large sections in the manual can currently not decide whether they want to be a tutorial or guide introducing how to accomplish some task, or whether they want to be the reference documentation which exhaustively enumerates all the knobs and options. Making this explicit, like this PR does, is helpful in spotting and naming these discrepancies and fixing them in subsequent smaller PRs. Thanks @malteneuss for doing this :) |
hmm. was just trying to use these docs (i have an upstream package with a bug in it). i uploaded it to a remote git repository, and wanted to tell cabal to use that version instead of the one from hackage, but the language around i think "specifying packages from an external version control" was missing an action verb. "specifying packages for cabal to download from an external version control" would have been clearer, along with some language about cabal matching the name of the package you're trying to use by first downloading the package, then looking at the cabal file there. |
This is out of scope for this PR, but such question should definitely be answered by the docs. Could you add a separate PR against the existing docs? Maybe also adding what other "type" of version control is supported? Ideally the phrasing would use keywords that you would use to search with when you had no idea about the docs. |
76f48d4
to
8b47c3c
Compare
8b47c3c
to
3b89724
Compare
The goal is for users to easier find pages for typical problems through search engines and page navigation. - The top-level layout is based on the popular documentation structure by https://documentation.divio.com/ to give a clear structure to users and future documentation contributors: * Guides: Present a solution to a single, atomic, typical user problem. * Reference: Describe user API (CLI fields, syntax etc) with technical rigour and completeness. * Explanation: Discuss background information, scope, design decisions etc. - Move existing documentation roughly into these categories with minimal editing as the basis for further editing. - Rename guide titles to mention how-to for improving SEO. - Rename some files to improve SEO since that name becomes part of the URL (often called slug). Important page keywords should appear in the slug as well to make pages rank higher in search engines.
3b89724
to
759ba8e
Compare
I just noticed that this patch did break URLs like
It may be good to look into restoring them using some Sphynx magic (there should be a way to assign URLs, I believe). |
I can take a look, probably on the weekend. Thanks for reporting. |
@malteneuss that would be awesome, thank you! |
Another step of the user guide improvement initiative #9214:
Restructure Cabal documentation top-level parts
The goal is for users to easier find pages for typical problems through search engines and page navigation.
clear structure to users and future documentation contributors:
Important page keywords should appear in the slug as well to make pages rank higher in search engines.
Template Β: This PR does not modify
cabal
behaviour (documentation, tests, refactoring, etc.)Include the following checklist in your PR: