Skip to content

Commit 6e282dd

Browse files
committed
Add initial version of pages
0 parents  commit 6e282dd

File tree

20 files changed

+1338
-0
lines changed

20 files changed

+1338
-0
lines changed

.github/workflows/sphinx.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: pages
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
defaults:
10+
run:
11+
shell: bash -l {0}
12+
13+
steps:
14+
- id: deploy-on-push
15+
run:
16+
echo "::set-output name=result::${{ env.DEPLOY_BRANCH }}"
17+
env:
18+
DEPLOY_BRANCH: ${{ secrets.DEPLOY_BRANCH && contains(github.ref, secrets.DEPLOY_BRANCH) && 1 || 0 }}
19+
20+
- name: Checkout repository
21+
uses: actions/checkout@v2
22+
23+
- name: Install dependencies
24+
uses: mamba-org/provision-with-micromamba@main
25+
with:
26+
environment-file: environment.yaml
27+
28+
- name: Build pages
29+
run: |
30+
sphinx-build pages _build
31+
32+
- name: Create nojekyll file
33+
run: |
34+
touch _build/.nojekyll
35+
36+
- uses: JamesIves/[email protected]
37+
if: ${{ github.event_name == 'push' && steps.deploy-on-push.outputs.result != 0 }}
38+
with:
39+
branch: gh-pages
40+
folder: _build
41+
single-commit: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/_*

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 fpm contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Minimal makefile for Sphinx documentation
2+
3+
# You can set these variables from the command line.
4+
LANGUAGE ?= en
5+
SPHINXOPTS ?=
6+
SPHINXBUILD ?= sphinx-build
7+
SOURCEDIR ?= pages
8+
BUILDDIR ?= _build
9+
10+
SPHINXOPTS += -Dlanguage='$(LANGUAGE)'
11+
12+
# Put it first so that "make" without argument is like "make help".
13+
help:
14+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
15+
16+
.PHONY: help Makefile
17+
18+
# Catch-all target: route all unknown targets to Sphinx using the new
19+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
20+
%: Makefile
21+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Fpm documentation
2+
3+
Repository for building the documentation pages for the Fortran package manager (fpm).
4+
5+
6+
## Building
7+
8+
This project is built with *sphinx* to install the required dependencies use
9+
10+
```
11+
conda env create -n sphinx -f environment.yaml
12+
conda activate sphinx
13+
```
14+
15+
Build the documentation by invoking
16+
17+
```
18+
make html
19+
```

environment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: sphinx
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python
6+
- sphinx
7+
- sphinx-intl
8+
- sphinx-copybutton
9+
- sphinx-design
10+
- sphinx-book-theme >=0.1
11+
- ablog
12+
- myst-parser

pages/_static/css/custom.css

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
:root {
2+
/*****************************************************************************
3+
* Fpm color palette
4+
**/
5+
--fpm-sd-primary: #734f96; --fpm-primary: 114, 79, 150; /* fpm */
6+
--fpm-sd-secondary: #9953ad; --fpm-secondary: 153, 83, 173; /* fpm-run */
7+
--fpm-sd-tertiary: #a34e9c; --fpm-tertiary: 163, 78, 156; /* fpm-build */
8+
--fpm-sd-test: #6853ad; --fpm-test: 104, 83, 173; /* fpm-test */
9+
--fpm-sd-complementary: #41967a; --fpm-complementary: 65, 150, 122; /* fpm-new */
10+
--fpm-sd-update: #4e52a3; --fpm-update: 78, 82, 163; /* fpm-update */
11+
--fpm-sd-accent: #de955e; --fpm-accent: 222, 149, 94; /* fpm-install */
12+
13+
/*****************************************************************************
14+
* Color
15+
*
16+
* Colors are defined in rgb string way, "red, green, blue"
17+
**/
18+
--pst-color-primary: var(--fpm-primary);
19+
--pst-color-info: var(--fpm-complementary);
20+
21+
--pst-color-h1: var(--pst-color-primary);
22+
--pst-color-h2: var(--pst-color-primary);
23+
--pst-color-h3: var(--pst-color-text-base);
24+
--pst-color-h4: var(--pst-color-text-base);
25+
--pst-color-h5: var(--pst-color-text-base);
26+
--pst-color-h6: var(--pst-color-text-base);
27+
--pst-color-paragraph: var(--pst-color-text-base);
28+
--pst-color-link: var(--fpm-update);
29+
--pst-color-link-hover: var(--fpm-tertiary);
30+
--pst-color-headerlink: var(--fpm-tertiary);
31+
--pst-color-headerlink-hover: 255, 255, 255;
32+
--pst-color-preformatted-text: 34, 34, 34;
33+
--pst-color-preformatted-background: 250, 250, 250;
34+
--pst-color-inline-code: var(--fpm-accent);
35+
36+
--pst-color-active-navigation: 19, 6, 84;
37+
--pst-color-navbar-link: 77, 77, 77;
38+
--pst-color-navbar-link-hover: var(--pst-color-active-navigation);
39+
--pst-color-navbar-link-active: var(--pst-color-active-navigation);
40+
--pst-color-sidebar-link: 77, 77, 77;
41+
--pst-color-sidebar-link-hover: var(--pst-color-active-navigation);
42+
--pst-color-sidebar-link-active: var(--pst-color-active-navigation);
43+
--pst-color-sidebar-expander-background-hover: 244, 244, 244;
44+
--pst-color-sidebar-caption: 77, 77, 77;
45+
--pst-color-toc-link: 119, 117, 122;
46+
--pst-color-toc-link-hover: var(--pst-color-active-navigation);
47+
--pst-color-toc-link-active: var(--pst-color-active-navigation);
48+
49+
--sd-color-primary: var(--fpm-sd-primary);
50+
--sd-color-secondary: #6c757d;
51+
--sd-color-success: var(--fpm-sd-complementary);
52+
--sd-color-info: var(--fpm-sd-update);
53+
--sd-color-warning: var(--fpm-sd-accent);
54+
--sd-color-danger: #dc3545;
55+
--sd-color-light: #f8f9fa;
56+
--sd-color-muted: #6c757d;
57+
--sd-color-dark: #212529;
58+
59+
/*****************************************************************************
60+
* Icon
61+
**/
62+
63+
/* font awesome icons*/
64+
--pst-icon-check-circle: '\f058';
65+
--pst-icon-info-circle: '\f05a';
66+
--pst-icon-exclamation-triangle: '\f071';
67+
--pst-icon-exclamation-circle: '\f06a';
68+
--pst-icon-times-circle: '\f057';
69+
--pst-icon-lightbulb: '\f0eb';
70+
71+
}

