From d7424abed82d01b67aae935ccbc738fa9aacaf7e Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com> Date: Wed, 2 Apr 2025 15:20:53 +0800 Subject: [PATCH] docs: add sponsoring section to readme (#1620) * docs: add sponsoring section to readme * build: generate readme * docs: wording * docs: wording also mention contributors * docs: wording also mention contributors --- MAINTAINERS.md | 56 ++++++++++++++++++++++++++++ MAINTAINERS.typ | 4 +- README.md | 6 ++- docs/tinymist/introduction.typ | 6 ++- scripts/link-docs.mjs | 67 ++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+), 4 deletions(-) create mode 100644 MAINTAINERS.md diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 00000000..9e118afc --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,56 @@ + + +# Tinymist Maintainers + + +Tinymist [ˈtaɪni mɪst] is an integrated language service for [Typst](https://typst.app/) [taɪpst]. + +This page is generated from [./MAINTAINERS.typ](./MAINTAINERS.typ) and renders information of [maintainers](#maintainers) and [features.](#features) + +## Maintainers + +- [**Myriad-Dreamin**](https://github.com/Myriad-Dreamin) + - Email: camiyoru@gmail.com + - Maintains: *[Editor Integration](#editor-integration)*, *[Language Service](#language-service)*, *[Document Previewing](#document-previewing)*, *[VS Code Client-Side Support](#vs-code-client-side-support)*, and *[Nightly Releases](#nightly-releases)* + +- [**Enter-tainer**](https://github.com/Enter-tainer) + - Email: mgt@oi-wiki.org + - Maintains: *[Editor Integration](#editor-integration)*, *[Language Service](#language-service)*, *[Document Previewing](#document-previewing)*, and *[VS Code Client-Side Support](#vs-code-client-side-support)* + +- [**ParaN3xus**](https://github.com/ParaN3xus) + - Email: paran3xus007@gmail.com + - Maintains: *[Nightly Releases](#nightly-releases)* + +- [**Max397**](https://github.com/max397574) + - Email: undefined + - Maintains: *[Editor Integration](#editor-integration)* + +- [**Ericoolen**](https://github.com/Eric-Song-Nop) + - Email: EricYFSong@gmail.com + - Maintains: *[Language Service](#language-service)* + +- [**Caleb Maclennan**](https://github.com/alerque) + - Email: caleb@alerque.com + - Maintains: *[Editor Integration](#editor-integration)* + +- [**SylvanFranklin**](https://github.com/SylvanFranklin) + - Email: sylvanfranklin@icloud.com + - Maintains: *[Editor Integration](#editor-integration)*, and *[Document Previewing](#document-previewing)* + +## Features + +### Editor Integration + Integrate tinymist server with popular editors like VS Code, Neovim, etc. +- Scope: [`crates/tinymist/`](./crates/tinymist/), [`editors/`](./editors/) +### Language Service + Perform code analysis and provide language support for Typst. +- Scope: [`crates/tinymist/`](./crates/tinymist/), [`crates/tinymist-analysis/`](./crates/tinymist-analysis/), [`crates/tinymist-query/`](./crates/tinymist-query/) +### Document Previewing + Provide instant preview of the document being edited. +- Scope: [`crates/tinymist/`](./crates/tinymist/), [`crates/typst-preview/`](./crates/typst-preview/), [`contrib/typst-preview/`](./contrib/typst-preview/), [`tools/typst-dom/`](./tools/typst-dom/), [`tools/typst-preview-frontend/`](./tools/typst-preview-frontend/) +### VS Code Client-Side Support + Enrich the VS Code features with the client-side extension. +- Scope: [`crates/tinymist/`](./crates/tinymist/), [`editors/vscode/`](./editors/vscode/), [`tools/editor-tools/`](./tools/editor-tools/) +### Nightly Releases + Build and Publish nightly releases of tinymist. The nightly releases are built upon the main branches of both tinymist and typst. +- Scope: [`crates/tinymist/`](./crates/tinymist/), [`crates/typst-shim/`](./crates/typst-shim/) \ No newline at end of file diff --git a/MAINTAINERS.typ b/MAINTAINERS.typ index 019651ed..8cbb284f 100644 --- a/MAINTAINERS.typ +++ b/MAINTAINERS.typ @@ -71,7 +71,7 @@ Integrate tinymist server with popular editors like VS Code, Neovim, etc. ] - #language-service - - #scope("crates/tinymist/", "crates/tinymist-query/") + - #scope("crates/tinymist/", "crates/tinymist-analysis/", "crates/tinymist-query/") - #description[ Perform code analysis and provide language support for Typst. ] @@ -92,7 +92,7 @@ Enrich the VS Code features with the client-side extension. ] - #nightly-releases - - #scope("crates/tinymist/", "typst-shim/") + - #scope("crates/tinymist/", "crates/typst-shim/") - #description[ Build and Publish nightly releases of tinymist. The nightly releases are built upon the main branches of both tinymist and typst. ] diff --git a/README.md b/README.md index c425c43a..f163eac5 100644 --- a/README.md +++ b/README.md @@ -175,13 +175,17 @@ Tinymist is localized in multiple languages. You can contribute to the localizat ## Maintainers -Get list of maintainers from [MAINTAINERS.typ](https://github.com/Myriad-Dreamin/tinymist/blob/main/MAINTAINERS.typ). Or programmatically by `yarn maintainers` +Get list of maintainers from [Maintainers Page](https://github.com/Myriad-Dreamin/tinymist/blob/main/MAINTAINERS.md). Or programmatically by `yarn maintainers` > [!NOTE] > > You can add extra arguments for specific information. For example, `yarn maintainers --input="action=maintainers"`. +## Sponsoring + +Tinymist thrives on community love and remains proudly independent. While we don't accept direct project funding, we warmly welcome support for our maintainers' personal efforts. Please go to [Maintainers Page](https://github.com/Myriad-Dreamin/tinymist/blob/main/MAINTAINERS.md) and [Contributors Page](https://github.com/Myriad-Dreamin/tinymist/graphs/contributors) and find their personal pages for more information. It is also welcomed to directly ask questions about sponsoring on the [GitHub Issues](https://github.com/Myriad-Dreamin/tinymist/issues/new). + ## Acknowledgements - Partially code is inherited from [typst-lsp](https://github.com/nvarner/typst-lsp) diff --git a/docs/tinymist/introduction.typ b/docs/tinymist/introduction.typ index 541ef1d4..66cfa6e2 100644 --- a/docs/tinymist/introduction.typ +++ b/docs/tinymist/introduction.typ @@ -125,12 +125,16 @@ Tinymist is localized in multiple languages. You can contribute to the localizat == Maintainers -Get list of maintainers from #link("https://github.com/Myriad-Dreamin/tinymist/blob/main/MAINTAINERS.typ")[MAINTAINERS.typ]. Or programmatically by `yarn maintainers` +Get list of maintainers from #link("https://github.com/Myriad-Dreamin/tinymist/blob/main/MAINTAINERS.md")[Maintainers Page]. Or programmatically by `yarn maintainers` #note-box[ You can add extra arguments for specific information. For example, `yarn maintainers --input="action=maintainers"`. ] +== Sponsoring + +Tinymist thrives on community love and remains proudly independent. While we don't accept direct project funding, we warmly welcome support for our maintainers' personal efforts. Please go to #link("https://github.com/Myriad-Dreamin/tinymist/blob/main/MAINTAINERS.md")[Maintainers Page] and #link("https://github.com/Myriad-Dreamin/tinymist/graphs/contributors")[Contributors Page] and find their personal pages for more information. It is also welcomed to directly ask questions about sponsoring on the #link("https://github.com/Myriad-Dreamin/tinymist/issues/new")[GitHub Issues]. + == Acknowledgements - Partially code is inherited from #link("https://github.com/nvarner/typst-lsp")[typst-lsp] diff --git a/scripts/link-docs.mjs b/scripts/link-docs.mjs index c365ad36..49f7a1e7 100644 --- a/scripts/link-docs.mjs +++ b/scripts/link-docs.mjs @@ -63,6 +63,72 @@ const convert = async (inp, out, opts) => { await fs.promises.writeFile(output, outputContent); }; +// todo: generate me using typlite. +const maintainerMd = async () => { + const maintainers = JSON.parse(yarn(`--silent maintainers --input=action=maintainers`, "pipe")); + const features = JSON.parse(yarn(`--silent maintainers --input=action=features`, "pipe")); + + const output = []; + + output.push("\n"); + output.push("# Tinymist Maintainers\n\n"); + output.push( + "Tinymist [ˈtaɪni mɪst] is an integrated language service for [Typst](https://typst.app/) [taɪpst].", + ); + + output.push( + "\nThis page is generated from [./MAINTAINERS.typ](./MAINTAINERS.typ) and renders information of [maintainers](#maintainers) and [features.](#features)\n", + ); + + output.push("## Maintainers\n"); + + const italicIt = (it) => `*${it}*`; + const featureLink = (it) => { + const feature = features.find((f) => f.name === it); + if (feature) { + return `[${it}](#${it.replace(/\s+/g, "-").toLowerCase()})`; + } + return it; + }; + const fsPath = (it) => { + if (!fs.existsSync(it)) { + throw new Error(`Path ${it} does not exist!`); + } + return `[\`${it}\`](./${it})`; + }; + + for (const maintainer of maintainers) { + output.push(`- [**${maintainer["name"]}**](https://github.com/${maintainer["github-name"]})`); + output.push(` - Email: ${maintainer.email}`); + if (maintainer.maintains.length > 0) { + const rendered = maintainer.maintains.map(featureLink).map(italicIt); + if (rendered.length > 1) { + const last = rendered.pop(); + output.push(` - Maintains: ${rendered.join(", ")}, and ${last}`); + } else { + output.push(` - Maintains: ${rendered.join(", ")}`); + } + } + output.push(""); + } + + output.push("## Features\n"); + for (const feature of features) { + output.push(`### ${feature.name}`); + output.push(`${feature.description}`); + output.push(`- Scope: ${feature.scope.map(fsPath).join(", ")}`); + } + + const outPath = resolve(root, "MAINTAINERS.md"); + const outputContent = output.join("\n"); + if (dry) { + console.log(content); + return; + } + + await fs.promises.writeFile(outPath, outputContent); +}; + const main = async () => { await Promise.all([ convert("docs/tinymist/introduction.typ", "README.md", { @@ -89,6 +155,7 @@ const main = async () => { convert("docs/tinymist/frontend/zed.typ", "editors/zed/README.md", { before: "# Tinymist Zed Support for Typst\n\n", }), + maintainerMd(), ]); };