From bc9774561b5d2a634619758aec9e8f0e7d3709db Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 1 Apr 2020 18:11:30 +0530 Subject: [PATCH] Utilize relative_url filter in documentation site (#8089) Merge pull request 8089 --- docs/_docs/assets.md | 2 +- docs/_docs/collections.md | 4 ++-- docs/_docs/community/community.md | 12 ++++++------ docs/_docs/configuration.md | 16 ++++++++-------- docs/_docs/configuration/environments.md | 2 +- .../_docs/configuration/front-matter-defaults.md | 8 +++++--- docs/_docs/configuration/options.md | 7 ++++--- docs/_docs/contributing.md | 2 +- docs/_docs/datafiles.md | 4 ++-- docs/_docs/deployment.md | 6 +++--- docs/_docs/deployment/automated.md | 6 +++--- docs/_docs/front-matter.md | 11 ++++++----- docs/_docs/github-pages.md | 8 ++++---- docs/_docs/index.md | 10 +++++----- docs/_docs/installation.md | 8 ++++---- docs/_docs/installation/macos.md | 4 ++-- docs/_docs/installation/windows.md | 3 ++- docs/_docs/liquid.md | 4 ++-- docs/_docs/liquid/tags.md | 4 ++-- docs/_docs/plugins.md | 16 ++++++++-------- docs/_includes/docs_contents.html | 2 +- docs/_includes/docs_contents_mobile.html | 2 +- docs/_includes/footer.html | 4 ++-- docs/_includes/header.html | 4 ++-- docs/_includes/mobile-nav-items.html | 2 +- docs/_includes/news_contents.html | 10 +++++----- docs/_includes/news_contents_mobile.html | 4 ++-- docs/_includes/news_item.html | 2 +- docs/_includes/news_item_archive.html | 2 +- docs/_includes/primary-nav-items.html | 2 +- docs/_includes/section_nav_tutorials.html | 4 ++-- docs/_includes/top.html | 12 ++++++------ docs/_includes/tutorials_contents.html | 2 +- docs/_includes/tutorials_contents_mobile.html | 2 +- docs/_layouts/news_item.html | 2 +- docs/_tutorials/index.md | 2 +- docs/pages/404.html | 8 ++++---- docs/pages/index.html | 6 +++--- docs/pages/resources.md | 4 ++-- docs/pages/showcase.html | 4 ++-- 40 files changed, 111 insertions(+), 106 deletions(-) diff --git a/docs/_docs/assets.md b/docs/_docs/assets.md index ee4e698b..20904148 100644 --- a/docs/_docs/assets.md +++ b/docs/_docs/assets.md @@ -28,7 +28,7 @@ will process it and put it in your site's destination folder under
Jekyll processes all Liquid filters and tags in asset files

If you are using Mustache or another JavaScript templating language that conflicts with - the Liquid template syntax, you + the Liquid template syntax, you will need to place {% raw %} and {% endraw %} tags around your code.

diff --git a/docs/_docs/collections.md b/docs/_docs/collections.md index 4e591d3b..9e4ea995 100644 --- a/docs/_docs/collections.md +++ b/docs/_docs/collections.md @@ -51,7 +51,7 @@ information, see the section Output. Create a corresponding folder (e.g. `/_staff_members`) and add documents. Front matter is processed if the front matter exists, and everything after the front matter is pushed into the document's `content` attribute. If no front -matter is provided, Jekyll will consider it to be a [static file](/docs/static-files/) +matter is provided, Jekyll will consider it to be a [static file]({{ '/docs/static-files/' | relative_url }}) and the contents will not undergo further processing. If front matter is provided, Jekyll will process the file contents into the expected output. @@ -126,7 +126,7 @@ You can link to the generated page using the `url` attribute: ## Permalinks -There are special [permalink variables for collections](/docs/permalinks/) to +There are special [permalink variables for collections]({{ '/docs/permalinks/' | relative_url }}) to help you control the output url for the entire collection. ## Custom Sorting of Documents diff --git a/docs/_docs/community/community.md b/docs/_docs/community/community.md index 7176dfe5..273bff7c 100644 --- a/docs/_docs/community/community.md +++ b/docs/_docs/community/community.md @@ -8,13 +8,13 @@ redirect_from: "/help/index.html" As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. -Read the full [code of conduct](/docs/conduct/) +Read the full [code of conduct]({{ '/docs/conduct/' | relative_url }}) ## Where to get support If you're looking for support for Jekyll, there are a lot of options: -* Read the [Jekyll Documentation](https://jekyllrb.com/docs/) +* Read the [Jekyll Documentation]({{ '/docs/' | relative_url }}) * If you have a question about using Jekyll, start a discussion on the [Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll) * Chat with Jekyllers — Join our [Gitter channel](https://gitter.im/jekyll/jekyll) or our [IRC channel on Freenode](irc:irc.freenode.net/jekyll) @@ -24,13 +24,13 @@ There are a bunch of helpful community members on these services that should be ## Ways to contribute -* [How to Contribute](/docs/contributing/) -* [How to file a bug](/docs/community/bug/) -* [Guide for maintaining Jekyll](/docs/maintaining/) +* [How to Contribute]({{ '/docs/contributing/' | relative_url }}) +* [How to file a bug]({{ '/docs/community/bug/' | relative_url }}) +* [Guide for maintaining Jekyll]({{ '/docs/maintaining/' | relative_url }}) ## Jekyllconf -[Watch videos](/jekyllconf/) from members of the Jekyll community speak about interesting use cases, tricks they’ve learned or meta Jekyll topics. +[Watch videos]({{ '/jekyllconf/' | relative_url }}) from members of the Jekyll community speak about interesting use cases, tricks they’ve learned or meta Jekyll topics. ## Jekyll on Twitter diff --git a/docs/_docs/configuration.md b/docs/_docs/configuration.md index 1f7660cb..b542bd97 100644 --- a/docs/_docs/configuration.md +++ b/docs/_docs/configuration.md @@ -8,11 +8,11 @@ options can either be specified in a `_config.yml` or `_config.toml` file placed in your site’s root directory, or can be specified as flags for the `jekyll` executable in the terminal. -* [Configuration Options](/docs/configuration/options/) -* [Default Configuration](/docs/configuration/default/) -* [Front Matter Defaults](/docs/configuration/front-matter-defaults/) -* [Environments](/docs/configuration/environments/) -* [Markdown Options](/docs/configuration/markdown/) -* [Liquid Options](/docs/configuration/liquid/) -* [Webrick Options](/docs/configuration/webrick/) -* [Incremental Regeneration](/docs/configuration/incremental-regeneration/) +* [Configuration Options]({{ '/docs/configuration/options/' | relative_url }}) +* [Default Configuration]({{ '/docs/configuration/default/' | relative_url }}) +* [Front Matter Defaults]({{ '/docs/configuration/front-matter-defaults/' | relative_url }}) +* [Environments]({{ '/docs/configuration/environments/' | relative_url }}) +* [Markdown Options]({{ '/docs/configuration/markdown/' | relative_url }}) +* [Liquid Options]({{ '/docs/configuration/liquid/' | relative_url }}) +* [Webrick Options]({{ '/docs/configuration/webrick/' | relative_url }}) +* [Incremental Regeneration]({{ '/docs/configuration/incremental-regeneration/' | relative_url }}) diff --git a/docs/_docs/configuration/environments.md b/docs/_docs/configuration/environments.md index 95250cc8..6b06c84c 100644 --- a/docs/_docs/configuration/environments.md +++ b/docs/_docs/configuration/environments.md @@ -44,6 +44,6 @@ values in your configuration files when moving from one environment to another. {: .note} To switch part of your config settings depending on the environment, use the -build command option, +build command option, for example --config _config.yml,_config_development.yml. Settings in later files override settings in earlier files. diff --git a/docs/_docs/configuration/front-matter-defaults.md b/docs/_docs/configuration/front-matter-defaults.md index 2f19954e..5f7355e1 100644 --- a/docs/_docs/configuration/front-matter-defaults.md +++ b/docs/_docs/configuration/front-matter-defaults.md @@ -30,7 +30,7 @@ defaults: during automatic regeneration are not loaded until the next execution.

- Note Data Files are included and reloaded during automatic regeneration. + Note Data Files are included and reloaded during automatic regeneration.

@@ -68,7 +68,9 @@ defaults: author: "Mr. Hyde" ``` -With these defaults, all pages would use the `my-site` layout. Any html files that exist in the `projects/` folder will use the `project` layout, if it exists. Those files will also have the `page.author` [liquid variable](/docs/variables/) set to `Mr. Hyde`. +With these defaults, all pages would use the `my-site` layout. Any html files that exist in the `projects/` +folder will use the `project` layout, if it exists. Those files will also have the `page.author` +[liquid variable]({{ '/docs/variables/' | relative_url }}) set to `Mr. Hyde`. ```yaml collections: @@ -85,7 +87,7 @@ defaults: ``` In this example, the `layout` is set to `default` inside the -[collection](/docs/collections/) with the name `my_collection`. +[collection]({{ '/docs/collections/' | relative_url }}) with the name `my_collection`. ### Glob patterns in Front Matter defaults diff --git a/docs/_docs/configuration/options.md b/docs/_docs/configuration/options.md index 1a5e96f0..90bfaff1 100644 --- a/docs/_docs/configuration/options.md +++ b/docs/_docs/configuration/options.md @@ -150,12 +150,12 @@ class="flag">flags (specified on the command-line) that control them.

Defaults

- Set defaults for front matter + Set defaults for front matter variables.

-

see below

+

see below

@@ -247,7 +247,8 @@ class="flag">flags (specified on the command-line) that control them.

LSI

-

Produce an index for related posts. Requires the classifier-reborn plugin.

+

Produce an index for related posts. Requires the + classifier-reborn plugin.

lsi: BOOL

diff --git a/docs/_docs/contributing.md b/docs/_docs/contributing.md index d22dc861..b1a5b7d2 100644 --- a/docs/_docs/contributing.md +++ b/docs/_docs/contributing.md @@ -8,7 +8,7 @@ Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is a ## Where to get help or report a problem -See the [support guidelines](https://jekyllrb.com/docs/support/) +See the [support guidelines]({{ '/docs/support/' | relative_url }}) ## Ways to contribute diff --git a/docs/_docs/datafiles.md b/docs/_docs/datafiles.md index 9a9961c7..7050512c 100644 --- a/docs/_docs/datafiles.md +++ b/docs/_docs/datafiles.md @@ -3,7 +3,7 @@ title: Data Files permalink: /docs/datafiles/ --- -In addition to the [built-in variables](../variables/) available from Jekyll, +In addition to the [built-in variables]({{'/docs/variables/' | relative_url }}) available from Jekyll, you can specify your own custom data that can be accessed via the [Liquid templating system](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers). @@ -147,4 +147,4 @@ author: dave ``` {% endraw %} -For information on how to build robust navigation for your site (especially if you have a documentation website or another type of Jekyll site with a lot of pages to organize), see [Navigation](/tutorials/navigation). +For information on how to build robust navigation for your site (especially if you have a documentation website or another type of Jekyll site with a lot of pages to organize), see [Navigation]({{ '/tutorials/navigation/' | relative_url }}). diff --git a/docs/_docs/deployment.md b/docs/_docs/deployment.md index d6e841c0..45722e4e 100644 --- a/docs/_docs/deployment.md +++ b/docs/_docs/deployment.md @@ -6,6 +6,6 @@ redirect_from: "/docs/deployment-methods/index.html" Sites built using Jekyll can be deployed in a large number of ways due to the static nature of the generated output. Here's some of the most common ways: -* [Manually](/docs/deployment/manual/) -* [Automated](/docs/deployment/automated/) -* [Third Party](/docs/deployment/third-party/) +* [Manually]({{ '/docs/deployment/manual/' | relative_url }}) +* [Automated]({{ '/docs/deployment/automated/' | relative_url }}) +* [Third Party]({{ '/docs/deployment/third-party/' | relative_url }}) diff --git a/docs/_docs/deployment/automated.md b/docs/_docs/deployment/automated.md index 0e68e90f..ac6ac49b 100644 --- a/docs/_docs/deployment/automated.md +++ b/docs/_docs/deployment/automated.md @@ -15,9 +15,9 @@ service of your choice. We have guides for the following providers: -* [Travis CI](/docs/continuous-integration/travis-ci/) -* [CircleCI](/docs/continuous-integration/circleci/) -* [Buddy](/docs/continuous-integration/buddyworks/) +* [Travis CI]({{ '/docs/continuous-integration/travis-ci/' | relative_url }}) +* [CircleCI]({{ '/docs/continuous-integration/circleci/' | relative_url }}) +* [Buddy]({{ '/docs/continuous-integration/buddyworks/' | relative_url }}) ## Git post-receive hook diff --git a/docs/_docs/front-matter.md b/docs/_docs/front-matter.md index a3deb697..f7700bb8 100644 --- a/docs/_docs/front-matter.md +++ b/docs/_docs/front-matter.md @@ -28,14 +28,14 @@ relies on. If you use UTF-8 encoding, make sure that no BOM header characters exist in your files or very, very bad things will happen to Jekyll. This is especially relevant if you’re running - Jekyll on Windows. + Jekyll on Windows.

Front Matter Variables Are Optional

- If you want to use Liquid tags and variables + If you want to use Liquid tags and variables but don’t need anything in your front matter, just leave it empty! The set of triple-dashed lines with nothing in between will still get Jekyll to process your file. (This is useful for things like CSS and RSS feeds!) @@ -72,7 +72,7 @@ front matter of a page or post.

  • Using null will produce a file without using a layout file. This is overridden if the file is a post/document and has a - layout defined in the + layout defined in the front matter defaults.
  • @@ -117,7 +117,7 @@ front matter of a page or post.
    Render Posts Marked As Unpublished

    To preview unpublished pages, run `jekyll serve` or `jekyll build` - with the `--unpublished` switch. Jekyll also has a handy drafts + with the `--unpublished` switch. Jekyll also has a handy drafts feature tailored specifically for blog posts.

  • @@ -204,7 +204,8 @@ These are available out-of-the-box to be used in the front matter for a post.
    Don't repeat yourself

    If you don't want to repeat your frequently used front matter variables - over and over, define defaults + over and over, define + defaults for them and only override them where necessary (or not at all). This works both for predefined and custom variables.

    diff --git a/docs/_docs/github-pages.md b/docs/_docs/github-pages.md index 3aed957d..5f51e9da 100644 --- a/docs/_docs/github-pages.md +++ b/docs/_docs/github-pages.md @@ -58,12 +58,12 @@ Be sure to run `bundle update` often. Sometimes it's nice to preview your Jekyll site before you push your `gh-pages` branch to GitHub. The subdirectory-like URL structure GitHub uses for Project Pages complicates the proper resolution of URLs. In order to assure your -site builds properly, use the handy [URL filters](/docs/liquid/filters/): +site builds properly, use the handy [URL filters]({{ '/docs/liquid/filters/' | relative_url }}): {% raw %} ```liquid - + [{{ page.title }}]("{{ page.url | relative_url }}") ``` @@ -122,7 +122,7 @@ to see more detailed examples.
    Source files must be in the root directory

    GitHub Pages overrides - the “Site Source” + the “Site Source” configuration value, so if you locate your files anywhere other than the root directory, your site may not build correctly.

    @@ -135,6 +135,6 @@ to see more detailed examples. While Windows is not officially supported, it is possible to install the github-pages gem on Windows. Special instructions can be found on our - Windows-specific docs page. + Windows-specific docs page.

    diff --git a/docs/_docs/index.md b/docs/_docs/index.md index e46da606..ab373c91 100644 --- a/docs/_docs/index.md +++ b/docs/_docs/index.md @@ -13,12 +13,12 @@ site, and more. ## Prerequisites -See [requirements](/docs/installation/#requirements). +See [requirements]({{ '/docs/installation/#requirements' | relative_url }}). ## Instructions -1. Install a full [Ruby development environment](/docs/installation/). -2. Install Jekyll and [bundler](/docs/ruby-101/#bundler) [gems](/docs/ruby-101/#gems). +1. Install a full [Ruby development environment]({{ '/docs/installation/' | relative_url }}). +2. Install Jekyll and [bundler]({{ '/docs/ruby-101/#bundler' | relative_url }}) [gems]({{ '/docs/ruby-101/#gems' | relative_url }}). ``` gem install jekyll bundler ``` @@ -37,6 +37,6 @@ bundle exec jekyll serve 6. Browse to [http://localhost:4000](http://localhost:4000){:target="_blank"} If you encounter any errors during this process, see the -[troubleshooting](/docs/troubleshooting/#configuration-problems) page. Also, +[troubleshooting]({{ '/docs/troubleshooting/#configuration-problems' | relative_url }}) page. Also, make sure you've installed the development headers and other prerequisites as -mentioned on the [requirements](/docs/installation/#requirements) page. +mentioned on the [requirements]({{ '/docs/installation/#requirements' | relative_url }}) page. diff --git a/docs/_docs/installation.md b/docs/_docs/installation.md index 70c25174..76cf4288 100644 --- a/docs/_docs/installation.md +++ b/docs/_docs/installation.md @@ -16,7 +16,7 @@ Jekyll is a [Ruby Gem](/docs/ruby-101/#gems) that can be installed on most syste For detailed install instructions have a look at the guide for your operating system. -* [macOS](/docs/installation/macos/) -* [Ubuntu Linux](/docs/installation/ubuntu/) -* [Other Linux distros](/docs/installation/other-linux) -* [Windows](/docs/installation/windows/) \ No newline at end of file +* [macOS]({{ '/docs/installation/macos/' | relative_url }}) +* [Ubuntu Linux]({{ '/docs/installation/ubuntu/' | relative_url }}) +* [Other Linux distros]({{ '/docs/installation/other-linux/' | relative_url }}) +* [Windows]({{ '/docs/installation/windows/' | relative_url }}) \ No newline at end of file diff --git a/docs/_docs/installation/macos.md b/docs/_docs/installation/macos.md index 836c8e77..162c6f09 100644 --- a/docs/_docs/installation/macos.md +++ b/docs/_docs/installation/macos.md @@ -77,7 +77,7 @@ That's it! Head over [rbenv command references](https://github.com/rbenv/rbenv#c ## Install Jekyll -Now all that is left is installing [Bundler](/docs/ruby-101/#bundler) and Jekyll. +Now all that is left is installing [Bundler]({{ '/docs/ruby-101/#bundler' | relative_url }}) and Jekyll. ### Local Install @@ -133,4 +133,4 @@ sudo gem install bundler jekyll ## Problems? -Check out the [troubleshooting](/docs/troubleshooting/) page or [ask for help on our forum](https://talk.jekyllrb.com). +Check out the [troubleshooting]({{ '/docs/troubleshooting/' | relative_url }}) page or [ask for help on our forum](https://talk.jekyllrb.com). diff --git a/docs/_docs/installation/windows.md b/docs/_docs/installation/windows.md index e564edde..f3a5160b 100644 --- a/docs/_docs/installation/windows.md +++ b/docs/_docs/installation/windows.md @@ -87,7 +87,8 @@ with the current date in the filename.
    Non-superuser account issues

    If the `jekyll new` command prints the error "Your user account isn't allowed to install to the system RubyGems", see - the "Running Jekyll as Non-Superuser" instructions in Troubleshooting.

    + the "Running Jekyll as Non-Superuser" instructions in + Troubleshooting.

    {: .note .info} diff --git a/docs/_docs/liquid.md b/docs/_docs/liquid.md index d09ba99b..9dead2b8 100644 --- a/docs/_docs/liquid.md +++ b/docs/_docs/liquid.md @@ -15,5 +15,5 @@ out the [official Liquid Documentation](https://shopify.github.io/liquid/). Jekyll provides a number of useful Liquid additions to help you build your site: -* [Filters](/docs/liquid/filters/) -* [Tags](/docs/liquid/tags/) +* [Filters]({{ '/docs/liquid/filters/' | relative_url }}) +* [Tags]({{ '/docs/liquid/tags/' | relative_url }}) diff --git a/docs/_docs/liquid/tags.md b/docs/_docs/liquid/tags.md index a813cd9c..c21f7a01 100644 --- a/docs/_docs/liquid/tags.md +++ b/docs/_docs/liquid/tags.md @@ -5,12 +5,12 @@ permalink: "/docs/liquid/tags/" All of the standard Liquid [tags](https://shopify.github.io/liquid/tags/control-flow/) are supported. Jekyll has a few built in tags to help you build your site. You can also create -your own tags using [plugins](/docs/plugins/). +your own tags using [plugins]({{ '/docs/plugins/' | relative_url }}). ## Includes If you have page snippets that you use repeatedly across your site, an -[include](/docs/includes/) is the perfect way to make this more maintainable. +[include]({{ '/docs/includes/' | relative_url }}) is the perfect way to make this more maintainable. ## Code snippet highlighting diff --git a/docs/_docs/plugins.md b/docs/_docs/plugins.md index b53ed8d6..79a30d3c 100644 --- a/docs/_docs/plugins.md +++ b/docs/_docs/plugins.md @@ -7,11 +7,11 @@ Jekyll has a plugin system with hooks that allow you to create custom generated content specific to your site. You can run custom code for your site without having to modify the Jekyll source itself. -* [Installation](/docs/plugins/installation/) - How to install plugins -* [Your first plugin](/docs/plugins/your-first-plugin/) - How to write plugins -* [Generators](/docs/plugins/generators/) - Create additional content on your site -* [Converters](/docs/plugins/converters/) - Change a markup language into another format -* [Commands](/docs/plugins/commands/) - Extend the `jekyll` executable with subcommands -* [Tags](/docs/plugins/tags) - Create custom Liquid tags -* [Filters](/docs/plugins/filters/) - Create custom Liquid filters -* [Hooks](/docs/plugins/hooks/) - Fine-grained control to extend the build process +* [Installation]({{ '/docs/plugins/installation/' | relative_url }}) - How to install plugins +* [Your first plugin]({{ '/docs/plugins/your-first-plugin/' | relative_url }}) - How to write plugins +* [Generators]({{ '/docs/plugins/generators/' | relative_url }}) - Create additional content on your site +* [Converters]({{ '/docs/plugins/converters/' | relative_url }}) - Change a markup language into another format +* [Commands]({{ '/docs/plugins/commands/' | relative_url }}) - Extend the `jekyll` executable with subcommands +* [Tags]({{ '/docs/plugins/tags/' | relative_url }}) - Create custom Liquid tags +* [Filters]({{ '/docs/plugins/filters/' | relative_url }}) - Create custom Liquid filters +* [Hooks]({{ '/docs/plugins/hooks/' | relative_url }}) - Fine-grained control to extend the build process diff --git a/docs/_includes/docs_contents.html b/docs/_includes/docs_contents.html index 4c004fe2..f46df08f 100644 --- a/docs/_includes/docs_contents.html +++ b/docs/_includes/docs_contents.html @@ -5,7 +5,7 @@ diff --git a/docs/_includes/section_nav_tutorials.html b/docs/_includes/section_nav_tutorials.html index 8d665f51..7a684b64 100644 --- a/docs/_includes/section_nav_tutorials.html +++ b/docs/_includes/section_nav_tutorials.html @@ -20,7 +20,7 @@ next, lets build a link to it. {% else -%} {% assign previous = forloop.index0 | minus: 1 -%} {% assign previous_page = tutorials[previous] | prepend:"/tutorials/" | append:"/" -%} - + {% endif -%}
    @@ -29,7 +29,7 @@ next, lets build a link to it. {% else -%} {% assign next = forloop.index0 | plus: 1 -%} {% assign next_page = tutorials[next] | prepend:"/tutorials/" | append:"/" -%} - + {% endif -%}
    diff --git a/docs/_includes/top.html b/docs/_includes/top.html index 0cce753f..c0e203c3 100644 --- a/docs/_includes/top.html +++ b/docs/_includes/top.html @@ -4,13 +4,13 @@ {% feed_meta %} - + - - - - - + + + + + {% seo %}