mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Documentation maintenance
- Lowercased Filter-Reference.md and Scraper-Reference.md - Updated absolute to relative links - Updated list of maintainers - Updated amount of required reviews on PR's (2 to 1) - Added an extra step to the Adding Docs page regarding the about page
This commit is contained in:
parent
94803a4fa9
commit
55924ae8b4
7 changed files with 17 additions and 12 deletions
|
@ -6,3 +6,6 @@ indent_style = space
|
|||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
|
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
|
@ -24,7 +24,7 @@ Want to contribute? Great. Please review the following guidelines carefully and
|
|||
## Requesting new features
|
||||
|
||||
1. Search for similar feature requests; someone may have already requested it.
|
||||
2. Make sure your feature fits DevDocs's [vision](https://github.com/freeCodeCamp/devdocs/blob/master/README.md#vision).
|
||||
2. Make sure your feature fits DevDocs's [vision](../README.md#vision).
|
||||
3. Provide a clear and detailed explanation of the feature and why it's important to add it.
|
||||
|
||||
## Requesting new documentations
|
||||
|
|
|
@ -89,7 +89,7 @@ These modifications are applied via a set of filters using the [HTML::Pipeline](
|
|||
|
||||
The end result is a set of normalized HTML partials and two JSON files (index + offline data). Because the index files are loaded separately by the [app](#app) following the user's preferences, the scraper also creates a JSON manifest file containing information about the documentations currently available on the system (such as their name, version, update date, etc.).
|
||||
|
||||
More information about [scrapers](https://github.com/freeCodeCamp/devdocs/blob/master/docs/Scraper-Reference.md) and [filters](https://github.com/freeCodeCamp/devdocs/blob/master/docs/Filter-Reference.md) is available in the `docs` folder.
|
||||
More information about [scrapers](./docs/scraper-reference.md) and [filters](./docs/filter-reference.md) is available in the `docs` folder.
|
||||
|
||||
## Available Commands
|
||||
|
||||
|
@ -129,7 +129,7 @@ If multiple versions of Ruby are installed on your system, commands must be run
|
|||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome. Please read the [contributing guidelines](https://github.com/freeCodeCamp/devdocs/blob/master/.github/CONTRIBUTING.md).
|
||||
Contributions are welcome. Please read the [contributing guidelines](./.github/CONTRIBUTING.md).
|
||||
|
||||
## Documentation
|
||||
|
||||
|
@ -162,7 +162,7 @@ Contributions are welcome. Please read the [contributing guidelines](https://git
|
|||
|
||||
Copyright 2013-2019 Thibaut Courouble and [other contributors](https://github.com/freeCodeCamp/devdocs/graphs/contributors)
|
||||
|
||||
This software is licensed under the terms of the Mozilla Public License v2.0. See the [COPYRIGHT](https://github.com/freeCodeCamp/devdocs/blob/master/COPYRIGHT) and [LICENSE](https://github.com/freeCodeCamp/devdocs/blob/master/LICENSE) files.
|
||||
This software is licensed under the terms of the Mozilla Public License v2.0. See the [COPYRIGHT](./COPYRIGHT) and [LICENSE](./LICENSE) files.
|
||||
|
||||
Please do not use the name DevDocs to endorse or promote products derived from this software without the maintainers' permission, except as may be necessary to comply with the notice/attribution requirements.
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
Adding a documentation may look like a daunting task but once you get the hang of it, it's actually quite simple. Don't hesitate to ask for help [in Gitter](https://gitter.im/FreeCodeCamp/DevDocs) if you ever get stuck.
|
||||
|
||||
**Note:** please read the [contributing guidelines](https://github.com/Thibaut/devdocs/blob/master/.github/CONTRIBUTING.md) before submitting a new documentation.
|
||||
**Note:** please read the [contributing guidelines](../.github/CONTRIBUTING.md) before submitting a new documentation.
|
||||
|
||||
1. Create a subclass of `Docs::UrlScraper` or `Docs::FileScraper` in the `lib/docs/scrapers/` directory. Its name should be the [PascalCase](http://api.rubyonrails.org/classes/String.html#method-i-camelize) equivalent of the filename (e.g. `my_doc` → `MyDoc`)
|
||||
2. Add the appropriate class attributes and filter options (see the [Scraper Reference](./Scraper-Reference.md) page).
|
||||
2. Add the appropriate class attributes and filter options (see the [Scraper Reference](./scraper-reference.md) page).
|
||||
3. Check that the scraper is listed in `thor docs:list`.
|
||||
4. Create filters specific to the scraper in the `lib/docs/filters/[my_doc]/` directory and add them to the class's [filter stacks](./scraper-reference.md#filter-stacks). You may create any number of filters but will need at least the following two:
|
||||
* A [`CleanHtml`](./filter-reference.md#cleanhtmlfilter) filter whose task is to clean the HTML markup (e.g. adding `id` attributes to headings) and remove everything superfluous and/or nonessential.
|
||||
|
@ -13,9 +13,10 @@ Adding a documentation may look like a daunting task but once you get the hang o
|
|||
6. Generate the full documentation using the `thor docs:generate [my_doc] --force` command. Additionally, you can use the `--verbose` option to see which files are being created/updated/deleted (useful to see what changed since the last run), and the `--debug` option to see which URLs are being requested and added to the queue (useful to pin down which page adds unwanted URLs to the queue).
|
||||
7. Start the server, open the app, enable the documentation, and see how everything plays out.
|
||||
8. Tweak the scraper/filters and repeat 5) and 6) until the pages and metadata are ok.
|
||||
9. To customize the pages' styling, create an SCSS file in the `assets/stylesheets/pages/` directory and import it in both `application.css.scss` AND `application-dark.css.scss`. Both the file and CSS class should be named `_[type]` where [type] is equal to the scraper's `type` attribute (documentations with the same type share the same custom CSS and JS). _(Note: feel free to submit a pull request without custom CSS/JS)_
|
||||
9. To customize the pages' styling, create an SCSS file in the `assets/stylesheets/pages/` directory and import it in both `application.css.scss` AND `application-dark.css.scss`. Both the file and CSS class should be named `_[type]` where [type] is equal to the scraper's `type` attribute (documentations with the same type share the same custom CSS and JS). Setting the type to `simple` will apply the general styling rules in `assets/stylesheets/pages/_simple.scss`, which can be used for documentations where little to no CSS changes are needed.
|
||||
10. To add syntax highlighting or execute custom JavaScript on the pages, create a file in the `assets/javascripts/views/pages/` directory (take a look at the other files to see how it works).
|
||||
11. Add the documentation's icon in the `public/icons/docs/[my_doc]/` directory, in both 16x16 and 32x32-pixels formats. It'll be added to the icon sprite after your pull request is merged.
|
||||
11. Add the documentation's icon in the `public/icons/docs/[my_doc]/` directory, in both 16x16 and 32x32-pixels formats. It'll be added to the icon spritesheet after your pull request is merged.
|
||||
12. Add the documentation's copyright details to the list in `assets/javascripts/templates/pages/about_tmpl.coffee`. This is the data shown in the table on the [about](https://devdocs.io/about) page, and is ordered alphabetically. Simply copying an existing item, placing it in the right slot and updating the values to match the new scraper will do the job.
|
||||
|
||||
If the documentation includes more than a few hundreds pages and is available for download, try to scrape it locally (e.g. using `FileScraper`). It'll make the development process much faster and avoids putting too much load on the source site. (It's not a problem if your scraper is coupled to your local setup, just explain how it works in your pull request.)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ This document is intended for [DevDocs maintainers](#list-of-maintainers).
|
|||
|
||||
## Merging pull requests
|
||||
|
||||
- Unless the change is trivial or in an area that you are familiar with, PRs should be approved by at least two maintainers before being merged.
|
||||
- PRs should be approved by at least one maintainer before being merged.
|
||||
|
||||
- PRs that add or update documentations should always be merged locally, and the app deployed, before the merge is pushed to GitHub.
|
||||
|
||||
|
@ -94,9 +94,10 @@ If this is your first deploy, make sure another maintainer is around to assist.
|
|||
|
||||
## List of maintainers
|
||||
|
||||
- [Beau Carnes](https://github.com/beaucarnes)
|
||||
- [Jed Fox](https://github.com/j-f1)
|
||||
- [Jasper van Merle](https://github.com/jmerle)
|
||||
- [Ahmad Abdolsaheb](https://github.com/ahmadabdolsaheb)
|
||||
- [Mrugesh Mohapatra](https://github.com/raisedadead)
|
||||
- [Thibaut Courouble](https://github.com/thibaut)
|
||||
|
||||
Interested in helping maintain DevDocs? Come talk to us on [Gitter](https://gitter.im/FreeCodeCamp/DevDocs) :)
|
||||
|
|
Loading…
Reference in a new issue