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 code of conduct and redirects to our docs #592

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- mkdocs>=1.2
- mkdocs-material>=7.1,<9.0
- markdown-include>=0.6
- mkdocs-redirects>=1.2.1
- mkdocstrings>=0.19.0
- mkdocstrings-python
- mkdocs-jupyter>=0.19.0
Expand Down
1 change: 1 addition & 0 deletions docs/contributing/code-of-conduct.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "CODE_OF_CONDUCT.md"
2 changes: 1 addition & 1 deletion docs/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ with the community and maintainers via
[a GitHub Discussion](https://github.com/nsidc/earthaccess/discussions),
or [any other method](our-meet-ups.md).

Please note that we have a [code of conduct](/CODE_OF_CONDUCT.md). Please follow it in all of your interactions with the project.
Please note that we have a [code of conduct](./code-of-conduct.md). Please follow it in all of your interactions with the project.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder why strict mode didn't catch this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfisher87 Absolute links aren't officially supported on MkDocs because they can be unpredictable and are not validated because they are effectively external links.
https://www.mkdocs.org/user-guide/writing-your-docs/#linking-to-pages

For example, if you host multiple things on a domain, this is a way to link them without knowing the explicit domain name, e.g.:

  • root: <pacakge.com>
  • MkDocs site URL: <package.com/docs/>
  • download artifacts: <example.com/downloads/>

So /downloads/package-linux.tar.gz would be a valid link for a tarball you might want to document on the site.

This is probably a good policy as it's really hard to say what / is intended to be -- here, the absolute link was intended to be back to the repository root, not to the docs dir or the domain root.


## First Steps to contribute

Expand Down
5 changes: 5 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ plugins:
rendering:
show_root_heading: false
show_source: false
- redirects:
redirect_maps:
'CODE_OF_CONDUCT.md': 'contributing/code-of-conduct.md'
'CODE_OF_CONDUCT.md.md': 'contributing/code-of-conduct.md'
- mkdocs-jupyter:
execute: True
ignore:
Expand All @@ -60,6 +64,7 @@ nav:
- "Development": "contributing/development.md"
- "Releasing": "contributing/releasing.md"
- "Our meet-ups": "contributing/our-meet-ups.md"
- "Code of Conduct": "contributing/code-of-conduct.md"
- "Resources": "resources.md"
- USER GUIDE:
- "user_guide/index.md"
Expand Down
Loading
Loading