From e6f6453a520cb28b3d52a536f47669739741dfc4 Mon Sep 17 00:00:00 2001 From: Kattni Date: Fri, 24 Oct 2025 23:25:47 -0400 Subject: [PATCH] Update CoC location, beeware_plugin to update CoC source. --- .../community/behavior/changes/contents.lr | 29 +---- .../behavior/code-of-conduct/contents.lr | 63 +--------- content/community/behavior/contents.lr | 15 +-- .../making-a-coc-complaint/contents.lr | 2 +- .../behavior/making-a-coc-report/contents.lr | 119 +----------------- content/community/code-of-conduct/contents.lr | 51 ++++++++ .../lektor_beeware_plugin.py | 20 +++ templates/code-of-conduct.html | 5 + templates/layout.html | 1 + 9 files changed, 90 insertions(+), 215 deletions(-) create mode 100644 content/community/code-of-conduct/contents.lr create mode 100644 templates/code-of-conduct.html diff --git a/content/community/behavior/changes/contents.lr b/content/community/behavior/changes/contents.lr index 3bebbf1de2..40ee8104dc 100644 --- a/content/community/behavior/changes/contents.lr +++ b/content/community/behavior/changes/contents.lr @@ -1,28 +1,5 @@ -_model: page +_model: redirect --- -title: Changes +new_path: /community/code-of-conduct#changes --- -body: - -The following is a list and explanation of major changes to the behavior -policies of the BeeWare project. - -## July 4, 2016 - -Added instructions and guidelines for reporting incidents. - -## December 5, 2015 - -Initial Code of Conduct adopted. - ---- -gutter: - -Only major substantive changes are listed here; For a complete list of -all changes, see [the changelog of the GitHub -repository](https://github.com/beeware/beeware.github.io/commits/lektor/content/community/behavior). - ---- -sort_key: 3 ---- -summary: A history of changes to behavior policies of the BeeWare project +_discoverable: no diff --git a/content/community/behavior/code-of-conduct/contents.lr b/content/community/behavior/code-of-conduct/contents.lr index 10d3f6bfd2..0fdd132e37 100644 --- a/content/community/behavior/code-of-conduct/contents.lr +++ b/content/community/behavior/code-of-conduct/contents.lr @@ -1,62 +1,5 @@ -_model: page +_model: redirect --- -title: Code of Conduct +new_path: /community/code-of-conduct --- -body: - -As contributors and maintainers of this project, and in the interest of -fostering an open and welcoming community, we pledge to respect all -people who contribute through reporting issues, posting feature -requests, updating documentation, submitting pull requests or patches, -and other activities. - -We are committed to making participation in this project a -harassment-free experience for everyone, regardless of level of -experience, gender, gender identity and expression, sexual orientation, -disability, personal appearance, body size, race, ethnicity, age, -religion, or nationality. - -Examples of unacceptable behaviour by participants include: - -- The use of sexualized language or imagery -- Personal attacks -- Trolling or insulting/derogatory comments -- Public or private harassment -- Publishing other's private information, such as physical or electronic - addresses, without explicit permission -- Other unethical or unprofessional conduct - -Project maintainers have the right and responsibility to remove, edit, -or reject comments, commits, code, wiki edits, issues, and other -contributions that are not aligned to this Code of Conduct, or to ban -temporarily or permanently any contributor for other behaviours that -they deem inappropriate, threatening, offensive, or harmful. - -By adopting this Code of Conduct, project maintainers commit themselves -to fairly and consistently applying these principles to every aspect of -managing this project. Project maintainers who do not follow or enforce -the Code of Conduct may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public -spaces when an individual is representing the project or its community. - -If you feel the code of conduct has been violated, please [report the -incident](/community/behavior/making-a-coc-report/) to the BeeWare core -team. - ---- -summary: All participants in the BeeWare community are expected to adhere to a Code of Conduct ---- -gutter: - -## Making a Code of Conduct Report - -Has something or someone in the BeeWare community made you feel -uncomfortable? [Here's how to report the -situation.](/community/behavior/making-a-coc-report/) - -## Credits - -This Code of Conduct is adapted from the [Contributor Covenant, version -1.3.0](https://www.contributor-covenant.org/version/1/3/0/code-of-conduct.html) - +_discoverable: no diff --git a/content/community/behavior/contents.lr b/content/community/behavior/contents.lr index 86b19dbada..0fdd132e37 100644 --- a/content/community/behavior/contents.lr +++ b/content/community/behavior/contents.lr @@ -1,14 +1,5 @@ -_model: page +_model: redirect --- -title: Behavior +new_path: /community/code-of-conduct --- -sort_key: 1 ---- -summary: How we ensure that the BeeWare community stays welcoming and friendly. ---- -body: - -To ensure that BeeWare stays an open and welcoming community, we have a -number of policies to make our community expectations explicit and -clear. - +_discoverable: no diff --git a/content/community/behavior/making-a-coc-complaint/contents.lr b/content/community/behavior/making-a-coc-complaint/contents.lr index 5d1fa95dd4..445872eeb3 100644 --- a/content/community/behavior/making-a-coc-complaint/contents.lr +++ b/content/community/behavior/making-a-coc-complaint/contents.lr @@ -1,5 +1,5 @@ _model: redirect --- -new_path: /community/behavior/making-a-coc-report/ +new_path: /community/code-of-conduct#reporting-an-issue --- _discoverable: no diff --git a/content/community/behavior/making-a-coc-report/contents.lr b/content/community/behavior/making-a-coc-report/contents.lr index 4dc0550f32..445872eeb3 100644 --- a/content/community/behavior/making-a-coc-report/contents.lr +++ b/content/community/behavior/making-a-coc-report/contents.lr @@ -1,118 +1,5 @@ -_model: page +_model: redirect --- -title: Making a CoC Report +new_path: /community/code-of-conduct#reporting-an-issue --- -body: - -If you believe someone is violating the [BeeWare Project Code of -Conduct](/code-of-conduct/) we ask that you report it to the BeeWare -Project by emailing one or more of the project maintainers (listed in -the sidebar). All reports will be kept confidential. In some cases we -may determine that a public statement will need to be made. If that's -the case, the identities of all victims and reporters will remain -confidential unless those individuals instruct us otherwise. - -**If you believe anyone is in physical danger, please notify appropriate -law enforcement first**. If you are unsure what law enforcement agency -is appropriate, please include this in your report and we will attempt -to notify them. - -In your report please include: - -- **Your contact info** (so we can get in touch with you if we need to - follow up) -- **Names (real, nicknames, or pseudonyms) of any individuals - involved**. If there were other witnesses besides you, please try to - include them as well. -- **When and where the incident occurred**. Please be as specific as - possible. -- **Your account of what occurred**. If there is a publicly available - record (e.g. a mailing list archive or a public IRC logger) please - include a link. -- **Any extra context** you believe existed for the incident. -- If you believe this incident is ongoing. -- If you believe any member of the core team has a conflict of - interest in adjudicating the incident. -- What, if any, corrective response you believe would be appropriate. -- Any other information you believe we should have. - -Core team members are obligated to maintain confidentiality with regard -to the reporter and details of an incident. - -## What happens after you file a report? - -You will receive an email acknowledging receipt of your complaint. We -promise to acknowledge receipt within 24 hours (and will aim for much -quicker than that). - -The core team will immediately meet to review the incident and -determine: - -- What happened. -- Whether this event constitutes a code of conduct violation. -- Who the bad actor was. -- Whether this is an ongoing situation, or if there is a threat to - anyone's physical safety. -- If this is determined to be an ongoing incident or a threat to - physical safety, the working groups' immediate priority will be to - protect everyone involved. This means we may delay an "official" - response until we believe that the situation has ended and that - everyone is physically safe. - -If a member of the core team is one of the named parties, they will not -be included in any discussions, and will not be provided with any -confidential details from the reporter. - -If anyone on the core team believes they have a conflict of interest in -adjudicating on a reported issue, they will inform the other core team -members, and recuse themselves from any discussion about the issue. -Following this declaration, they will not be provided with any -confidential details from the reporter. - -Once the working group has a complete account of the events they will -make a decision as to how to response. Responses may include: - -- Nothing (if we determine no violation occurred). -- A private reprimand from the working group to the individual(s) - involved. -- A public reprimand. -- An imposed vacation (i.e. asking someone to "take a week off" from a - mailing list or IRC). -- A permanent or temporary ban from some or all BeeWare spaces (GitHub - repositories, Discord, etc.) -- A request for a public or private apology. - -We'll respond within one week to the person who filed the report with -either a resolution or an explanation of why the situation is not yet -resolved. - -Once we've determined our final action, we'll contact the original -reporter to let them know what action (if any) we'll be taking. We'll -take into account feedback from the reporter on the appropriateness of -our response, but we don't guarantee we'll act on it. - -Finally, depending on the specifics of the incident and the potential -for ongoing harm, the core team may choose to make a public report of -the incident on [The Buzz](/news/buzz/), the BeeWare blog. - ---- -summary: Has something or someone in the BeeWare community made you feel uncomfortable? Here's how to report the situation. ---- -gutter: - -## Reporting contacts - -- [Russell Keith-Magee](mailto:russell@beeware.org) -- [Katie McLaughlin](mailto:katie@beeware.org) -- [Philip James](mailto:philip@beeware.org) - -## Credits - -This reporting guide draws heavily from the [Django Software Foundation -Code of Conduct Reporting -Guide](https://www.djangoproject.com/conduct/reporting/). The BeeWare -Project thanks the DSF, and the DSF Code of Conduct Committee for their -work in drafting this document. - ---- -hide_from_index: +_discoverable: no diff --git a/content/community/code-of-conduct/contents.lr b/content/community/code-of-conduct/contents.lr new file mode 100644 index 0000000000..bc7ae32fa9 --- /dev/null +++ b/content/community/code-of-conduct/contents.lr @@ -0,0 +1,51 @@ +_model: page +--- +_template: code-of-conduct.html +--- +title: The BeeWare Community Code of Conduct +--- +summary: All participants in the BeeWare community are expected to adhere to the Code of Conduct. +--- +gutter: + +The BeeWare Community Code of Conduct outlines the guidelines to be followed by everyone participating in the BeeWare community, how to report a violation, and the enforcement mechanisms in place for when a violation occurs. + +###### [Our Pledge](/community/code-of-conduct#our-pledge) + +Our pledge to everyone involved in the BeeWare community. + +###### [Encouraged behaviors](/community/code-of-conduct#encouraged-behaviors) + +Examples of **behaviors you should engage in**. + +###### [Restricted behaviors](/community/code-of-conduct#restricted-behaviors) + +Examples of **behaviors you are required to avoid**. + +###### [Other restrictions](/community/code-of-conduct#other-restrictions) + +Further examples of **restricted behaviors**. + +###### [Reporting an issue](/community/code-of-conduct#reporting-an-issue) + +To whom, when, and how to make a report. + +###### [Report followup](/community/code-of-conduct#report-followup) + +The Response Team's incident report follow-up procedures. + +###### [Enforcement](/community/code-of-conduct#enforcement) + +The enforcement mechanisms to expect if a violation occurs. + +###### [Scope](/community/code-of-conduct#scope) + +The scope of this Code of Conduct. + +###### [Attribution](/community/code-of-conduct#attribution) + +Attribution details for this Code of Conduct. + +###### [Changes](/community/code-of-conduct#changes) + +The history of significant changes to these guidelines. diff --git a/packages/lektor_beeware_plugin/lektor_beeware_plugin.py b/packages/lektor_beeware_plugin/lektor_beeware_plugin.py index 81d5d40dcb..acb2e9fcc4 100644 --- a/packages/lektor_beeware_plugin/lektor_beeware_plugin.py +++ b/packages/lektor_beeware_plugin/lektor_beeware_plugin.py @@ -5,6 +5,8 @@ from lektor.pluginsystem import Plugin from jinja2 import pass_context +import markdown +import requests @pass_context @@ -21,6 +23,23 @@ def translate(context, string, bag_name="translate"): return "" +@pass_context +def raw_github(context, path, repo, include_title=True): + """ + Pull Markdown content from a raw-content GitHub link, convert it to HTML for + inclusion in a Lektor template, using `raw_github` in the template. + + :param context: Lektor context. + :param path: The path to the markdown file relative to the root of the GitHub repo. + :param repo: The GitHub repo name. + """ + raw_url = f"https://raw.githubusercontent.com/beeware/{repo}/refs/heads/main/{path}" + content = requests.get(raw_url).text + if not include_title: + _, content = content.split("\n", 1) + return markdown.markdown(content) + + class BeeWarePlugin(Plugin): name = "BeeWare Custom Lektor Plugin" description = "This is a custom local plugin to add extra functionality." @@ -28,3 +47,4 @@ class BeeWarePlugin(Plugin): def on_setup_env(self, **extra): self.env.jinja_env.globals["today"] = date.today() self.env.jinja_env.filters["trans"] = translate + self.env.jinja_env.filters["raw_github"] = raw_github diff --git a/templates/code-of-conduct.html b/templates/code-of-conduct.html new file mode 100644 index 0000000000..b5c3354f66 --- /dev/null +++ b/templates/code-of-conduct.html @@ -0,0 +1,5 @@ +{% extends "page.html" %} + +{% block main %} +{{ "CODE_OF_CONDUCT.md" | raw_github(".github", false) | safe }} +{% endblock %} diff --git a/templates/layout.html b/templates/layout.html index 6565d22d19..165fbac78d 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -134,6 +134,7 @@
© Russell Keith-Magee {{ none|dateformat('Y') }}

+ Code of Conduct | GitHub | Discord | Mastodon |