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.
-
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'
-
-
Then, in your Jekyll
_config.yml
file, add this:
theme: devdocs
- Do a
bundle install
to fetch the theme and install all dependencies.
Install node packages and ruby gems:
yarn
bundle install
Build and watch the changes:
yarn start
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.
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.
- 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
- 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"
- Run
rake update:theme
in your doc-site project to get the latest theme from local filesystem.
Clone this repository and create a feature branch. Add and test your changes, and then open a pull request to the master
branch.