devdocs-theme

devdocs-theme

A Jekyll theme for Adobe Commerce documentation sites.

DevDocs theme

A Jekyll theme for Adobe Commerce documentation sites at the *.magento.com domain. It uses npm to build SCSS and JavaScript files. The theme also includes basic layouts and HTML components.

How to apply the theme to your project

  1. In your project Gemfile, add this:

    gem 'devdocs', git: 'https://github.com/commerce-docs/devdocs-theme.git'
    
    • if you need to specify a branch:

      gem 'devdocs', git: 'https://github.com/commerce-docs/devdocs-theme.git', branch: 'master'
      
    • if you need to specify a commit:

      gem 'devdocs', git: 'https://github.com/commerce-docs/devdocs-theme.git', ref: 'dfsdfs'
      
  2. Then, in your Jekyll _config.yml file, add this:

theme: devdocs
  1. Do a bundle install to fetch the theme and install all dependencies.

Developing the theme

Install node packages and ruby gems:

yarn
bundle install

Build and watch the changes:

yarn start

Prerequisites

Version managers

Use version managers that support .nvmrc and .ruby-version files such as nvm and [rvm][https://rvm.io/] to be consistent with other developers in the project.

Global packages

Install browser-sync globally in your system if you want to run the serve and watch:all npm tasks.

yarn global add browser-sync

We do not add it to devDependencies because the current version (2.27.10) contains a high severity vulnerability.

Running the theme locally

  1. To work with the theme locally and test how it works with the DevDocs or other project that uses the theme, specify this theme as a local gem:
bundle config local.devdocs /path/to/theme/git/repository
  1. Now you can build your project locally, and it will look for the latest theme gem in your filesystem instead of GitHub. Just make sure that your project requires the same branch as your local theme branch:
gem 'devdocs', git: 'https://github.com/commerce-docs/devdocs-theme.git', branch: "your_branch_name"
  1. Run rake update:theme in your doc-site project to get the latest theme from local filesystem.

How to contribute

Clone this repository and create a feature branch. Add and test your changes, and then open a pull request to the master branch.

jekyll logo

Want a Jekyll website built?

Hire a Jekyll developer