diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 8efd188..fd77ad0 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: Ask a question - url: https://github.com/pmarsceill/just-the-docs/discussions + url: https://github.com/just-the-docs/just-the-docs/discussions about: Ask questions and discuss with other community members diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index bdfde2a..6a1034e 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,33 +1,33 @@ references: - v+ - - master -name-template: 'v$RESOLVED_VERSION 🌈' -tag-template: 'v$RESOLVED_VERSION' + - main +name-template: "v$RESOLVED_VERSION 🌈" +tag-template: "v$RESOLVED_VERSION" categories: - - title: '🚀 Features' + - title: "🚀 Features" labels: - - 'feature' - - 'enhancement' - - title: '🐛 Bug Fixes' + - "feature" + - "enhancement" + - title: "🐛 Bug Fixes" labels: - - 'fix' - - 'bugfix' - - 'bug' - - title: '🧰 Maintenance' - label: - - 'chore' - - 'dependencies' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' + - "fix" + - "bugfix" + - "bug" + - title: "🧰 Maintenance" + label: + - "chore" + - "dependencies" +change-template: "- $TITLE @$AUTHOR (#$NUMBER)" version-resolver: major: labels: - - 'next-major-release' + - "next-major-release" minor: labels: - - 'next-minor-release' + - "next-minor-release" patch: labels: - - 'patch' + - "patch" default: minor template: | ## Changes diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 6d41eb5..4f970d4 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -1,45 +1,42 @@ -on: +on: push: branches: - - master + - main -name: Master branch CI +name: main branch CI jobs: - jekyll-latest: name: Build Jekyll site (latest) runs-on: ubuntu-latest steps: + - uses: actions/checkout@main - - uses: actions/checkout@master - - - name: Build the site in the jekyll/builder container - run: | - docker run --rm \ - --volume="${{ github.workspace }}:/srv/jekyll" \ - jekyll/builder:latest /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && bundle exec jekyll build && bundle exec rake search:init" + - name: Build the site in the jekyll/builder container + run: | + docker run --rm \ + --volume="${{ github.workspace }}:/srv/jekyll" \ + jekyll/builder:latest /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && bundle exec jekyll build && bundle exec rake search:init" jekyll-3-8-5: name: Build Jekyll site (v3.8.5) runs-on: ubuntu-latest steps: + - uses: actions/checkout@main - - uses: actions/checkout@master - - - name: Build the site in the jekyll/builder container - run: | - docker run --rm \ - --volume="${{ github.workspace }}:/srv/jekyll" \ - jekyll/builder:3.8.5 /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && bundle exec jekyll build && bundle exec rake search:init" + - name: Build the site in the jekyll/builder container + run: | + docker run --rm \ + --volume="${{ github.workspace }}:/srv/jekyll" \ + jekyll/builder:3.8.5 /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && bundle exec jekyll build && bundle exec rake search:init" assets: name: Format and test CSS and JS runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js 12.x - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - run: npm install - - run: npm test + - uses: actions/checkout@v2 + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: "12.x" + - run: npm install + - run: npm test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish-gem.yml similarity index 60% rename from .github/workflows/publish.yml rename to .github/workflows/publish-gem.yml index bba33db..3f1943e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish-gem.yml @@ -1,30 +1,31 @@ -name: Publish Gem +name: Publish Ruby Gem -on: [release] +on: + workflow_dispatch jobs: build: - name: Build + Publish + name: Publish runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Set up Ruby 2.6 uses: actions/setup-ruby@v1 with: - version: 2.6.x + ruby-version: 2.6.x - name: Publish to GPR run: | mkdir -p $HOME/.gem touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials - printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials - gem build just-the-docs.gemspec + printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build *.gemspec gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem env: - GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}} - OWNER: pmarsceill + GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" + OWNER: ${{ github.repository_owner }} - name: Publish to RubyGems run: | @@ -32,8 +33,7 @@ jobs: touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials - gem build just-the-docs.gemspec + gem build *.gemspec gem push *.gem env: - GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} - + GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" diff --git a/.prettierignore b/.prettierignore index 5dc073f..692aa34 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,3 +7,4 @@ assets/css/just-the-docs-dark.scss assets/js/vendor/lunr.min.js assets/js/search-data.json assets/js/just-the-docs.js +*.md diff --git a/.prettierrc b/.prettierrc index 284e842..70175ce 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,5 +4,4 @@ "singleQuote": false, "tabWidth": 2, "trailingComma": "es5" -} - +} \ No newline at end of file diff --git a/README.md b/README.md index 4d1c1e8..019a741 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@

