Skip to content

Commit a69d31c

Browse files
committed
Restructure Cabal documentation top-level parts
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.
1 parent 1157461 commit a69d31c

17 files changed

+349
-419
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ cabal-testsuite/**/haddocks
7373
# python artifacts from documentation builds
7474
*.pyc
7575
.python-sphinx-virtualenv/
76+
venv
77+
.venv
7678
/doc/.skjold_cache/
7779

7880
# macOS folder metadata

doc/_templates/layout.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{% extends "!layout.html" %}
22

33
{% block menu %}
4-
{{ super() }}
5-
<a href="cabal-projectindex.html">Reference</a>
4+
{{ super() }}
5+
<a href="cabal-syntax-quicklinks.html">Cabal Syntax Quicklinks</a>
66
<a href="genindex.html">Index</a>
77
{% endblock %}
8-

doc/bugs-and-stability.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

doc/intro.rst renamed to doc/cabal-context.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use Hackage_ which is Haskell's central
1414
package archive that contains thousands of libraries and applications in
1515
the Cabal package format.
1616

17-
Introduction
18-
============
17+
What Cabal does
18+
===============
1919

2020
Cabal is a package system for Haskell software. The point of a package
2121
system is to enable software developers and users to easily distribute,
@@ -122,7 +122,7 @@ the package depends on.
122122

123123
For full details on what goes in the ``.cabal`` and ``Setup.hs`` files,
124124
and for all the other features provided by the build system, see the
125-
section on :doc:`developing packages <developing-packages>`.
125+
section on :doc:`How to package Haskell code <how-to-package-haskell-code>`.
126126

127127
Cabal featureset
128128
----------------

doc/misc.rst renamed to doc/cabal-interface-stability.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
Reporting bugs and deficiencies
2-
===============================
3-
4-
Please report any flaws or feature requests in the `bug
5-
tracker <https://github.com/haskell/cabal/issues>`__.
6-
7-
For general discussion or queries email the libraries mailing list
8-
[email protected]. There is also a development mailing list
9-
10-
111
Stability of Cabal interfaces
122
=============================
133

doc/cabal-package.rst renamed to doc/cabal-package-description-file.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
Package Description
2-
===================
1+
Package Description — <package>.cabal File
2+
==========================================
33

4+
The package description file, commonly known as "the Cabal file",
5+
describes the contents of a package.
46
The Cabal package is the unit of distribution. When installed, its
57
purpose is to make available:
68

doc/cabal-project.rst renamed to doc/cabal-project-description-file.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cabal.project Reference
2-
=======================
1+
Project Description — cabal.project File
2+
========================================
33

44
``cabal.project`` files support a variety of options which configure the
55
details of your build. The general syntax of a ``cabal.project`` file is

doc/cabaldomain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,9 @@ class CabalConfigFieldXRef(CabalFieldXRef):
598598
#
599599

600600
class ConfigFieldIndex(Index):
601-
name = 'projectindex'
602-
localname = "Cabal reference"
603-
shortname = "Reference"
601+
name = 'syntax-quicklinks'
602+
localname = "Cabal Syntax Quicklinks"
603+
shortname = "Quicklinks"
604604

605605
class Entry(object):
606606
def __init__(self, typ, name, doc, anchor, meta):

doc/concepts-and-development.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

doc/getting-started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,4 @@ What Next?
228228
Now that you know how to set up a simple Haskell package using Cabal, check out
229229
some of the resources on the Haskell website's `documentation page
230230
<https://www.haskell.org/documentation/>`__ or read more about packages and
231-
Cabal on the :doc:`introduction <intro>` page.
231+
Cabal on the :doc:`What Cabal does <cabal-context>` page.

0 commit comments

Comments
 (0)