Git Product home page Git Product logo

docs.rubocop.org's Introduction

docs.rubocop.org

This repository contains RuboCop’s documentation site. It’s home to both the documentation of RuboCop itself, plus that of its core extensions (the ones maintained by RuboCop’s Core Team).

The site is generated from the AsciiDoc files in the docs folder of RuboCop’s GitHub repo (and the core RuboCop extensions like rubocop-rspec) and is published to https://docs.rubocop.org. Antora is used to convert the manual into HTML. The filesystem layout is described here.

You can find a list of all the documentation modules that are weaved together in the final site in antora-playbook.yml.

To make changes to the manual you simply have to change the files under docs in the relevant repository. The docs will be regenerated manually periodically.

Installing Antora

Installing the Antora is super simple:

$ npm i -g @antora/[email protected] @antora/[email protected]

Check out the detailed installation instructions if you run into any problems.

Building the Site

You can build the documentation locally from this repo.

$ cd docs.rubocop.org
$ antora --pull antora-playbook.yml
Tip
You can preview your changes by opening docs/index.html in your favorite browser.

Afterwards you can publish your changes like this:

$ git add docs
$ git commit -m 'Update site docs'
$ git push

You can also use the deploy script to publish changes in a single step:

$ ./deploy

It basically does antora --pull and git push.

Note
You’ll need commit access to the repository for this to work.

If you want to make changes to the manual’s page structure you’ll have to edit nav.adoc.

Updating the Playbook

When cutting new releases you’ll have to updated antora-playbook.yml to mention their relevant tags from which the documentation needs to be build. Here’s how this looks for one of the projects:

- url: https://github.com/rubocop-hq/rubocop-performance.git
  branches: master
  tags: ['v1.7.1', 'v1.8.1']
  start_path: docs
Tip
You need to add one such block for each new RuboCop module you’re adding to the docs site.

After releases of the main RuboCop gem you also need to update the default landing version (it should always be the latest version).

Troubleshooting

The most common mistake that people make is to forget to update the version of an Antora docs module after cutting a release. This will result in an error saying you’ve got the same version in two branches (e.g. master and v1.0). Fixing this is pretty simple - just update the version to master in antora.yml.

docs.rubocop.org's People

Contributors

bbatsov avatar koic avatar bquorning avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.