• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    HTML
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

conan.io reStructuredText documentation

Documentation for Conan C/C++ package manager: https://conan.io

Build Status

How to build

  • Install python and pip docs.

  • Install the requirements (sphinx):

    $ pip install -r requirements.txt

  • Build the documentation:

    $ make html

How to read the built docs

Open a browser and select the _build/html/index.html file.

Example:

$ firefox _build/html/index.html

How to contribute

To make any contribution to Conan documentation fork this repository and open a Pull Request.

Target Branches

There are different branches in this repository, each one targeting a specific Conan version:

  • master: It should be used to fix some documentation issue or add some missing documentation for features already available in Conan 1.x.
  • develop: It should be used for new features or hotfixes to be incorporated in the next Conan 1.x version.
  • release/2.0: It should be used to fix some documentation issue or add some missing documentation for features already available in Conan 2.x.
  • develop/2.0: It should be used for new features or hotfixes to be incorporated in the next Conan 2.x version.

Style Guidelines

These guidelines are just general good practices for the formatting and structure of the whole documentation and do not pretend to be a stopper for any helpful contribution. Any contribution that may include relevant information for Conan users will always be welcomed.

Conan documentation is written in reStructuredText and follows reStructuredText Markup Specification.

Quick reStructuredText is also used for reference.

Any detail not covered by this guidelines will follow the aforementioned rules.

Section titles

Use section titles in this level of importance:

Section Title
=============

Section Title
-------------

Section Title
+++++++++++++

Section Title
^^^^^^^^^^^^^

Text emphasis/highlighting

  • Bold text to highlight important text:

    Note the simple scenario of a **header-only** library. Such package...
    
  • Italics to refer to file names, directory names and paths.

    If you have a look to the *test_package* folder, you will realize that the *example.cpp* and the *CMakeLists.txt* files don't have
    anything special. The *test_package/conanfile.py* file is...
    
  • Command inline literals to refer to command line, both full commands and command line arguments, or any extract of a full command.

    To create a conan package you can use :command:`conan create`.  You can see a :command:`git clone` command... You may call it with the :command:`--keep-source` option to avoid deleting and fetching the source.
    
  • Inline literals to refer to code or text inside recipes:

     ``package()`` -> conanfile.py method
     ``cmake`` -> generator in conanfile.txt
     ``settings`` -> variable inside a ConanFile class in conanfile.py
    

    Like this:

    Note that the ``build_id()`` method uses the ``self.info_build`` object to alter the build hash.
    
  • Other names like CMake, Autotools, Conan, Visual Studio should not be emphasized, just use a capital letter or follow the convention (like first and second capitalized letters for CMake).

code-blocks

Use code-blocks for code snippets or command line actions and follow the specific language indentation. Documentation makes an extensive use of bash, python, txt and cmake code-blocks.

.. code-block:: python

    from conans import ConanFile

    class EigenConan(ConanFile)
        name = "eigen"
        version = "3.3.4"

        def source():
            tools.get("https://some_url.org")
            ...
.. code-block:: text

    [requires]
    poco/1.9.4
    zlib/1.2.11
.. code-block:: bash
   :emphasize-lines: 3

    $ conan source . --source-folder src
    $ conan install --install-folder build_x86 -s arch=x86
    $ conan build . --build-folder build_x86 --source-folder src
    $ conan export-pkg . Hello/0.1@user/stable --build-folder build_x86

Indentation and line length

Make sure all indentation is done with spaces. Normally 2 space indentation for bulleted lists and 4 space indentation for code blocks. In some cases a 3 space indentation is needed for reStructuredText specifics like toc-trees:

.. toctree::
   :maxdepth: 2

   creating_packages/getting_started
   creating_packages/package_repo

The maximum line length for documentation is 140 characters except for lines inside code-blocks, external links or references.

Do not leave any unnecessary or trailing spaces.

Text boxes

Also called Admonitions, they are eye-catching texts with a clear purpose like warnings, tips or important content.

Use them in the following importance order:

  1. caution
  2. attention
  3. warning
  4. important
  5. note
  6. tip
.. warning::

    In the ConanCenter repository there are binaries for several mainstream compilers...
.. tip::

    Using profiles is strongly recommended. Learn more about them...

References

References are commonly used in the documentation and it's always a good way to highlight texts and give an implicit or explicit importance to something.

Internal reference

Use an internal reference when you want to refer to a specific section in this documentation. Most of the sections have a reference mark just before their names so you can reference it.

.. _conan_export_pkg_command:

conan export-pkg
================

...

To add a reference to the conan export-pkg command from another text:

Read more about the :ref:`conan export-pkg<conan_export_pkg_command>` command.
Or reference the :ref:`conan_export_pkg_command` directly.

External references

Use external references with external URL at the bottom of the file like this:

Submit a pull request to include it in `conan-center-index`_.
...
...

.. _`conan-center`: https://center.conan.io

In case you want to use explicit external references with a link, make sure it doesn't exceed the maximum line length, otherwise it should considered to be written as a normal external reference.

More Repositories

1

conan

Conan - The open-source C and C++ package manager
Python
7,779
star
2

conan-center-index

Recipes for the ConanCenter repository
Python
896
star
3

cmake-conan

CMake wrapper for conan C and C++ package manager
Python
815
star
4

conan-docker-tools

Some tools for automated package generation
Dockerfile
221
star
5

conan-package-tools

Conan Package Tools. Helps with massive package creation and CI integration (Travis CI, Appveyor...)
Python
164
star
6

examples

Conan 1.x examples
Python
121
star
7

conan-clion-plugin

CLion C/C++ IDE plugin for Conan Package Manager
Kotlin
98
star
8

examples2

Conan 2.x examples
Python
76
star
9

training

(Deprecated) Support code for conan 1.X trainings
Python
61
star
10

conan-vs-extension

Conan Extension for Visual Studio
C#
59
star
11

wishlist

This repo is to propose libraries, frameworks, and code in general that users would like to have in conan
49
star
12

tribe

Conan 2.0 Tribe
47
star
13

hooks

Official Conan client hooks
Python
32
star
14

conan-extensions

Some extra Conan commands for different purposes, like artifactory tasks, conan-center-index, etc
Python
24
star
15

meta-conan

Yocto layer for the Conan project
BitBake
24
star
16

hello

C++ Hello World library and application used Conan C/C++ Package Manager demos and examples
CMake
14
star
17

conan-io.github.io

Conan's Blog
HTML
11
star
18

conan_ci_jenkins

Jenkins Library for regular CI
Groovy
10
star
19

website

https://conan.io
JavaScript
9
star
20

training-ci

Material for advanced CI/CD trainings
Shell
9
star
21

web

Conan website, including home and ConanCenter
JavaScript
7
star
22

libhello

C++ Hello World library used in Conan C/C++ Package Manager tutorial and examples
C++
4
star
23

modular-boost

3
star
24

cmake-training

C++
3
star
25

test

Other test than the regular test suite, regression, tools etc.
Python
2
star
26

conanclientcert

Repository to host an updated certificate file, after LetsEncrypt expired theirs 30 Sept
2
star
27

.github

1
star
28

code-of-conduct

Code of conduct for the Conan organization
1
star
29

cci-sources-backup

Temporal solution for sources that are no longer accessible
1
star