- Gem version Build status + Gem version Build status



Just the Docs

A modern, highly customizable, and responsive Jekyll theme for documentation with built-in search.
Easily hosted on GitHub Pages with few dependencies.

-

See it in action!

+

See it in action!




@@ -13,6 +13,17 @@ ## Installation +### via GitHub Pages remote theme + +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: + +```yaml +remote_theme: just-the-docs/just-the-docs +``` +### via RubyGems: + +Alternatively you can install it as a Ruby Gem. + Add this line to your Jekyll site's Gemfile: ```ruby @@ -39,15 +50,15 @@ Alternatively, you can run it inside Docker while developing your site ## Usage -[View the documentation](https://pmarsceill.github.io/just-the-docs/) for usage information. +[View the documentation](https://just-the-docs.github.io/just-the-docs/) for usage information. ## Contributing -Bug reports and pull requests are welcome on GitHub at https://github.com/pmarsceill/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 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: -- Open a [Pull Request](https://github.com/pmarsceill/just-the-docs/pulls) +- Open a [Pull Request](https://github.com/just-the-docs/just-the-docs/pulls) - Ensure all CI tests pass - Await code review - Bump the version number in `just-the-docs.gemspec` and `package.json` according to [semantic versioning](https://semver.org/). diff --git a/_config.yml b/_config.yml index ad42809..dbe742f 100644 --- a/_config.yml +++ b/_config.yml @@ -16,7 +16,7 @@ title: Just the Docs description: A Jekyll theme for documentation baseurl: "/just-the-docs" # the subpath of your site, e.g. /blog -url: "https://pmarsceill.github.io" # the base hostname & protocol for your site, e.g. http://example.com +url: "https://just-the-docs.github.io" # the base hostname & protocol for your site, e.g. http://example.com permalink: pretty exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile" @@ -65,7 +65,7 @@ heading_anchors: true # Aux links for the upper right navigation aux_links: "Just the Docs on GitHub": - - "//github.com/pmarsceill/just-the-docs" + - "//github.com/just-the-docs/just-the-docs" # Makes Aux links open in a new tab. Default is false aux_links_new_tab: false @@ -81,7 +81,7 @@ nav_sort: case_sensitive # Capital letters sorted before lowercase back_to_top: true back_to_top_text: "Back to top" -footer_content: "Copyright © 2017-2020 Patrick Marsceill. Distributed by an MIT license." +footer_content: "Copyright © 2017-2020 Patrick Marsceill. Distributed by an MIT license." # Footer last edited timestamp last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter @@ -92,8 +92,8 @@ last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https:/ # Footer "Edit this page on GitHub" link text gh_edit_link: true # show or hide edit this page link gh_edit_link_text: "Edit this page on GitHub" -gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" # the github URL for your repo -gh_edit_branch: "master" # the branch that your docs is served from +gh_edit_repository: "https://github.com/just-the-docs/just-the-docs" # the github URL for your repo +gh_edit_branch: "main" # the branch that your docs is served from # gh_edit_source: docs # the source that your files originate from gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately diff --git a/_includes/footer_custom.html b/_includes/footer_custom.html new file mode 100644 index 0000000..64e08c2 --- /dev/null +++ b/_includes/footer_custom.html @@ -0,0 +1,3 @@ +{%- if site.footer_content -%} +

{{ site.footer_content }}

+{%- endif -%} diff --git a/_includes/header_custom.html b/_includes/header_custom.html new file mode 100644 index 0000000..e69de29 diff --git a/_includes/nav.html b/_includes/nav.html index 976dbbd..325a68c 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -1,6 +1,5 @@ diff --git a/_layouts/default.html b/_layouts/default.html index 442d44d..40d85ac 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -66,7 +66,7 @@ layout: table_wrappers {% endif %}
@@ -80,6 +80,7 @@ layout: table_wrappers
{% endif %} + {% include header_custom.html %} {% if site.aux_links %}