From c8af038bda23fbbbe9b10883d7f1589b7258404e Mon Sep 17 00:00:00 2001 From: Boris Verkhovskiy Date: Mon, 9 Dec 2024 03:38:02 -0700 Subject: [PATCH] Update readmes --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CONTRIBUTING.md | 32 +++++++++++++++----------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6a496409..81e8d993 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,5 @@ - [ ] I solemnly swear that this is all original content of which I am the original author -- [ ] Pull request title is prepended with `[language/lang-code]` (example `[python/fr-fr]` or `[java/en]`) +- [ ] Pull request title is prepended with `[language/lang-code]` (example `[python/fr]` or `[java/en]`) - [ ] Pull request touches only one file (or a set of logically related files with similar changes made) - [ ] Content changes are aimed at *intermediate to experienced programmers* (this is a poor format for explaining fundamental programming concepts) - [ ] If you've changed any part of the YAML Frontmatter, make sure it is formatted according to [CONTRIBUTING.md](https://github.com/adambard/learnxinyminutes-docs/blob/master/CONTRIBUTING.markdown) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f516487f..0547af2c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,11 +17,10 @@ review them more effectively and/or individually. ## Style Guidelines * **Keep lines under 80 chars** - * Try to keep **line length in code blocks to 80 characters or fewer**. + * Try to keep line length in code blocks to 80 characters or fewer. * Otherwise, the text will overflow and look odd. * This and other potential pitfalls to format the content consistently are - identified by the freely available - [markdownlint](https://github.com/markdownlint/markdownlint). + identified by [markdownlint](https://github.com/markdownlint/markdownlint). * **Prefer example to exposition** * Try to use as few words as possible. * Code examples are preferred over exposition in all cases. @@ -58,17 +57,15 @@ Other fields: *tool* or *Algorithms & Data Structures*. Defaults to *language* if omitted. * **filename**: The filename for this article's code. It will be fetched, mashed together, and made downloadable. - * For non-English articles, *filename* should have a language-specific - suffix. -* **lang**: For translations, the human language this article is in. For - categorization, mostly. + * For non-English articles, *filename* will be used from the English article, + unless you want to overwrite it for some reason. -Here's an example header for an Esperanto translation of Ruby: +Here's an example header for Ruby: ```yaml *-- language: Ruby -filename: learnruby-epo.ruby +filename: learnruby.rb contributors: - ["Doktor Esperanto", "http://example.com/"] - ["Someone else", "http://someoneelseswebsite.com/"] @@ -77,8 +74,7 @@ contributors: ### Syntax highlighter -[Pygments](https://pygments.org/languages/) is used for syntax highlighting through -[pygments.rb](https://github.com/pygments/pygments.rb). +[Pygments](https://pygments.org/languages/) is used for syntax highlighting. ### Should I add myself as a contributor? @@ -89,12 +85,10 @@ addition or not. ## Building the site locally -Install Ruby. On macOS this can be done with [Homebrew](https://brew.sh/). +Install Python. On macOS this can be done with [Homebrew](https://brew.sh/). ```sh -brew install ruby -# Install Ruby package manager -gem install bundler +brew install python ``` Then clone two repos, install dependencies and run. @@ -107,8 +101,12 @@ git clone https://github.com//learnxinyminutes-docs ./learnxinymi # Install dependencies cd learnxinyminutes-site -bundle install +pip install -r requirements.txt # Run -bundle exec middleman serve +python build.py +cd build +python -m http.server + +# open http://localhost:8000/ in your browser of choice ```