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

Serve conda-incubator meeting notes #184

Merged
merged 12 commits into from
Jul 31, 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
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
Helpful links:
- Conda Org COC: https://github.com/conda-incubator/governance/blob/main/CODE_OF_CONDUCT.md
- Contributing docs: ../blob/main/CONTRIBUTING.md -->

- [ ] If I have added a new page to `learn/` or `community/`, I have added it to the corresponding `_sidebar.json` file.
15 changes: 15 additions & 0 deletions .github/workflows/cron-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Republish site

on:
schedule:
- cron: 0 0 * * 4 # Every Thursday (after biweekly Wednesdays)
workflow_dispatch:

jobs:
redeploy:
runs-on: ubuntu-latest
steps:
- run: >
curl -X POST -d '{}'
https://api.netlify.com/build_hooks/${{ secrets.NETLIFY_BUILD_HOOK_ID }}?trigger_title=Triggered+by+Github+Actions
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: npm install

- name: Lint Javascript
run: npx eslint docusaurus.config.js src/**/*.js --fix
run: npx eslint docusaurus.config.js --fix

- name: Lint CSS
run: npx stylelint '**/*.css'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ node_modules/
.docusaurus
.cache-loader

# Populated at build time
/community/minutes/*.md

# Misc
.DS_Store
.env.local
Expand Down
29 changes: 29 additions & 0 deletions bin/populate-minutes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail

HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

rm ${HERE}/../community/minutes/*.md || true
pushd $(mktemp -d)
curl -L https://github.com/conda-incubator/governance/archive/refs/heads/main.tar.gz -o governance.tar.gz
tar -C "${HERE}/../community/minutes" -xf governance.tar.gz --strip-components 3 "governance-main/meetings/archive/"
popd

pushd ${HERE}/../community/minutes
for f in *.md; do
# Rename files from YYYYMMDD_agenda_and_minutes.md to YYYY-MM-DD.md
mv "$f" "${f:0:4}-${f:4:2}-${f:6:2}.md"
done

# Fix some markdown issues
for f in 2020-08-24.md 2020-09-08.md 2020-09-22.md; do
sed -i.bak 's/]()/](#)/g' "$f"
rm "$f.bak"
done
sed -i.bak \
-e 's|](conda.org)|](https://conda.org)|g' \
-e 's|](github.org)|](https://github.org)|g' \
"2020-09-08.md"
rm 2020-09-08.md.bak

popd
8 changes: 8 additions & 0 deletions community/_sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// See https://docusaurus.io/docs/sidebar
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const fs = require("fs");
const sidebars = {
community: JSON.parse(fs.readFileSync(`${__dirname}/_sidebar.json`)),
};

export default sidebars;
18 changes: 18 additions & 0 deletions community/_sidebar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
"index",
"calendar",
{
"type": "category",
"label": "Meeting minutes",
"link": {
"type": "doc",
"id": "minutes"
},
"items": [
{
"type": "autogenerated",
"dirName": "minutes"
}
]
}
]
26 changes: 26 additions & 0 deletions community/minutes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Meeting minutes

We hold biweekly meetings every second Wednesday from 17:00-18:00 (UTC). Feel free to stop by!
Up-to-date invites are always available in the [calendar](/community/calendar).

We encourage contributors to join the meetings and learn more about and from the community.

## Setup

The minutes are recorded in the [`conda-incubator/governance`][governance-repo] repository.

We use a Github Actions [workflow][gha-workflow] to create an automated PR with the meeting notes
template for each session, which is automatically published to our [HackMD team][hackmd-team]
account. During the meeting, attendees will edit the HackMD document. After the meeting, the
document is saved and the PR is synced with the changes by adding the `sync-hackmd-notes` label.
Once satisfied, the PR is merged and the website will be updated with the new meeting notes.

[gha-workflow]: https://github.com/conda-incubator/governance/actions/workflows/meeting-notes.yml
[hackmd-team]: https://hackmd.io/@conda-community
[governance-repo]: https://github.com/conda-incubator/governance

## Minutes

import DocCardList from "@theme/DocCardList";

<DocCardList />
2 changes: 2 additions & 0 deletions community/minutes/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory is populated at build time by downloading all the minutes
from conda-incubator/governance. See `/bin/populate-minutes`. Do not edit manually.
15 changes: 13 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ const config = {
},
],

markdown: {
format: "detect",
},

presets: [
[
"classic",
Expand All @@ -43,7 +47,7 @@ const config = {
docs: {
path: "learn",
routeBasePath: "learn",
sidebarPath: require.resolve("./src/sidebars.js"),
sidebarPath: "./learn/_sidebar.js",
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/conda-incubator/conda-dot-org/tree/main",
Expand Down Expand Up @@ -197,7 +201,14 @@ const config = {
id: "community",
path: "community",
routeBasePath: "community",
sidebarPath: require.resolve("./src/sidebarsCommunity.js"),
sidebarPath: "./community/_sidebar.js",
async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) {
// This function takes the contents of sidebarPath, and will return
// only the entries that had to be autogenerated (i.e. meeting minutes)
// We reverse them and return them
var sidebarItems = await defaultSidebarItemsGenerator(args);
return sidebarItems.reverse();
},
},
],
],
Expand Down
8 changes: 8 additions & 0 deletions learn/_sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// See https://docusaurus.io/docs/sidebar
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const fs = require("fs");
const sidebars = {
community: JSON.parse(fs.readFileSync(`${__dirname}/_sidebar.json`)),
};

export default sidebars;
3 changes: 3 additions & 0 deletions learn/_sidebar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"faq"
]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"start": "./bin/populate-minutes && docusaurus start",
"build": "./bin/populate-minutes && docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
Expand Down
33 changes: 0 additions & 33 deletions src/sidebars.js

This file was deleted.

33 changes: 0 additions & 33 deletions src/sidebarsCommunity.js

This file was deleted.

Loading