-
Notifications
You must be signed in to change notification settings - Fork 24
Smithy Python Documentation #564
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
base: develop
Are you sure you want to change the base?
Changes from all commits
3ce5050
2bf5a91
865164f
ba3b0ac
656b518
e80b533
7e17663
4afc8cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: docs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v5 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v6 | ||
with: | ||
python-version: 3.12.x | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v6 | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: uv sync --group docs | ||
- run: uv run mkdocs gh-deploy --force |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,6 @@ htmlcov | |
*.egg-info | ||
dist | ||
.venv | ||
|
||
# mkdocs documentation | ||
docs/site |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--8<-- "README.md" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we remove the "Home" that gets rendered at the top of the page and replace it with a "Smithy Python" title. We'll need to explicitly ignore the first line of the README.md to avoid the duplication of the title. Something like this:
We'll also need to change this in
The change renders: ![]() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: aws_sdk_signers |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: smithy_aws_core |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: smithy_aws_event_stream |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: smithy_core |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: smithy_http |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: smithy_json |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,93 @@ | ||||||||
# Project Information | ||||||||
site_name: Smithy Python | ||||||||
watch: [README.md] | ||||||||
|
||||||||
# Copyright | ||||||||
copyright: Copyright © 2025, Amazon Web Services, Inc | ||||||||
|
||||||||
# Repository | ||||||||
repo_name: smithy-lang/smithy-python | ||||||||
repo_url: https://github.com/smithy-lang/smithy-python | ||||||||
|
||||||||
# Theme | ||||||||
theme: | ||||||||
name: material | ||||||||
logo: assets/smithy-anvil.svg | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should also add the smithy logo as a favicon.
Suggested change
|
||||||||
palette: | ||||||||
# Palette toggle for automatic mode | ||||||||
- media: "(prefers-color-scheme)" | ||||||||
toggle: | ||||||||
icon: material/brightness-auto | ||||||||
name: Switch to light mode | ||||||||
|
||||||||
# Palette toggle for light mode | ||||||||
- media: "(prefers-color-scheme: light)" | ||||||||
scheme: default | ||||||||
toggle: | ||||||||
icon: material/brightness-7 | ||||||||
name: Switch to dark mode | ||||||||
primary: black | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||
|
||||||||
# Palette toggle for dark mode | ||||||||
- media: "(prefers-color-scheme: dark)" | ||||||||
scheme: slate | ||||||||
toggle: | ||||||||
icon: material/brightness-4 | ||||||||
name: Switch to system preference | ||||||||
primary: black | ||||||||
features: | ||||||||
- navigation.path | ||||||||
- navigation.top | ||||||||
- navigation.footer | ||||||||
- content.code.copy | ||||||||
|
||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should remove the dropdown menu for "Packages" and "Designs" and convert them to sections displaying all the sublinks directly. This removes the extra click needed to access package references. I don't think we expect these sections to grow by that much either.
Suggested change
This renders: ![]() |
||||||||
# Plugins | ||||||||
plugins: | ||||||||
- search | ||||||||
- mkdocstrings: | ||||||||
handlers: | ||||||||
python: | ||||||||
paths: [packages/*/src] | ||||||||
options: | ||||||||
show_submodules: true | ||||||||
show_symbol_type_heading: true | ||||||||
show_symbol_type_toc: true | ||||||||
|
||||||||
# Navigation | ||||||||
nav: | ||||||||
- index.md | ||||||||
- Packages: | ||||||||
- smithy-core: packages/smithy-core.md | ||||||||
- smithy-http: packages/smithy-http.md | ||||||||
- smithy-json: packages/smithy-json.md | ||||||||
- smithy-aws-core: packages/smithy-aws-core.md | ||||||||
- smithy-aws-event-stream: packages/smithy-aws-event-stream.md | ||||||||
- aws-sdk-signers: packages/aws-sdk-signers.md | ||||||||
- Designs: | ||||||||
- Auth: designs/auth.md | ||||||||
- Documents: designs/documents.md | ||||||||
- "Event Streams": designs/event-streams.md | ||||||||
- Exceptions: designs/exceptions.md | ||||||||
- "HTTP Interfaces": designs/http-interfaces.md | ||||||||
- Retries: designs/retries.md | ||||||||
- Serialization: designs/serialization.md | ||||||||
- Shapes: designs/shapes.md | ||||||||
|
||||||||
# Extensions | ||||||||
markdown_extensions: | ||||||||
- admonition | ||||||||
- pymdownx.highlight: | ||||||||
anchor_linenums: true | ||||||||
line_spans: __span | ||||||||
pygments_lang_class: true | ||||||||
- pymdownx.inlinehilite | ||||||||
- pymdownx.snippets | ||||||||
- pymdownx.superfences | ||||||||
- toc: | ||||||||
permalink: true | ||||||||
|
||||||||
# Extras | ||||||||
extra: | ||||||||
social: | ||||||||
- icon: fontawesome/brands/github | ||||||||
link: https://github.com/smithy-lang/smithy-python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does this come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For publishing I copied this over from the Publishing your site docs from Material for MkDocs. It uses outdated action tags so I updated those.
As for the git
config
commands specifically, I believe that's what's recommend by actions/checkout.