Skip to content
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

Add documentation #1

Merged
merged 7 commits into from
Jul 7, 2021
Merged

Add documentation #1

merged 7 commits into from
Jul 7, 2021

Conversation

br3ndonland
Copy link
Owner

Description

This PR will add a documentation site for fastenv. The site is built with Material for MkDocs.

Changes

  • Add dependencies for docs (ea1f49c)
  • Create MkDocs site (69d2bd5)
  • Configure MkDocs site (02fb162)
  • Update docs homepage with info from README (e669e13)
  • Add favicon from Material for MkDocs (f6346ac)
  • Add placeholder for environment variable docs (940dcb5)
  • Add docs comparing fastenv with other projects (05836f1)

Related

br3ndonland/inboard#34

https://squidfunk.github.io/mkdocs-material/creating-your-site/

```text
❯ mkdocs new .
  INFO    -  Writing config file: ./mkdocs.yml
  INFO    -  Writing initial docs: ./docs/index.md
```
https://squidfunk.github.io/mkdocs-material/creating-your-site/#configuration

`edit_uri`

- `edit_uri: ""` disables the "Edit on GitHub" button
  https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/

`markdown_extensions`

- `pymdownx.inlinehilite`: code block highlighting
  https://squidfunk.github.io/mkdocs-material/reference/code-blocks/

`theme`

- colors: `primary` is header bar, `accent` is within page text, media
  queries allow for light/dark theme based on browser preference
  https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/
- `font: false`: don't load Google fonts
  https://squidfunk.github.io/mkdocs-material/setup/changing-the-fonts/
- `icon`: refers to icons bundled with mkdocs-material
  https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/

Add Vercel config: https://vercel.com/docs/configuration

Add Prettier config: It appears that MkDocs requires four-space tabs in
order to properly render Markdown lists. An additional Prettier config
will be added to specify the `tabWidth`.
- Align info in README and docs/index.md
- Use gear instead of wrench for settings icon
@codecov
Copy link

codecov bot commented Jul 7, 2021

Codecov Report

Merging #1 (05836f1) into develop (6521198) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop       #1   +/-   ##
========================================
  Coverage    100.0%   100.0%           
========================================
  Files            1        1           
  Lines            1        1           
========================================
  Hits             1        1           
Flag Coverage Δ
unit 100.0% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6521198...05836f1. Read the comment docs.

@br3ndonland br3ndonland merged commit 3662c98 into develop Jul 7, 2021
@br3ndonland br3ndonland deleted the docs branch July 7, 2021 00:46
br3ndonland added a commit that referenced this pull request Jul 7, 2021
#1
br3ndonland/inboard#34
br3ndonland/inboard@9943112

https://www.mkdocs.org/user-guide/configuration/#site_url
https://www.mkdocs.org/user-guide/configuration/#use_directory_urls
mkdocs/mkdocs#2189
mkdocs/mkdocs#2360

https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/
squidfunk/mkdocs-material#2520

MkDocs recently made the `site_url` setting required. A warning is now
seen when `site_url` is not included in mkdocs.yml:

```text
WARNING  -  Config value: 'site_url'.
            Warning: This option is now required. Set to a valid URL
            or an empty string to avoid an error in a future release.
```

The docs describe the `site_url` setting as follows:

> Set the canonical URL of the site. This is a required setting. If the
> 'root' of the MkDocs site will be within a subdirectory of a domain,
> be sure to include that subdirectory in the setting
> (https://example.com/foo/). If the domain is yet to be determined, you
> may use a placeholder domain, which will need to be updated prior to
> deployment.
>
> If the built site will not be behind a server, then you may set the
> value to an empty string (''). When set to an empty string, some
> features of MkDocs may act differently. For example, the
> `use_directory_urls` setting must be set to false.

If the docs are "behind a server," they often have more than one URL.
Which should be set as the `site_url`? Furthermore, if the related
`use_directory_urls` is set to `true`, it appends a trailing slash to
the URLs generated for the ToC (Table of Contents).

This commit will set `site_url: ""` and `use_directory_urls: false`.
In combination with the `{"cleanUrls": true, "trailingSlash": false}`
settings in vercel.json, the previous behavior of URLs and navigation
will be restored.
br3ndonland added a commit that referenced this pull request Jul 8, 2021
br3ndonland added a commit that referenced this pull request Jul 8, 2021
#1

- Add link to type stubs for `os.environ`
- Add `.venv` before REPL examples when other packages are needed
- Make some minor edits throughout
br3ndonland added a commit that referenced this pull request Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant