Skip to content
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 docs/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extra:
translated: true # false hides content related to building translations. Default: false.
hide_coverage: false # true hides content related to code coverage. Default: false.
macos_only: false # true hides tabbed content, and displays only macOS instructions. Default: false.
contribution_guide_root: content_test_bed/how-to/contribute
alternate:
- name: English
link: /en/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# First-time contributors

{% extends "contribute/first-time-contributors.md" %}
{% extends "_shared/contribute/first-time-contributors.md" %}
2 changes: 1 addition & 1 deletion docs/en/content_test_bed/how-to/contribute/how/branches.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Work from a feature branch, not your `main` branch

{% extends "contribute/how/branches.md" %}
{% extends "_shared/contribute/how/branches.md" %}
6 changes: 3 additions & 3 deletions docs/en/content_test_bed/how-to/contribute/how/build-docs.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Building documentation

{% extends "contribute/how/build-docs.md" %}
{% extends "_shared/contribute/how/build-docs.md" %}

{% block front_matter %}

Before you build the documentation, and have a [development environment](dev-environment.md) set up.
Before you build the documentation, and have a [development environment](../how/dev-environment.md) set up.

{% endblock %}

{% block end_matter %}

Once you have successfully built the docs, you are ready to [write documentation](write-docs.md).
Once you have successfully built the docs, you are ready to [write documentation](../how/write-docs.md).

