Skip to content

Commit

Permalink
Merge pull request #573 from Fortran-FOSS-Programmers/update-docs-for…
Browse files Browse the repository at this point in the history
…-toml

Update docs for setting options in `fpm.toml`
  • Loading branch information
ZedThree authored Oct 16, 2023
2 parents d072cc7 + 8645cd7 commit b5eb0e6
Show file tree
Hide file tree
Showing 7 changed files with 316 additions and 95 deletions.
4 changes: 4 additions & 0 deletions docs/_static/ford_docs_custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Fixes issue with using sphinx-inline-tabs with sphinx-book-theme */
.tab-content.docutils.container {
width: 100%;
}
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"sphinx_argparse_cli",
"sphinx_inline_tabs",
]

# Napoleon settings
Expand Down Expand Up @@ -53,6 +54,7 @@

html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_css_files = ["ford_docs_custom.css"]

html_context = {
"github_user": "Fortran-FOSS-Programmers",
Expand Down
13 changes: 13 additions & 0 deletions docs/user_guide/command_line_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@
Command Line Options
======================

As well as setting options in the `project file <sec-project-options>`, you can
set or override all of them on the command line. This is useful for integrating
Ford into a build system for setting preprocessor defines, include paths, or
the version number, for example.

.. versionadded:: 7.0
The ``--config`` flag can be used to set *any* option. It takes a
TOML-formatted, semi-colon separated string, for example:

.. code:: console
ford example-project-file.md --config="search=false; parallel=4"
.. sphinx_argparse_cli::
:module: ford
:func: get_command_line_arguments
Expand Down
4 changes: 4 additions & 0 deletions docs/user_guide/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Here's a simple project file, ``my_project.md``
This is my Fortran project!
.. versionadded:: 7.0
If you use `fpm <https://fpm.fortran-lang.org>`_, you can also
specify project metadata in your `fpm.toml file <sec-fpm-toml>`!

We'll also need some Fortran source code to document. By default, FORD
looks for ``.f90`` files (along with `other extensions
<option-extensions>`) in ``./src`` -- this is relative to where you
Expand Down
Loading

0 comments on commit b5eb0e6

Please sign in to comment.