mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Update readmes
This commit is contained in:
parent
c40736ee0f
commit
c8af038bda
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,5 +1,5 @@
|
|||||||
- [ ] I solemnly swear that this is all original content of which I am the original author
|
- [ ] 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)
|
- [ ] 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)
|
- [ ] 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)
|
- [ ] 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)
|
||||||
|
@ -17,11 +17,10 @@ review them more effectively and/or individually.
|
|||||||
## Style Guidelines
|
## Style Guidelines
|
||||||
|
|
||||||
* **Keep lines under 80 chars**
|
* **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.
|
* Otherwise, the text will overflow and look odd.
|
||||||
* This and other potential pitfalls to format the content consistently are
|
* This and other potential pitfalls to format the content consistently are
|
||||||
identified by the freely available
|
identified by [markdownlint](https://github.com/markdownlint/markdownlint).
|
||||||
[markdownlint](https://github.com/markdownlint/markdownlint).
|
|
||||||
* **Prefer example to exposition**
|
* **Prefer example to exposition**
|
||||||
* Try to use as few words as possible.
|
* Try to use as few words as possible.
|
||||||
* Code examples are preferred over exposition in all cases.
|
* 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.
|
*tool* or *Algorithms & Data Structures*. Defaults to *language* if omitted.
|
||||||
* **filename**: The filename for this article's code. It will be fetched, mashed
|
* **filename**: The filename for this article's code. It will be fetched, mashed
|
||||||
together, and made downloadable.
|
together, and made downloadable.
|
||||||
* For non-English articles, *filename* should have a language-specific
|
* For non-English articles, *filename* will be used from the English article,
|
||||||
suffix.
|
unless you want to overwrite it for some reason.
|
||||||
* **lang**: For translations, the human language this article is in. For
|
|
||||||
categorization, mostly.
|
|
||||||
|
|
||||||
Here's an example header for an Esperanto translation of Ruby:
|
Here's an example header for Ruby:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
*--
|
*--
|
||||||
language: Ruby
|
language: Ruby
|
||||||
filename: learnruby-epo.ruby
|
filename: learnruby.rb
|
||||||
contributors:
|
contributors:
|
||||||
- ["Doktor Esperanto", "http://example.com/"]
|
- ["Doktor Esperanto", "http://example.com/"]
|
||||||
- ["Someone else", "http://someoneelseswebsite.com/"]
|
- ["Someone else", "http://someoneelseswebsite.com/"]
|
||||||
@ -77,8 +74,7 @@ contributors:
|
|||||||
|
|
||||||
### Syntax highlighter
|
### Syntax highlighter
|
||||||
|
|
||||||
[Pygments](https://pygments.org/languages/) is used for syntax highlighting through
|
[Pygments](https://pygments.org/languages/) is used for syntax highlighting.
|
||||||
[pygments.rb](https://github.com/pygments/pygments.rb).
|
|
||||||
|
|
||||||
### Should I add myself as a contributor?
|
### Should I add myself as a contributor?
|
||||||
|
|
||||||
@ -89,12 +85,10 @@ addition or not.
|
|||||||
|
|
||||||
## Building the site locally
|
## 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
|
```sh
|
||||||
brew install ruby
|
brew install python
|
||||||
# Install Ruby package manager
|
|
||||||
gem install bundler
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Then clone two repos, install dependencies and run.
|
Then clone two repos, install dependencies and run.
|
||||||
@ -107,8 +101,12 @@ git clone https://github.com/<YOUR-USERNAME>/learnxinyminutes-docs ./learnxinymi
|
|||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
cd learnxinyminutes-site
|
cd learnxinyminutes-site
|
||||||
bundle install
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
bundle exec middleman serve
|
python build.py
|
||||||
|
cd build
|
||||||
|
python -m http.server
|
||||||
|
|
||||||
|
# open http://localhost:8000/ in your browser of choice
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user