pages/_static/fortran-logo.svg

Lines changed: 58 additions & 0 deletions
Loading

pages/conf.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
project = "fpm"
2+
author = f"{project} contributors"
3+
copyright = "2021 Fortran programming language community"
4+
5+
extensions = [
6+
"ablog",
7+
"myst_parser",
8+
"sphinx_design",
9+
"sphinx_copybutton",
10+
]
11+
myst_enable_extensions = [
12+
"colon_fence",
13+
"deflist",
14+
"substitution",
15+
"html_image",
16+
]
17+
18+
html_theme = "sphinx_book_theme"
19+
html_title = "Fortran package manager"
20+
html_logo = "_static/fortran-logo.svg"
21+
html_favicon = "_static/fortran-logo.svg"
22+
23+
_extra_navbar = """
24+
<div class="sd-fs-4">
25+
<a href="https://fortran-lang.discourse.group/" target="_blank">
26+
<i class="fab fa-discourse"></i>
27+
</a>
28+
<a href="https://twitter.com/fortranlang" target="_blank">
29+
<i class="fab fa-twitter"></i>
30+
</a>
31+
<a href="https://github.com/fortran-lang/fpm" target="_blank">
32+
<i class="fab fa-github"></i>
33+
</a>
34+
</div>
35+
"""
36+
37+
html_theme_options = {
38+
"repository_url": "https://github.com/awvwgk/fpm-docs",
39+
"repository_branch": "main",
40+
"use_repository_button": True,
41+
"use_edit_page_button": True,
42+
"use_download_button": False,
43+
"path_to_docs": "pages",
44+
"extra_navbar": _extra_navbar,
45+
}
46+
47+
html_sidebars = {
48+
"news": ["sidebar-logo.html", "search-field.html", "sbt-sidebar-nav.html", "tagcloud.html", "archives.html"],
49+
"news/**": ["sidebar-logo.html", "postcard.html", "recentposts.html", "archives.html"],
50+
}
51+
52+
html_css_files = [
53+
"css/custom.css",
54+
]
55+
html_static_path = ["_static"]
56+
templates_path = ["_templates"]
57+
58+
blog_path = "news"
59+
blog_post_pattern = "news/*/*"
60+
61+
master_doc = "index"

pages/design/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(design)=
2+
3+
# Design documents
4+
5+
:::{note}
6+
This section contains the resources around the design of the Fortran package manager (fpm).
7+
:::
8+
9+
Fortran Package Manager (fpm) is a package manager and build system for Fortran.
10+
Its key goal is to improve the user experience of Fortran programmers.
11+
It does so by making it easier to build your Fortran program or library, run the executables, tests, and examples, and distribute it as a dependency to other Fortran projects.
12+
Fpm's user interface is modeled after [Rust's Cargo](https://doc.rust-lang.org/cargo/).
13+
Its long term vision is to nurture and grow the ecosystem of modern Fortran applications and libraries.
14+
15+
:::{toctree}
16+
:::

pages/how-to/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
(how-to)=
2+
3+
# How-To guides
4+
5+
:::{note}
6+
This section contains practical guides and recipes for solving specific problems with fpm.
7+
:::
8+
9+
:::{toctree}
10+
installation
11+
:::

0 commit comments

Comments
 (0)