diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml new file mode 100644 index 0000000000000000000000000000000000000000..4d868e7e3b53c3a41393a3aa4a40d56616da262a --- /dev/null +++ b/.github/workflows/ci-master.yml @@ -0,0 +1,45 @@ +on: + push: + branches: + - master + +name: CI + +jobs: + + jekyll-latest: + name: Build Jekyll site (latest) + runs-on: ubuntu-latest + steps: + + - 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 && jekyll build && bundle exec just-the-docs rake search:init" + jekyll-3-8-5: + name: Build Jekyll site (v3.8.5) + runs-on: ubuntu-latest + steps: + + - 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 && jekyll build && bundle exec just-the-docs 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 diff --git a/_config.yml b/_config.yml index 2ef1604761c323bdfbc515ea67816b81a872fbf4..ddaf13d06b7b8bade33a3360b8ab97b1b6acf6d1 100644 --- a/_config.yml +++ b/_config.yml @@ -38,6 +38,9 @@ aux_links: "Just the Docs on GitHub": - "//github.com/pmarsceill/just-the-docs" +# Makes Aux links open in a new tab. Default is false +aux_links_new_tab: false + # Sort order for navigation links nav_sort: case_insensitive # default, equivalent to nil # nav_sort: case_sensitive # Capital letters sorted before lowercase diff --git a/_layouts/default.html b/_layouts/default.html index ba551ad384b7a401b33615d68e610358b995f298..32d149ba5bb2fdcd293d258e73eba823c42d12d6 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -43,7 +43,15 @@ layout: table_wrappers {% if site.aux_links != nil %} <ul class="list-style-none text-small aux-nav"> {% for link in site.aux_links %} - <li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}"><a href="{{ link.last }}">{{ link.first }}</a></li> + <li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}"> + <a href="{{ link.last }}" + {% if site.aux_links_new_tab %} + target="_blank" rel="noopener noreferrer" + {% endif %} + > + {{ link.first }} + </a> + </li> {% endfor %} </ul> {% endif %} diff --git a/docs/configuration.md b/docs/configuration.md index f3a7a0235312bf67e782114488871a3639ba4b20..2367efbff76e4ccad829983bb52d5935ea0c6c56 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -47,6 +47,9 @@ search_tokenizer_separator: /[\s/]+/ aux_links: "Just the Docs on GitHub": - "//github.com/pmarsceill/just-the-docs" + +# Makes Aux links open in a new tab. Default is false +aux_links_new_tab: false ``` ## Heading anchor links