From a1bac2d5f0f90ccc1b7183e621bf2991ccf84c43 Mon Sep 17 00:00:00 2001 From: Peter Mosses <18308236+pdmosses@users.noreply.github.com> Date: Sat, 5 Nov 2022 08:20:15 +0100 Subject: [PATCH] Update README.md (#1019) * Update README.md Major update: - Refer to `just-the-docs-template` for getting started. - Avoid duplication of details provided in the template README. - Distinguish between theme users and theme developers. - Augment the items for submitting code changes - Make the marked-up text easier to read and edit by using short-cut link references. (Not yet checked on GitHub.) * Restore docs for using JTD as a gem --- README.md | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6630170c..5b41bb29 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,28 @@ ## Installation -### via GitHub Pages remote theme +### Use the template -The quickiest way to use Just The Docs is to use GitHub pages [remote theme](https://blog.github.com/2017-11-29-use-any-theme-with-github-pages/) feature in your `_config.yml` file: +The [Just the Docs Template] provides the simplest, quickest, and easiest way to create a new website that uses the Just the Docs theme. To get started with creating a site, just click "[use the template]"! -```yaml -remote_theme: just-the-docs/just-the-docs -``` -### via RubyGems: +Note: To use the theme, you do ***not*** need to clone or fork the [Just the Docs repo]! You should do that only if you intend to browse the theme docs locally, contribute to the development of the theme, or develop a new theme based on Just the Docs. + +You can easily set the site created by the template to be published on [GitHub Pages] – the [template README] file explains how to do that, along with other details. + +If [Jekyll] is installed on your computer, you can also build and preview the created site *locally*. This lets you test changes before committing them, and avoids waiting for GitHub Pages.[^2] And you will be able to deploy your local build to a different platform than GitHub Pages. + +More specifically, the created site: -Alternatively you can install it as a Ruby Gem. +- uses a gem-based approach, i.e. uses a `Gemfile` and loads the `just-the-docs` gem +- uses the [GitHub Pages / Actions workflow] to build and publish the site on GitHub Pages -Add this line to your Jekyll site's Gemfile: +Other than that, you're free to customize sites that you create with the template, however you like. You can easily change the versions of `just-the-docs` and Jekyll it uses, as well as adding further plugins. + +### Use RubyGems + +Alternatively, you can install the theme as a Ruby Gem, without creating a new site. + +Add this line to your Jekyll site's `Gemfile`: ```ruby gem "just-the-docs" @@ -50,16 +60,19 @@ Alternatively, you can run it inside Docker while developing your site ## Usage -[View the documentation](https://just-the-docs.github.io/just-the-docs/) for usage information. +[View the documentation][Just the Docs] for usage information. ## Contributing -Bug reports and pull requests are welcome on GitHub at https://github.com/just-the-docs/just-the-docs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. +Bug reports, proposals of new features, and pull requests are welcome on GitHub at https://github.com/just-the-docs/just-the-docs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ### Submitting code changes: +- Submit an [Issue](https://github.com/just-the-docs/just-the-docs/issues) that motivates the changes, using the appropriate template +- Discuss the proposed changes with other users and the maintainers - Open a [Pull Request](https://github.com/just-the-docs/just-the-docs/pulls) - Ensure all CI tests pass +- Provide instructions to check the effect of the changes - Await code review ### Design and development principles of this theme: @@ -71,14 +84,25 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/just-t ## Development -To set up your environment to develop this theme, run `bundle install`. +To set up your environment to develop this theme: fork this repo, the run `bundle install` from the root directory. A modern [devcontainer configuration](https://code.visualstudio.com/docs/remote/containers) for VSCode is included. Your theme is set up just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal. -When the theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released. +When this theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be included in the gem. ## License The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). + +[^2]: [It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll#creating-your-site). + +[Jekyll]: https://jekyllrb.com +[Just the Docs Template]: https://just-the-docs.github.io/just-the-docs-template/ +[Just the Docs]: https://just-the-docs.github.io/just-the-docs/ +[Just the Docs repo]: https://github.com/just-the-docs/just-the-docs +[GitHub Pages]: https://pages.github.com/ +[Template README]: https://github.com/just-the-docs/just-the-docs-template/blob/main/README.md +[GitHub Pages / Actions workflow]: https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/ +[use the template]: https://github.com/just-the-docs/just-the-docs-template/generate -- GitLab