Skip to content

Commit fc08062

Browse files
Alexheitorlessato-mcTom McCarthy
authored
docs: migrate documentation from Gatsby to MkDocs material (#279)
* fix whitespace * docs: add logger * docs: add middleware * docs: parameters * docs: batch * docs: typing * docs: validation * docs: dataclasses * docs: parser * docs: use mkdocs for website * docs: add docs branch to have live preview for the PR * docs: change color and adjust logo * docs: merged async and generator sections * docs: merged cloudwatch logs to tabs * docs: merged tabs * docs: remove highlight line markers * docs: add meta tags * docs: remove old docs folder * chore: typo in GetCfnTemplate Co-authored-by: Tom McCarthy <[email protected]> * Update docs/core/logger.md Co-authored-by: Tom McCarthy <[email protected]> * Update docs/core/logger.md Co-authored-by: Tom McCarthy <[email protected]> * Update docs/utilities/parameters.md Co-authored-by: Tom McCarthy <[email protected]> * Update docs/utilities/validation.md Co-authored-by: Tom McCarthy <[email protected]> * Update docs/utilities/validation.md Co-authored-by: Tom McCarthy <[email protected]> * Update docs/utilities/batch.md Co-authored-by: Tom McCarthy <[email protected]> * Update docs/core/tracer.md Co-authored-by: Tom McCarthy <[email protected]> * remove code formatting from table headers * docs: increse max-width with extra css for readability * docs: add changes from review * docs: refactor doc targets, add docker build * docs: tabs naming for cloudwatch logs * docs: fix build-docs-website target * docs: enhance the visual aid for accessibility purposes * fix: syntax previously broken in last set of commits Signed-off-by: heitorlessa <[email protected]> * fix: async ops snippet completeness Signed-off-by: heitorlessa <[email protected]> * improv: screen real estate in home page. More effective use of table, and collapse verbose IAM example. Signed-off-by: heitorlessa <[email protected]> * feat: enable strict mode for broken links Signed-off-by: heitorlessa <[email protected]> * improv: merge Layer example to be more pragmatic Signed-off-by: heitorlessa <[email protected]> * improv: key features, getting started, clean non-essential Signed-off-by: heitorlessa <[email protected]> * improv: expand escape hatch, async, reuse examples Signed-off-by: heitorlessa <[email protected]> * improv: add getting started Signed-off-by: heitorlessa <[email protected]> * improv: add getting started, trim content, expand examples Signed-off-by: heitorlessa <[email protected]> * improv: wording on logger reuse Signed-off-by: heitorlessa <[email protected]> * improv: additional examples on formatting, order, etc. plus advanced navigation Signed-off-by: heitorlessa <[email protected]> * fix: typo on logging keys in FAQ Signed-off-by: heitorlessa <[email protected]> * feat: enable snippets extension; include changelog in the docs Signed-off-by: heitorlessa <[email protected]> * fix: docker no longer works with strict due to an issue upstream ref: mkdocs/mkdocs#2108 Signed-off-by: heitorlessa <[email protected]> * feat: add favicon Signed-off-by: heitorlessa <[email protected]> * chore: consistency with metrics Signed-off-by: heitorlessa <[email protected]> * feat: docs revision date, smaller TOC, and footer copyright Signed-off-by: heitorlessa <[email protected]> * improv: enhanced navigation, trimmed content, added more examples Signed-off-by: heitorlessa <[email protected]> * feat: add openGraph and Twitter card, attempt 1 Signed-off-by: heitorlessa <[email protected]> * Update docs/core/tracer.md Co-authored-by: Tom McCarthy <[email protected]> * Update docs/core/tracer.md Co-authored-by: Tom McCarthy <[email protected]> * docs: set tabs for yaml/json to 2 spaces * fix: yaml indent for cfn * fix: formatting yaml cfn * fix: typo in features table Signed-off-by: heitorlessa <[email protected]> * fix: typo in features table, match sidebar Signed-off-by: heitorlessa <[email protected]> * feat: add built-in search Signed-off-by: heitorlessa <[email protected]> * fix: broken links Signed-off-by: heitorlessa <[email protected]> * improv: bring tenets up, clarify core vs general Signed-off-by: heitorlessa <[email protected]> * fix: broken links Signed-off-by: heitorlessa <[email protected]> * fix: contrast for layer IAM snippet Signed-off-by: heitorlessa <[email protected]> * fix: change extra dep to warning; wording Signed-off-by: heitorlessa <[email protected]> * remove ... from cfn docs * fix: width; remove old comments Signed-off-by: heitorlessa <[email protected]> * improv: add explicit section for LOG_EVENT Signed-off-by: heitorlessa <[email protected]> * fix: highlight inject_lambda_context Signed-off-by: heitorlessa <[email protected]> * feat: add docker-based docs for dev Signed-off-by: heitorlessa <[email protected]> * chore: copyright to 2021 Signed-off-by: heitorlessa <[email protected]> * revert: search width Signed-off-by: heitorlessa <[email protected]> * chore: Add higher res metrics image * chore: remove custom font; correct edit uri Signed-off-by: heitorlessa <[email protected]> * feat: record page view and search pattern Signed-off-by: heitorlessa <[email protected]> * feat: add API reference Signed-off-by: heitorlessa <[email protected]> Co-authored-by: Heitor Lessa <[email protected]> Co-authored-by: Tom McCarthy <[email protected]> Co-authored-by: heitorlessa <[email protected]> Co-authored-by: Tom McCarthy <[email protected]>
1 parent bf66299 commit fc08062

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3399
-21352
lines changed

.github/workflows/python_docs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches:
99
- master
10+
- docs/mkdocs
1011
# Disabled until docs support versioning per branch/release
1112
# - develop
1213
release:

CHANGELOG.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
.# Changelog
1+
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

4-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5+
This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format for changes and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
68

79
## [Unreleased]
810

CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ GitHub provides additional document on [forking a repository](https://help.githu
4242
You might find useful to run both the documentation website and the API reference locally while contributing:
4343

4444
* **API reference**: `make docs-api-local`
45-
* **Docs website**: `make dev-docs` to install deps, and `make docs-local` to run it thereafter
45+
* **Docs website**: `make docs-local`
46+
- If you prefer using Docker: `make docs-local-docker`
4647

4748
### Conventions
4849

Makefile

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: target dev dev-docs format lint test coverage-html pr build build-docs build-docs-api build-docs-website
1+
.PHONY: target dev format lint test coverage-html pr build build-docs build-docs-api build-docs-website
22
.PHONY: docs-local docs-api-local security-baseline complexity-baseline release-prod release-test release
33

44
target:
@@ -9,9 +9,6 @@ dev:
99
poetry install --extras "pydantic"
1010
pre-commit install
1111

12-
dev-docs:
13-
cd docs && yarn install
14-
1512
format:
1613
poetry run isort -rc aws_lambda_powertools tests
1714
poetry run black aws_lambda_powertools tests
@@ -40,13 +37,17 @@ build-docs-api: dev
4037
mv -f dist/api/aws_lambda_powertools/* dist/api/
4138
rm -rf dist/api/aws_lambda_powertools
4239

43-
build-docs-website: dev-docs
40+
build-docs-website: dev
4441
mkdir -p dist
45-
cd docs && yarn build
46-
cp -R docs/public/* dist/
42+
poetry run mkdocs build
43+
cp -R site/* dist/
44+
45+
docs-local:
46+
poetry run mkdocs serve
4747

48-
docs-local: dev-docs
49-
cd docs && yarn start
48+
docs-local-docker:
49+
docker build -t squidfunk/mkdocs-material ./docs/
50+
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
5051

5152
docs-api-local:
5253
poetry run pdoc --http : aws_lambda_powertools

docs/.prettierignore

-4
This file was deleted.

docs/.prettierrc

-4
This file was deleted.

docs/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM squidfunk/mkdocs-material
2+
RUN pip install mkdocs-git-revision-date-plugin

docs/api/.gitkeep

Whitespace-only changes.

docs/changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[comment]: <> (Includes Changelog content entire file as a snippet)
2+
--8<-- "CHANGELOG.md"

0 commit comments

Comments
 (0)