{% endblock %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Adding change information for release notes

{% extends "contribute/how/change-note.md" %}
{% extends "_shared/contribute/how/change-note.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Setting up a development environment

{% extends "contribute/how/dev-environment.md" %}
{% extends "_shared/contribute/how/dev-environment.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Submitting a new issue

{% extends "contribute/how/new-issue.md" %}
{% extends "_shared/contribute/how/new-issue.md" %}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Proposing a new feature

{% extends "contribute/how/propose-feature.md" %}
{% extends "_shared/contribute/how/propose-feature.md" %}

{% block end_matter %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Reproducing an issue

{% extends "contribute/how/reproduce-issue.md" %}
{% extends "_shared/contribute/how/reproduce-issue.md" %}

{% block front_matter %}

To begin reproducing an issue, you will need a [development environment](dev-environment.md) set up.
To begin reproducing an issue, you will need a [development environment](../how/dev-environment.md) set up.

{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Providing a pull request review

{% extends "contribute/how/review-pr.md" %}
{% extends "_shared/contribute/how/review-pr.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Avoiding scope creep

{% extends "contribute/how/scope-creep.md" %}
{% extends "_shared/contribute/how/scope-creep.md" %}
6 changes: 3 additions & 3 deletions docs/en/content_test_bed/how-to/contribute/how/submit-pr.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Submitting a pull request

{% extends "contribute/how/submit-pr.md" %}
{% extends "_shared/contribute/how/submit-pr.md" %}

{% block end_matter %}

{% if config.extra.website %}

Your pull request may require additional content, such as a [change note](change-note.md), before it can be [reviewed](../next/pr-review.md).
Your pull request may require additional content, such as a [change note](../how/change-note.md), before it can be [reviewed](../next/pr-review.md).

{% else %}

As part of submitting a pull request, you'll need to include a [change note](change-note.md) before it can be [reviewed](../next/pr-review.md).
As part of submitting a pull request, you'll need to include a [change note](../how/change-note.md) before it can be [reviewed](../next/pr-review.md).

{% endif %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Translating content

{% extends "contribute/how/translate.md" %}
{% extends "_shared/contribute/how/translate.md" %}
6 changes: 3 additions & 3 deletions docs/en/content_test_bed/how-to/contribute/how/write-code.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Writing, running, and testing code

{% extends "contribute/how/write-code.md" %}
{% extends "_shared/contribute/how/write-code.md" %}

{% block front_matter %}

To begin working on code, ensure you have a [development environment](dev-environment.md) set up, and you are [working on a branch](branches.md)
To begin working on code, ensure you have a [development environment](../how/dev-environment.md) set up, and you are [working on a branch](../how/branches.md)

{% endblock %}

{% block end_matter %}

Once you have everything working, you can [submit a pull request](submit-pr.md) with your changes.
Once you have everything working, you can [submit a pull request](../how/submit-pr.md) with your changes.

{% endblock %}
6 changes: 3 additions & 3 deletions docs/en/content_test_bed/how-to/contribute/how/write-docs.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Writing documentation

{% extends "contribute/how/write-docs.md" %}
{% extends "_shared/contribute/how/write-docs.md" %}

{% block front_matter %}

Before you begin writing documentation, ensure you are able to [build the documentation](build-docs.md), and you are [working on a branch](branches.md).
Before you begin writing documentation, ensure you are able to [build the documentation](../how/build-docs.md), and you are [working on a branch](../how/branches.md).

{% endblock %}

{% block end_matter %}

Once you are happy with your new documentation, you can [submit a pull request](submit-pr.md) with your proposed changes.
Once you are happy with your new documentation, you can [submit a pull request](../how/submit-pr.md) with your proposed changes.

{% endblock %}
2 changes: 1 addition & 1 deletion docs/en/content_test_bed/how-to/contribute/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing to {{ formal_name }}

{% extends "contribute/index.md" %}
{% extends "_shared/contribute/index.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Receiving a pull request review

{% extends "contribute/next/pr-review.md" %}
{% extends "_shared/contribute/next/pr-review.md" %}
2 changes: 1 addition & 1 deletion docs/en/content_test_bed/how-to/contribute/next/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The release process

{% extends "contribute/next/release.md" %}
{% extends "_shared/contribute/next/release.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- rumdl-disable-file MD041 -->

{% extends "contribute/policies/ai-policy.md" %}
{% extends "_shared/contribute/policies/ai-policy.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Code style guide

{% extends "contribute/style/code-style-guide.md" %}
{% extends "_shared/contribute/style/code-style-guide.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Documentation style guide

{% extends "contribute/style/docs-style-guide.md" %}
{% extends "_shared/contribute/style/docs-style-guide.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Fixing an issue

{% extends "contribute/what/fix-issue.md" %}
{% extends "_shared/contribute/what/fix-issue.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Implementing a new feature

{% extends "contribute/what/implement-feature.md" %}
{% extends "_shared/contribute/what/implement-feature.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Proposing a new feature

{% extends "contribute/what/propose-feature.md" %}
{% extends "_shared/contribute/what/propose-feature.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Providing a pull request review

{% extends "contribute/what/review-pr.md" %}
{% extends "_shared/contribute/what/review-pr.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Translating content

{% extends "contribute/what/translate.md" %}
{% extends "_shared/contribute/what/translate.md" %}
2 changes: 1 addition & 1 deletion docs/en/content_test_bed/how-to/contribute/what/triage.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Triaging an issue

{% extends "contribute/what/triage.md" %}
{% extends "_shared/contribute/what/triage.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Using the tools

{% extends "contribute/what/use-tools.md" %}
{% extends "_shared/contribute/what/use-tools.md" %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Adding documentation

{% extends "contribute/what/write-docs.md" %}
{% extends "_shared/contribute/what/write-docs.md" %}
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ maintainers = [
]

dependencies = [
"click==8.3.3",
"click==8.4.0",
"deepl==1.30.0",
"markdown-checker==1.0.3",
"mistletoe==1.5.1",
"mkdocs-autorefs==1.4.4",
"mkdocs-literate-nav==0.6.3", # DO NOT UPGRADE - Uncertain whether author's move to ProperDocs will cause incompatibility
"mkdocs-macros-plugin==1.5.0",
"mkdocs-macros-plugin @ git+https://github.com/kattni/mkdocs-macros-plugin@include-dir-multiple-directories",
"mkdocs-material==9.7.6",
"mkdocs-rss-plugin==1.19.0",
"mkdocs==1.6.1", # DO NOT UPGRADE - 2+ is not compatible with anything here
Expand Down
1 change: 0 additions & 1 deletion src/beeware_docs_tools/live_serve_en.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def serve_docs(
"mkdocs",
"serve",
"--clean",
"--livereload",
"--config-file",
str(output_path / "mkdocs.en.yml"),
"--watch",
Expand Down
11 changes: 10 additions & 1 deletion src/beeware_docs_tools/md_tempdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,23 @@ def save_config(project_path, temp_md_path, config, language="en"):

base_path = config["markdown_extensions"]["pymdownx.snippets"].get("base_path", [])

contribution_root = config["extra"].get(
"contribution_guide_root", "how-to/contribute"
)

if language != "en":
shared_content_path = temp_md_path.resolve() / f"shared_content/{language}"
local_docs_path = temp_md_path.resolve() / language / contribution_root
else:
shared_content_path = (Path(__file__).parent / "shared_content/en").resolve()
local_docs_path = (project_path / "docs/en" / contribution_root).resolve()

base_path.append(str(shared_content_path))
config["markdown_extensions"]["pymdownx.snippets"]["base_path"] = base_path
config["plugins"]["macros"]["include_dir"] = str(shared_content_path)
config["plugins"]["macros"]["include_dir"] = [
str(shared_content_path),
str(local_docs_path),
]

with (temp_md_path / "config.yml").open("w", encoding="utf-8") as config_f:
yaml.dump(config, config_f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,3 +653,8 @@ footer.md-footer *, html .md-footer-meta.md-typeset a {
.md-typeset table:not([class]) {
font-size: 1rem;
}

/* Remove H1 from collapsed content */
details.abstract h1 {
display: none;
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@

{% if config.extra.website %}

Contributing to BeeWare requires you to pick a project and set up a development environment:

* [Briefcase](https://briefcase.beeware.org/en/stable/how-to/contribute/how/dev-environment/)
* [Toga](https://toga.beeware.org/en/stable/how-to/contribute/how/dev-environment/)
* [Rubicon Objective-C](https://rubicon-objc.beeware.org/en/stable/how-to/contribute/how/dev-environment/)

{% else %}

Contributing to {{ formal_name }} requires you to set up a development environment.

### Prerequisites { #dev-environment-prereqs }
Expand Down Expand Up @@ -315,6 +304,4 @@ pre-commit installed at .git/hooks/pre-commit

{% endif %}

{% endif %}

Now you are ready to start hacking on {{ formal_name }}!
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,54 @@ Even if you can't fix the problem, reporting anything you discover during the pr

/// details-abstract | Set up a development environment

{% include "contribute/how/dev-environment.md" %}
{% include "how/dev-environment.md" %}

///

/// details-abstract | Work from a branch

{% include "contribute/how/branches.md" %}
{% include "how/branches.md" %}

///

/// details-abstract | Reproduce the issue

{% include "contribute/how/reproduce-issue.md" %}
{% include "how/reproduce-issue.md" %}

///

**If fixing the issue requires changes to code:**

/// details-abstract | Write, run, and test code

{% include "contribute/how/write-code.md" %}
{% include "how/write-code.md" %}

///

**If fixing the issue requires changes to documentation:**

/// details-abstract | Build documentation

{% include "contribute/how/build-docs.md" %}
{% include "how/build-docs.md" %}

///

/// details-abstract | Write documentation

{% include "contribute/how/write-docs.md" %}
{% include "how/write-docs.md" %}

///

**When you're ready to submit your contribution:**

/// details-abstract | Add a change note

{% include "contribute/how/change-note.md" %}
{% include "how/change-note.md" %}

///

/// details-abstract | Submit a pull request

{% include "contribute/how/submit-pr.md" %}
{% include "how/submit-pr.md" %}

///
Loading