From 7668e109a733c8db019b34c8a36d3214c3419909 Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Mon, 5 Oct 2020 00:09:03 +0200 Subject: [PATCH 1/8] Contributor FAQ --- README.md | 3 + content/_includes/contribution_invitation.njk | 3 + .../docs-contributor-faq.md | 116 ++++++++++++++++++ .../index.md} | 0 4 files changed, 122 insertions(+) create mode 100644 content/improving-codeberg/docs-contributor-faq.md rename content/{improving-codeberg.md => improving-codeberg/index.md} (100%) diff --git a/README.md b/README.md index 416ecd5..170d8f2 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ a static website. Please have a look into it and consider to help writing the Documentation. This is still very much work-in-progress, the more useful material we collect, the better we can later present it! All contributions are very welcome! +For an introduction on contributing to Codeberg Documentation, please have a look +at [the Contributor FAQ](https://docs.codeberg.org/improving-codeberg/docs-contributor-faq) + ## Usage ### Local Development diff --git a/content/_includes/contribution_invitation.njk b/content/_includes/contribution_invitation.njk index 6bd7269..4a810ba 100644 --- a/content/_includes/contribution_invitation.njk +++ b/content/_includes/contribution_invitation.njk @@ -11,5 +11,8 @@ for example by Adding a pull request or joining in on the discussion in the issue tracker.

+

+ For an introduction on contributing to Codeberg Documentation, please have a look + at the Contributor FAQ. \ No newline at end of file diff --git a/content/improving-codeberg/docs-contributor-faq.md b/content/improving-codeberg/docs-contributor-faq.md new file mode 100644 index 0000000..812b9cb --- /dev/null +++ b/content/improving-codeberg/docs-contributor-faq.md @@ -0,0 +1,116 @@ +--- +eleventyNavigation: + key: DocsContributorFAQ + title: Documentation Contributor FAQ + parent: ImprovingCodeberg +--- + +We're very happy you're considering to contribute to Codeberg Documentation! + +The intent of this document is to give answers to a number of questions that might arise when starting to contribute to Codeberg Documentation. If your question is not listed, feel free to [ask in the issue tracker](https://codeberg.org/Codeberg/Documentation/issues). + +### How do I contribute to Codeberg Documentation? +To contribute to Codeberg Documentation, the first thing you should do (if you haven't already done it) is to create your own fork of the [Codeberg/Documentation repository](https://codeberg.org/Codeberg/Documentation). + +Then, for each major contribution that you want to make (e.g. for each new article), create a new branch, make your contributions and finally make a Pull Request to the Codeberg/Documentation repository. You can find the source code to all articles in the `content` directory of Codeberg +Documentation's source tree. + +The Codeberg Documentation collaborators will then review your pull request, they may request some changes and eventually, once all is good, they may merge your contribution into the official repository and deploy it to the live site. + +### How to create a new article? +To write a new article, create a new Markdown file next to the existing files in the section that you want to put your article in. So, if for example you want to create an article called "Keeping your repo clean with .gitignore" in the "Working with Git Repositories" section, put a new file called for example `gitignore.md` into the `content/git` directory. Please adhere to the [file naming conventions](#file-naming-conventions). + +Then, add the `eleventyNavigation` header to your newly created file. That header contains information about the article's place in the structure of the site. + +It can look like this: + +```yaml +--- +eleventyNavigation: + key: WhatIsCodeberg + title: What is Codeberg? + parent: GettingStarted + order: 10 +--- + +## Foo +Hello foo! + +## Bar +Hello bar! +``` + +Every section and article has a unique `key`. If `parent` is set to the `key` of another section, the current article will become a child of that other section. + +The other fields are `title` and `order`, where `title` is merely a display name and determines the menu entry label as well as the article's heading but has no other "technical" semantics and `order` is a number that can be used to enforce a specific order of articles (which is good for step-by-step guides such as Getting Started for example). + +So to create a new article, find the `key` of your desired parent section in its Markdown source code and use it as the `parent` for your new article. + +After the header is in place, you can now start writing your article in Markdown. It is recommended to add a blank line after the header's trailing three dashes. + +> Please do not repeat the article's title as a first-level heading in Markdown. It will added automatically when generating the final site. + +### Can I preview my article? +Yes, but currently only if you're working with a local clone of the repository. In that case, simply follow the instructions in the `README.md` file to set up and run a local preview. + +It is recommended to set this up, because it can help you a lot in spotting errors that would otherwise go unnoticed, especially aesthetic errors and broken links. + + + + +### How should files be named? +Please adhere to [Kebap-Case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles) naming rules for any files in Codeberg Documentation. + + +### When is my contribution being approved? +A Pull Request to Codeberg/Documentation will be reviewed by at least two other Codeberg Documentation collaborators and if both approve of your Pull Request, they will merge it into master. + +There are a number of exceptions to the rule above: +- For bugfixes and other small and non-controversial changes, the process is much simplified - here it is enough for one collaborator to green-light and merge the changes. If you're already a collaborator yourself, feel free to merge right away (after sufficient testing, that is). +- For changes that are critical, e.g. ones that might legally affect Codeberg e.V., the chairperson of Codeberg e.V. will need to approve of the changes as well + +### How to make screenshots for Codeberg Documentation? +Screenshots for Codeberg Documentation should follow the guidelines explained in +[Kesi Parker's excellent article](https://medium.com/technical-writing-is-easy/screenshots-in-documentation-27b45342aad8). + +On the technical side, screenshots should ideally be available in both the webP +and PNG formats (webP and JPEG for photographs), they should be in a large enough resolution so that text is clearly +readable and their filenames should follow Codeberg Documentation's [naming conventions](#file-naming-conventions). + +Please put screenshots under `assets/images/[section]/[article]/...` where `[section]` and `[article]` are the kebap-cased names of the section or your article, respectively. + +Codeberg Documentation uses the webP format wherever possible, in order to increase page loading speed and reduce traffic due to its powerful compression. + +To convert a screenshot to webP, you can use the `cwebp` command line utility like this: + +```bash +cwebp -lossless screenshot.png -o screenshot.webp +``` + +If you prefer a GUI, there a [a number of options](https://en.wikipedia.org/wiki/WebP#Graphics_software) available, but please be sure that your GUI doesn't add thumbnails into the WebP file, which would inflate its size, rendering its key advantage meaningless. + +> At the time of writing, there is no support for webP images in Safari browsers. +> As a workaround, all images (except SVG) in codeberg documentation are currently to be included using a `` tag, like so: +> +> ```html +> +> +> Issues List +> +> ``` + +### How to link to non-existing articles? / Draft Articles +While it is not directly possible to link to non-existing articles, it is possible to create Draft Articles, which are articles that cannot be localized for example via the menu, but which do exist under their URL and do show a message stating that the article is unpublished. + +Creating such a draft article can be done by creating a new article with the +`draft` property set to true, like this: + +```yaml +--- +eleventyNavigation: + key: DocsContributorFAQ + title: Documentation Contributor FAQ + parent: ImprovingCodeberg + draft: true +--- +``` \ No newline at end of file diff --git a/content/improving-codeberg.md b/content/improving-codeberg/index.md similarity index 100% rename from content/improving-codeberg.md rename to content/improving-codeberg/index.md From 17121e0a1b33c8f861a578c9d6f2198251f44995 Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Mon, 5 Oct 2020 00:43:55 +0200 Subject: [PATCH 2/8] Missing close tag --- content/_includes/contribution_invitation.njk | 1 + 1 file changed, 1 insertion(+) diff --git a/content/_includes/contribution_invitation.njk b/content/_includes/contribution_invitation.njk index 4a810ba..9329944 100644 --- a/content/_includes/contribution_invitation.njk +++ b/content/_includes/contribution_invitation.njk @@ -14,5 +14,6 @@

For an introduction on contributing to Codeberg Documentation, please have a look at the Contributor FAQ. +

\ No newline at end of file From eb219bde0aed35a323bc9b4fb84851d843f43f82 Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Mon, 5 Oct 2020 22:11:33 +0200 Subject: [PATCH 3/8] Corrected errors found in review by n --- content/improving-codeberg/docs-contributor-faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/improving-codeberg/docs-contributor-faq.md b/content/improving-codeberg/docs-contributor-faq.md index 812b9cb..52f9db1 100644 --- a/content/improving-codeberg/docs-contributor-faq.md +++ b/content/improving-codeberg/docs-contributor-faq.md @@ -59,7 +59,7 @@ It is recommended to set this up, because it can help you a lot in spotting erro ### How should files be named? -Please adhere to [Kebap-Case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles) naming rules for any files in Codeberg Documentation. +Please adhere to [b-Case](https://en.wikipedia.org/wiki/Kebab_case) naming rules for any files in Codeberg Documentation. ### When is my contribution being approved? @@ -77,7 +77,7 @@ On the technical side, screenshots should ideally be available in both the webP and PNG formats (webP and JPEG for photographs), they should be in a large enough resolution so that text is clearly readable and their filenames should follow Codeberg Documentation's [naming conventions](#file-naming-conventions). -Please put screenshots under `assets/images/[section]/[article]/...` where `[section]` and `[article]` are the kebap-cased names of the section or your article, respectively. +Please put screenshots under `assets/images/[section]/[article]/...` where `[section]` and `[article]` are the kebab-cased names of the section or your article, respectively. Codeberg Documentation uses the webP format wherever possible, in order to increase page loading speed and reduce traffic due to its powerful compression. From 611184c48e83047acb4fa9b04b9d1e78544144da Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Mon, 5 Oct 2020 22:12:33 +0200 Subject: [PATCH 4/8] Introduced typo while fixing typo - yikes! :) --- content/improving-codeberg/docs-contributor-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/improving-codeberg/docs-contributor-faq.md b/content/improving-codeberg/docs-contributor-faq.md index 52f9db1..c75a589 100644 --- a/content/improving-codeberg/docs-contributor-faq.md +++ b/content/improving-codeberg/docs-contributor-faq.md @@ -59,7 +59,7 @@ It is recommended to set this up, because it can help you a lot in spotting erro ### How should files be named? -Please adhere to [b-Case](https://en.wikipedia.org/wiki/Kebab_case) naming rules for any files in Codeberg Documentation. +Please adhere to [kebab-Case](https://en.wikipedia.org/wiki/Kebab_case) naming rules for any files in Codeberg Documentation. ### When is my contribution being approved? From c44e80d5ecf6891bd7b7e8605ec7c63d1605e280 Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Fri, 9 Oct 2020 14:12:44 +0200 Subject: [PATCH 5/8] Modifications based on @ivan-paleoi's comments --- content/improving-codeberg/docs-contributor-faq.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/improving-codeberg/docs-contributor-faq.md b/content/improving-codeberg/docs-contributor-faq.md index c75a589..6817b15 100644 --- a/content/improving-codeberg/docs-contributor-faq.md +++ b/content/improving-codeberg/docs-contributor-faq.md @@ -42,7 +42,10 @@ Hello bar! Every section and article has a unique `key`. If `parent` is set to the `key` of another section, the current article will become a child of that other section. -The other fields are `title` and `order`, where `title` is merely a display name and determines the menu entry label as well as the article's heading but has no other "technical" semantics and `order` is a number that can be used to enforce a specific order of articles (which is good for step-by-step guides such as Getting Started for example). +The other fields are `title` and `order`, where + +- `title` is merely a display name and determines the menu entry label as well as the article's heading but has no other "technical" semantics and +- `order` is a number that can be used to enforce a specific order of articles (which is good for step-by-step guides such as Getting Started for example). So to create a new article, find the `key` of your desired parent section in its Markdown source code and use it as the `parent` for your new article. @@ -51,7 +54,7 @@ After the header is in place, you can now start writing your article in Markdown > Please do not repeat the article's title as a first-level heading in Markdown. It will added automatically when generating the final site. ### Can I preview my article? -Yes, but currently only if you're working with a local clone of the repository. In that case, simply follow the instructions in the `README.md` file to set up and run a local preview. +Yes, but currently only if you're working with a local clone of the repository. In that case, simply follow the instructions in the [`README.md`](https://codeberg.org/codeberg/documentation/src/branch/master/README.md) file to set up and run a local preview. It is recommended to set this up, because it can help you a lot in spotting errors that would otherwise go unnoticed, especially aesthetic errors and broken links. From 6fad43db809b85bb941bd6f5b952d67e72e3ac4e Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Fri, 9 Oct 2020 14:31:56 +0200 Subject: [PATCH 6/8] Removing unnecessary linebreak --- content/improving-codeberg/docs-contributor-faq.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/improving-codeberg/docs-contributor-faq.md b/content/improving-codeberg/docs-contributor-faq.md index 6817b15..2d811f4 100644 --- a/content/improving-codeberg/docs-contributor-faq.md +++ b/content/improving-codeberg/docs-contributor-faq.md @@ -12,8 +12,7 @@ The intent of this document is to give answers to a number of questions that mig ### How do I contribute to Codeberg Documentation? To contribute to Codeberg Documentation, the first thing you should do (if you haven't already done it) is to create your own fork of the [Codeberg/Documentation repository](https://codeberg.org/Codeberg/Documentation). -Then, for each major contribution that you want to make (e.g. for each new article), create a new branch, make your contributions and finally make a Pull Request to the Codeberg/Documentation repository. You can find the source code to all articles in the `content` directory of Codeberg -Documentation's source tree. +Then, for each major contribution that you want to make (e.g. for each new article), create a new branch, make your contributions and finally make a Pull Request to the Codeberg/Documentation repository. You can find the source code to all articles in the `content` directory of Codeberg Documentation's source tree. The Codeberg Documentation collaborators will then review your pull request, they may request some changes and eventually, once all is good, they may merge your contribution into the official repository and deploy it to the live site. From 6b4ec4bcda2f735a62562ab88dfad629c21a824f Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Sun, 11 Oct 2020 13:51:19 +0200 Subject: [PATCH 7/8] Additional information about screenshots and example repos --- content/improving-codeberg/docs-contributor-faq.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/improving-codeberg/docs-contributor-faq.md b/content/improving-codeberg/docs-contributor-faq.md index 2d811f4..4961d28 100644 --- a/content/improving-codeberg/docs-contributor-faq.md +++ b/content/improving-codeberg/docs-contributor-faq.md @@ -71,10 +71,19 @@ There are a number of exceptions to the rule above: - For bugfixes and other small and non-controversial changes, the process is much simplified - here it is enough for one collaborator to green-light and merge the changes. If you're already a collaborator yourself, feel free to merge right away (after sufficient testing, that is). - For changes that are critical, e.g. ones that might legally affect Codeberg e.V., the chairperson of Codeberg e.V. will need to approve of the changes as well +### Where to create example repositories? +Please create example repositories for the Documentation in the `knut` organization on `codeberg-test.org`. + +If you do not have permissions for that, feel free to ask [in the issue tracker](https://codeberg.org/Codeberg/Documentation/issues). + ### How to make screenshots for Codeberg Documentation? Screenshots for Codeberg Documentation should follow the guidelines explained in [Kesi Parker's excellent article](https://medium.com/technical-writing-is-easy/screenshots-in-documentation-27b45342aad8). +They should be created using the "Knut" demo account on `codeberg-test.org`. If you're a regular, trusted contributor to Documentation, you can find its credentials in a private repository in the `knut` organization on `codeberg.org`. + +Otherwise, feel free to request screenshots being added when merging your PR. For that, please include `TODO SCREENSHOT [of foo]` in your article. + On the technical side, screenshots should ideally be available in both the webP and PNG formats (webP and JPEG for photographs), they should be in a large enough resolution so that text is clearly readable and their filenames should follow Codeberg Documentation's [naming conventions](#file-naming-conventions). From 86827a0a3f99cff6d2a69021c03e023ca3aa2895 Mon Sep 17 00:00:00 2001 From: Lucas Hinderberger Date: Fri, 16 Oct 2020 17:15:05 +0200 Subject: [PATCH 8/8] Fixed error spotted by @n --- content/improving-codeberg/docs-contributor-faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/improving-codeberg/docs-contributor-faq.md b/content/improving-codeberg/docs-contributor-faq.md index 4961d28..95b7fed 100644 --- a/content/improving-codeberg/docs-contributor-faq.md +++ b/content/improving-codeberg/docs-contributor-faq.md @@ -72,7 +72,7 @@ There are a number of exceptions to the rule above: - For changes that are critical, e.g. ones that might legally affect Codeberg e.V., the chairperson of Codeberg e.V. will need to approve of the changes as well ### Where to create example repositories? -Please create example repositories for the Documentation in the `knut` organization on `codeberg-test.org`. +Please create example repositories for the Documentation in the `knut` organization on `codeberg.org`. If you do not have permissions for that, feel free to ask [in the issue tracker](https://codeberg.org/Codeberg/Documentation/issues). @@ -124,4 +124,4 @@ eleventyNavigation: parent: ImprovingCodeberg draft: true --- -``` \ No newline at end of file +```