pax_global_header00006660000000000000000000000064143603325640014520gustar00rootroot0000000000000052 comment=9f05f8524cd974fc151d0d960ae3ad2e4935d3c6 jekyll-relative-links-0.7.0/000077500000000000000000000000001436033256400157455ustar00rootroot00000000000000jekyll-relative-links-0.7.0/.github/000077500000000000000000000000001436033256400173055ustar00rootroot00000000000000jekyll-relative-links-0.7.0/.github/CODEOWNERS000066400000000000000000000002461436033256400207020ustar00rootroot00000000000000# Require @benbalter's :+1: for changes to the .github repo-config files # mainly due to https://github.com/probot/settings privilege escalation .github/* @benbalter jekyll-relative-links-0.7.0/.github/ISSUE_TEMPLATE/000077500000000000000000000000001436033256400214705ustar00rootroot00000000000000jekyll-relative-links-0.7.0/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000010071436033256400241600ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve --- ### Describe the bug A clear and concise description of what the bug is. ### Steps to reproduce the behavior 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error ### Expected behavior A clear and concise description of what you expected to happen. ### Screenshots If applicable, add screenshots to help explain your problem. ### Additional context Add any other context about the problem here. jekyll-relative-links-0.7.0/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000011541436033256400252160ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project --- ### Is your feature request related to a problem? Please describe the problem you're trying to solve. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] ### Describe the solution you'd like A clear and concise description of what you want to happen. ### Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. ### Additional context Add any other context or screenshots about the feature request here. jekyll-relative-links-0.7.0/.github/config.yml000066400000000000000000000035061436033256400213010ustar00rootroot00000000000000# Behaviorbot config. See https://github.com/behaviorbot/ for more information. # Note: Please Don't edit this file directly. # Edit https://github.com/benbalter/shared-community-files instead. # Configuration for update-docs - https://github.com/behaviorbot/update-docs updateDocsComment: "Thanks for the pull request! If you are making any changes to the user-facing functionality, please be sure to update the documentation in the `README` or `docs/` folder alongside your change. :heart:" # Configuration for request-info - https://github.com/behaviorbot/request-info requestInfoReplyComment: Thanks for this. Do you mind providing a bit more information about what problem you're trying to solve? requestInfoLabelToAdd: more-information-needed # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome #newIssueWelcomeComment: > # Welcome! # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome newPRWelcomeComment: Welcome! Congrats on your first pull request to Jekyll Relative Links. If you haven't already, please be sure to check out [the contributing guidelines](https://github.com/benbalter/jekyll-relative-links/blob/master/docs/CONTRIBUTING.md). # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge firstPRMergeComment: "Congrats on getting your first pull request to Jekyll Relative Links merged! Without amazing humans like you submitting pull requests, we couldn’t run this project. You rock! :tada:

If you're interested in tackling another bug or feature, take a look at [the open issues](https://github.com/benbalter/jekyll-relative-links/issues), especially those [labeled `help wanted`](https://github.com/benbalter/jekyll-relative-links/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)." # Bug workaround contact_links: [] jekyll-relative-links-0.7.0/.github/dependabot.yml000066400000000000000000000002541436033256400221360ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: bundler directory: "/" schedule: interval: daily time: "10:00" timezone: US/Eastern open-pull-requests-limit: 99 jekyll-relative-links-0.7.0/.github/funding.yml000066400000000000000000000000231436033256400214550ustar00rootroot00000000000000patreon: benbalter jekyll-relative-links-0.7.0/.github/no-response.yml000066400000000000000000000014631436033256400223040ustar00rootroot00000000000000# Configuration for probot-no-response - https://github.com/probot/no-response # Note: Please Don't edit this file directly. # Edit https://github.com/benbalter/shared-community-files instead. # Number of days of inactivity before an Issue is closed for lack of response daysUntilClose: 14 # Label requiring a response responseRequiredLabel: more-information-needed # Comment to post when closing an Issue for lack of response. Set to `false` to disable closeComment: > This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. jekyll-relative-links-0.7.0/.github/release-drafter.yml000066400000000000000000000000541436033256400230740ustar00rootroot00000000000000template: | ## What's Changed $CHANGES jekyll-relative-links-0.7.0/.github/settings.yml000066400000000000000000000015101436033256400216650ustar00rootroot00000000000000# Repository settings set via https://github.com/probot/settings # Note: Please Don't edit this file directly. # Edit https://github.com/benbalter/shared-community-files instead. repository: has_issues: true has_wiki: false has_projects: false has_downloads: false labels: - name: help wanted oldname: help-wanted color: 0e8a16 - name: more-information-needed color: d93f0b - name: bug color: b60205 - name: feature color: 1d76db - name: good first issue color: "5319e7" # Not currently implemented by probot/settings, but manually implemented in script/deploy branch_protection: restrictions: null enforce_admins: false required_status_checks: strict: true contexts: - "continuous-integration/travis-ci" required_pull_request_reviews: require_code_owner_reviews: true jekyll-relative-links-0.7.0/.github/stale.yml000066400000000000000000000017121436033256400211410ustar00rootroot00000000000000# Configuration for probot-stale - https://github.com/probot/stale # Note: Please Don't edit this file directly. # Edit https://github.com/benbalter/shared-community-files instead. # Number of days of inactivity before an Issue or Pull Request becomes stale daysUntilStale: 60 # Number of days of inactivity before a stale Issue or Pull Request is closed daysUntilClose: 7 # Issues or Pull Requests with these labels will never be considered stale exemptLabels: - pinned - security # Label to use when marking as stale staleLabel: wontfix # Comment to post when marking as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable closeComment: false # Limit to only `issues` or `pulls` # only: issues jekyll-relative-links-0.7.0/.github/workflows/000077500000000000000000000000001436033256400213425ustar00rootroot00000000000000jekyll-relative-links-0.7.0/.github/workflows/ci.yml000066400000000000000000000010571436033256400224630ustar00rootroot00000000000000name: CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest strategy: matrix: ruby-version: ['2.7', '3.0'] jekyll-version: ["~> 3.0", "~> 4.0"] steps: - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true env: JEKYLL_VERSION: ${{ matrix.jekyll-version }} - name: Run tests run: script/cibuild jekyll-relative-links-0.7.0/.github/workflows/codeql-analysis.yml000066400000000000000000000044331436033256400251610ustar00rootroot00000000000000# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your repository. Please check # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # name: "CodeQL" on: push: branches: [ main ] pull_request: # The branches below must be a subset of the branches above branches: [ main ] schedule: - cron: '29 0 * * 6' jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: [ 'ruby' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - name: Checkout repository uses: actions/checkout@v2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v1 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language #- run: | # make bootstrap # make release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 jekyll-relative-links-0.7.0/.gitignore000066400000000000000000000001521436033256400177330ustar00rootroot00000000000000/_site /tmp /spec/examples.txt vendor/bundle .bundle /Gemfile.lock *.gem spec/fixtures/site/.jekyll-cache/jekyll-relative-links-0.7.0/.rspec000066400000000000000000000000361436033256400170610ustar00rootroot00000000000000--color --require spec_helper jekyll-relative-links-0.7.0/.rubocop.yml000066400000000000000000000003771436033256400202260ustar00rootroot00000000000000inherit_from: .rubocop_todo.yml require: - rubocop-jekyll - rubocop-performance - rubocop-rspec inherit_gem: rubocop-jekyll: .rubocop.yml AllCops: Exclude: - vendor/**/* NewCops: enable Metrics/BlockLength: Exclude: - spec/**/* jekyll-relative-links-0.7.0/.rubocop_todo.yml000066400000000000000000000037761436033256400212610ustar00rootroot00000000000000# This configuration was generated by # `rubocop --auto-gen-config` # on 2021-09-16 19:13:45 UTC using RuboCop version 1.18.4. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. # Offense count: 1 # Configuration parameters: Include. # Include: **/*.gemspec Gemspec/RequiredRubyVersion: Exclude: - 'jekyll-relative-links.gemspec' # Offense count: 1 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes. Metrics/AbcSize: Max: 24 # Offense count: 1 # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers. # SupportedStyles: snake_case, normalcase, non_integer # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339 Naming/VariableNumber: Exclude: - 'spec/jekyll-relative-links/generator_spec.rb' # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: SafeMultiline. Performance/DeletePrefix: Exclude: - 'lib/jekyll-relative-links/generator.rb' # Offense count: 14 # Configuration parameters: Prefixes. # Prefixes: when, with, without RSpec/ContextWording: Exclude: - 'spec/jekyll-relative-links/generator_spec.rb' # Offense count: 2 # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. # Include: **/*_spec*rb*, **/spec/**/* RSpec/FilePath: Exclude: - 'spec/jekyll-relative-links/context_spec.rb' - 'spec/jekyll-relative-links/generator_spec.rb' # Offense count: 4 RSpec/MultipleExpectations: Max: 2 # Offense count: 17 # Configuration parameters: AllowSubject. RSpec/MultipleMemoizedHelpers: Max: 13 # Offense count: 10 # Configuration parameters: IgnoreSharedExamples. RSpec/NamedSubject: Exclude: - 'spec/jekyll-relative-links/context_spec.rb' - 'spec/jekyll-relative-links/generator_spec.rb' # Offense count: 6 RSpec/NestedGroups: Max: 5 jekyll-relative-links-0.7.0/Gemfile000066400000000000000000000002041436033256400172340ustar00rootroot00000000000000# frozen_string_literal: true source "https://rubygems.org" gemspec gem "jekyll", ENV["JEKYLL_VERSION"] if ENV["JEKYLL_VERSION"] jekyll-relative-links-0.7.0/LICENSE.md000066400000000000000000000020531436033256400173510ustar00rootroot00000000000000MIT License Copyright (c) 2016 Ben Balter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. jekyll-relative-links-0.7.0/README.md000066400000000000000000000050171436033256400172270ustar00rootroot00000000000000# Jekyll Relative Links [![CI](https://github.com/benbalter/jekyll-relative-links/actions/workflows/ci.yml/badge.svg)](https://github.com/benbalter/jekyll-relative-links/actions/workflows/ci.yml) A Jekyll plugin to convert relative links to Markdown files to their rendered equivalents. ## What it does Let's say you have a link like this in a Markdown file: ``` [foo](bar.md) ``` While that would render as a valid link on GitHub.com, it would not be a valid link on Pages. Instead, this plugin converts that link to: ``` [foo](bar.html) ``` It even work with pages with custom permalinks. If you have `bar.md` with the following: ``` --- permalink: /bar/ --- # bar ``` Then `[foo](bar.md)` will render as `[foo](/bar/)`. The default Jekyll's configuration `permalink: pretty` in the `_config.yaml` file removes the `.html` extensions from the generated links. ## Why Because Markdown files rendered by GitHub Pages should behave similar to Markdown files rendered on GitHub.com ## Usage 1. Add the following to your site's Gemfile: ```ruby gem 'jekyll-relative-links' ``` 2. Add the following to your site's config file: ```yml plugins: - jekyll-relative-links ``` Note: If you are using a Jekyll version less than 3.5.0, use the `gems` key instead of `plugins`. ## Configuration You can configure this plugin in `_config.yml` under the `relative_links` key. This is optional and defaults to: ```yml relative_links: enabled: true collections: false ``` ### Excluding files To exclude specific directories and/or files: ```yml relative_links: exclude: - directory - file.md ``` ### Processing Collections Setting the `collections` option to `true` enables relative links from collection items (including posts). Assuming this structure ~~~ ├── _my_collection │ ├── some_doc.md │ └── some_subdir │ └── another_doc.md ├── _config.yml └── index.md ~~~ the following will work: File | Link -|- `index.md` | `[Some Doc](_my_collection/some_doc.md)` `index.md` | `[Another Doc](_my_collection/some_subdir/another_doc.md)` `_my_collection/some_doc.md` | `[Index](../index.md)` `_my_collection/some_doc.md` | `[Another Doc](some_subdir/another_doc.md)` `_my_collection/some_subdir/another_doc.md` | `[Index](../../index.md)` `_my_collection/some_subdir/another_doc.md` | `[Some Doc](../some_doc.md)` ### Disabling Even if the plugin is enabled (e.g., via the `:jekyll_plugins` group in your Gemfile) you can disable it by setting the `enabled` key to `false`. jekyll-relative-links-0.7.0/docs/000077500000000000000000000000001436033256400166755ustar00rootroot00000000000000jekyll-relative-links-0.7.0/docs/CODE_OF_CONDUCT.md000066400000000000000000000062131436033256400214760ustar00rootroot00000000000000# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at ben@balter.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ jekyll-relative-links-0.7.0/docs/CONTRIBUTING.md000066400000000000000000000133301436033256400211260ustar00rootroot00000000000000# Contributing to Jekyll Relative Links Hi there! We're thrilled that you'd like to contribute to Jekyll Relative Links. Your help is essential for keeping it great. Jekyll Relative Links is an open source project supported by the efforts of an entire community and built one contribution at a time by users like you. We'd love for you to get involved. Whatever your level of skill or however much time you can give, your contribution is greatly appreciated. There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests, helping other users by commenting on issues, or writing code which can be incorporated into Jekyll Relative Links itself. Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests. ## How to report a bug Think you found a bug? Please check [the list of open issues](https://github.com/benbalter/jekyll-relative-links/issues) to see if your bug has already been reported. If it hasn't please [submit a new issue](https://github.com/benbalter/jekyll-relative-links/issues/new). Here are a few tips for writing *great* bug reports: * Describe the specific problem (e.g., "widget doesn't turn clockwise" versus "getting an error") * Include the steps to reproduce the bug, what you expected to happen, and what happened instead * Check that you are using the latest version of the project and its dependencies * Include what version of the project your using, as well as any relevant dependencies * Only include one bug per issue. If you have discovered two bugs, please file two issues * Include screenshots or screencasts whenever possible * Even if you don't know how to fix the bug, including a failing test may help others track it down **If you find a security vulnerability, do not open an issue. Please email ben@balter.com instead.** ## How to suggest a feature or enhancement If you find yourself wishing for a feature that doesn't exist in Jekyll Relative Links, you are probably not alone. There are bound to be others out there with similar needs. Many of the features that Jekyll Relative Links has today have been added because our users saw the need. Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and goals of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible, including describing the problem you're trying to solve. [Open an issue](https://github.com/benbalter/jekyll-relative-links/issues/new) which describes the feature you would like to see, why you want it, how it should work, etc. ## Your first contribution We'd love for you to contribute to the project. Unsure where to begin contributing to Jekyll Relative Links? You can start by looking through these "good first issue" and "help wanted" issues: * [Good first issues](https://github.com/benbalter/jekyll-relative-links/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - issues which should only require a few lines of code and a test or two * [Help wanted issues](https://github.com/benbalter/jekyll-relative-links/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) - issues which may be a bit more involved, but are specifically seeking community contributions *p.s. Feel free to ask for help; everyone is a beginner at first* :smiley_cat: ## How to propose changes Here's a few general guidelines for proposing changes: * If you are changing any user-facing functionality, please be sure to update the documentation * If you are adding a new behavior or changing an existing behavior, please be sure to update the corresponding test(s) * Each pull request should implement **one** feature or bug fix. If you want to add or fix more than one thing, submit more than one pull request * Do not commit changes to files that are irrelevant to your feature or bug fix * Don't bump the version number in your pull request (it will be bumped prior to release) * Write [a good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) At a high level, [the process for proposing changes](https://guides.github.com/introduction/flow/) is: 1. [Fork](https://github.com/benbalter/jekyll-relative-links/fork) and clone the project 2. Configure and install the dependencies: `script/bootstrap` 3. Make sure the tests pass on your machine: `script/cibuild` 4. Create a descriptively named branch: `git checkout -b my-branch-name` 5. Make your change, add tests and documentation, and make sure the tests still pass 6. Push to your fork and [submit a pull request](https://github.com/benbalter/jekyll-relative-links/compare) describing your change 7. Pat your self on the back and wait for your pull request to be reviewed and merged **Interesting in submitting your first Pull Request?** It's easy! You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) ## Bootstrapping your local development environment `script/bootstrap` ## Running tests `script/cibuild` ## Code of conduct This project is governed by [the Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. ## Additional Resources * [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/) * [Using Pull Requests](https://help.github.com/articles/using-pull-requests/) * [GitHub Help](https://help.github.com) jekyll-relative-links-0.7.0/docs/SECURITY.md000066400000000000000000000001551436033256400204670ustar00rootroot00000000000000# Security Policy To report a security vulnerability, please email [ben@balter.com](mailto:ben@balter.com). jekyll-relative-links-0.7.0/jekyll-relative-links.gemspec000066400000000000000000000020751436033256400235370ustar00rootroot00000000000000# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path("lib", __dir__) require "jekyll-relative-links/version" Gem::Specification.new do |s| s.name = "jekyll-relative-links" s.version = JekyllRelativeLinks::VERSION s.authors = ["Ben Balter"] s.email = ["ben.balter@github.com"] s.homepage = "https://github.com/benbalter/jekyll-relative-links" s.summary = "A Jekyll plugin to convert relative links to markdown files " \ "to their rendered equivalents.\n" s.files = `git ls-files app lib`.split("\n") s.platform = Gem::Platform::RUBY s.require_paths = ["lib"] s.license = "MIT" s.add_dependency "jekyll", ">= 3.3", "< 5.0" s.add_development_dependency "kramdown-parser-gfm", "~> 1.0" s.add_development_dependency "rspec", "~> 3.5" s.add_development_dependency "rubocop", "~> 1.0" s.add_development_dependency "rubocop-jekyll", "~> 0.10" s.add_development_dependency "rubocop-performance", "~> 1.5" s.add_development_dependency "rubocop-rspec", "~> 2.0" end jekyll-relative-links-0.7.0/lib/000077500000000000000000000000001436033256400165135ustar00rootroot00000000000000jekyll-relative-links-0.7.0/lib/jekyll-relative-links.rb000066400000000000000000000002641436033256400232630ustar00rootroot00000000000000# frozen_string_literal: true require "jekyll" require_relative "jekyll-relative-links/generator" require_relative "jekyll-relative-links/context" module JekyllRelativeLinks end jekyll-relative-links-0.7.0/lib/jekyll-relative-links/000077500000000000000000000000001436033256400227345ustar00rootroot00000000000000jekyll-relative-links-0.7.0/lib/jekyll-relative-links/context.rb000066400000000000000000000003221436033256400247420ustar00rootroot00000000000000# frozen_string_literal: true module JekyllRelativeLinks class Context attr_reader :site def initialize(site) @site = site end def registers { :site => site } end end end jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb000066400000000000000000000122031436033256400252450ustar00rootroot00000000000000# frozen_string_literal: true module JekyllRelativeLinks class Generator < Jekyll::Generator attr_accessor :site, :config # Use Jekyll's native relative_url filter include Jekyll::Filters::URLFilters LINK_TEXT_REGEX = %r!(.*?)!.freeze FRAGMENT_REGEX = %r!(#.+?|)?!.freeze TITLE_REGEX = %r{(\s+"(?:\\"|[^"])*(? e raise e unless e.to_s.start_with?("invalid byte sequence in UTF-8") end private # Stores info on a Markdown Link (avoid rubocop's Metrics/ParameterLists warning) Link = Struct.new(:link_type, :text, :path, :fragment, :title) def link_parts(matches) last_inline = 5 link_type = matches[2] ? :inline : :reference link_text = matches[link_type == :inline ? 2 : last_inline + 1] relative_path = matches[link_type == :inline ? 3 : last_inline + 2] fragment = matches[link_type == :inline ? 4 : last_inline + 3] title = matches[link_type == :inline ? 5 : last_inline + 4] Link.new(link_type, link_text, relative_path, fragment, title) end def context @context ||= JekyllRelativeLinks::Context.new(site) end def markdown_extension?(extension) markdown_converter.matches(extension) end def markdown_converter @markdown_converter ||= site.find_converter_instance(CONVERTER_CLASS) end def url_for_path(path) path = CGI.unescape(path) target = potential_targets.find { |p| p.relative_path.sub(%r!\A/!, "") == path } relative_url(target.url) if target&.url end def potential_targets @potential_targets ||= site.pages + site.static_files + site.docs_to_write end def path_from_root(relative_path, url_base) is_absolute = relative_path.start_with? "/" relative_path.sub!(%r!\A/!, "") base = is_absolute ? "" : url_base absolute_path = File.expand_path(relative_path, base) absolute_path.sub(%r!\A#{Regexp.escape(Dir.pwd)}/!, "") end # @param link [Link] A Link object describing the markdown link to make def replacement_text(link) link.path << link.fragment if link.fragment if link.link_type == :inline "[#{link.text}](#{link.path}#{link.title})" else "\n[#{link.text}]: #{link.path}#{link.title}" end end def absolute_url?(string) return unless string Addressable::URI.parse(string).absolute? rescue Addressable::URI::InvalidURIError nil end def fragment?(string) string&.start_with?("#") end def replaceable_link?(string) !fragment?(string) && !absolute_url?(string) end def option(key) config[CONFIG_KEY] && config[CONFIG_KEY][key] end def disabled? option(ENABLED_KEY) == false end def collections? option(COLLECTIONS_KEY) == true end def excluded?(document) return false unless option("exclude") entry_filter = if document.respond_to?(:collection) document.collection.entry_filter else global_entry_filter end entry_filter.glob_include?(option("exclude"), document.relative_path).tap do |excluded| Jekyll.logger.debug(LOG_KEY, "excluded #{document.relative_path}") if excluded end end def global_entry_filter @global_entry_filter ||= Jekyll::EntryFilter.new(site) end def replace_relative_links_excerpt!(document) document.data["excerpt"] = Jekyll::Excerpt.new(document) if document.data["excerpt"] end end end jekyll-relative-links-0.7.0/lib/jekyll-relative-links/version.rb000066400000000000000000000001221436033256400247410ustar00rootroot00000000000000# frozen_string_literal: true module JekyllRelativeLinks VERSION = "0.7.0" end jekyll-relative-links-0.7.0/script/000077500000000000000000000000001436033256400172515ustar00rootroot00000000000000jekyll-relative-links-0.7.0/script/bootstrap000077500000000000000000000000321436033256400212070ustar00rootroot00000000000000#!/bin/sh bundle install jekyll-relative-links-0.7.0/script/cibuild000077500000000000000000000001471436033256400206140ustar00rootroot00000000000000#!/bin/sh set -e bundle exec rspec bundle exec rubocop -S -D gem build jekyll-relative-links.gemspec jekyll-relative-links-0.7.0/spec/000077500000000000000000000000001436033256400166775ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/fixtures/000077500000000000000000000000001436033256400205505ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/fixtures/site/000077500000000000000000000000001436033256400215145ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/fixtures/site/_items/000077500000000000000000000000001436033256400227745ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/fixtures/site/_items/some-item.md000066400000000000000000000001411436033256400252110ustar00rootroot00000000000000--- --- # Some item [Another Page](../another-page.md) [A post](../_posts/2016-01-01-test.md) jekyll-relative-links-0.7.0/spec/fixtures/site/_items/some-subdir/000077500000000000000000000000001436033256400252255ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/fixtures/site/_items/some-subdir/another-item.md000066400000000000000000000000771436033256400301470ustar00rootroot00000000000000--- --- # Another item [Another Page](../../another-page.md) jekyll-relative-links-0.7.0/spec/fixtures/site/_items/static-file.md000066400000000000000000000000141436033256400255150ustar00rootroot00000000000000Static file jekyll-relative-links-0.7.0/spec/fixtures/site/_posts/000077500000000000000000000000001436033256400230235ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/fixtures/site/_posts/2016-01-01-test.md000066400000000000000000000007041436033256400253470ustar00rootroot00000000000000--- excerpt_separator: --- # Some post [Another Page](../another-page.md) [Page with permalink](../page-with-permalink.md) [Reference link][reference] [Reference with fragment][reference-with-fragment] [Reference fragment with brackets][reference-brackets] [Item](../_items/some-item.md) [reference]: ../another-page.md [reference-with-fragment]: ../another-page.md#foo [reference-brackets]: ../another-page.md#(bar) jekyll-relative-links-0.7.0/spec/fixtures/site/another-page.md000066400000000000000000000000511436033256400244040ustar00rootroot00000000000000--- --- # Another page [Page](page.md) jekyll-relative-links-0.7.0/spec/fixtures/site/html-page.html000066400000000000000000000000341436033256400242550ustar00rootroot00000000000000--- ---

HTML Page

jekyll-relative-links-0.7.0/spec/fixtures/site/jekyll-logo.png000066400000000000000000001341561436033256400244640ustar00rootroot00000000000000PNG  IHDRˆ5IDATxց_a(n      444444 @@@ح FPU5UU5UU5UU@WU@WU@WU@WU@WU@WUU]UU]UU]UU]UU]UU]UU tUU tUU tUU tUU tUU tUa_BU]UU]UU]UU]UU]UU]UU tUU tUU tUU tUU tUU tUU5UU5UU5UU5UU5UU5UU@WU@WU@WU;m8z̙sZDˉ C ==3m;U ِQT]￐"C Gh@@4@@4@@4,ɳ.oFy >szA" sPxn> h0#јaƣ1ˌ1ˎ I𯍍4 椞CP821‘h0 35f̊ڱ$D*L'Sd:Rupp聀TI >x=?͸域I؉Z9Mgrl>+HG B7m぀dK=3J=Ɯr~vDL6 :/ |Q\,WJjRT2~ٙFY7 s߈q{p~C)}~ (ZV&laFbHFF7z!RTVZzmMjڭvG>}W hesPճoFD7L߰~CY7rW%ߨ՚~n4nmU@;N'EF4~#ΕƕG 9?FE7~៟N˯N z`ap+Г9lD={n߾3z(_ݿÇ˯3ߨFS7{%u, u×^]\\x g@KO=b=xOqۮz0eѡqggwhkT̓Yu֗w~o2hoH=zVp,hޝDyqPa]c%6$j]'pCᤦ&ȥP 30 2+"dSh}tD^$J+wygBl{=]yFU=7D2p2, "r6kݻ٪`0Tf D2L%ST:};-/>[Um.'&Sh#`32X5f JKKuPzuωd% <`Xuٜ t^>;֮]{a ?~Ǐ'&'h`Z/r/||Pg=m^s8p&toz@>z4xӗ/yTtzÁ,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!=hۋ/wώq l3l1y (5<-9P$L1O:9t{[;քoIe {\,gP6x< NY5|?[֨KPݽk7t:ɔq涶v*MA^B/t&xY(:Zm.hnko٘@ߜ3g,b?>@_xavς<77T cO#R UI̙{'Z[[uӃL,F 7|u7ڹۜtcr8j}g }hUMKt|h[qc6l^Ue ᆆFœݗ/+WvvիW5xUC3̅ܿ# g6^}GSS >ʟhd~V)@O$"|nzJ:-R!"xRI] %_8awy^H-I޵fM*Uȍ&Ml-//O2k1/N3!rOW\ٚ~ChYKA*sm?˟C|BZR:1 ω$jXr1USS= dfRƞ-bht/Nωv枒۸_^bh_ECp6j= ~o{x ; :|ޞ޾޾~03Ͽ*觶SL Tz2$N3ЬR1fDq4﨣T3{,7fVCtp~/A|A|}P ?3YUY@H%Ij~_:U*դ&eGyrNPBh(%=hNSMi ms'ss&igt_-VJhŰGn!ꉢn~11>3,rJ{8?s= 9X143?pˀA,wU*hJRT Gb'Шl? ?~6oMF Qj@@/SS7 +XHH%=\7p%m<LOwy3/~܏s8!v-W3U4_>LgIhN^te|.{ Vt.]W@@Vλm&WuC#%KN7o(I4pn7zf(K߮޾:h^NIŏ? kʤhC\7#?ύrKFh  4h  4h|[@P說說說說說說jjjjjjn6B說說說說jjjjjj:ֱ Q+@@@@@@hh8}sIENDB`jekyll-relative-links-0.7.0/spec/fixtures/site/page with symbols?.md000066400000000000000000000000571436033256400254600ustar00rootroot00000000000000--- --- # Page with Symbols? [Page](page.md) jekyll-relative-links-0.7.0/spec/fixtures/site/page-with-permalink.md000066400000000000000000000001001436033256400256720ustar00rootroot00000000000000--- permalink: /page-with-permalink/ --- # Page with permalink jekyll-relative-links-0.7.0/spec/fixtures/site/page.md000066400000000000000000000026641436033256400227620ustar00rootroot00000000000000--- --- # Page [Another Page](another-page.md) [Page with Symbols?](page%20with%20symbols%3F.md) [Page with permalink](page-with-permalink.md) [Page with leading slash](/another-page.md) [Page with leading slash multi level](/subdir/page.md) [Reference link][reference] [Reference with fragment][reference-with-fragment] [Reference fragment with brackets][reference-brackets] [Subdir Page](subdir/page.md) [HTML Page](html-page.html) [Ghost page](ghost-page.md) [Fragment](another-page.md#foo) [Fragment with permalink](page-with-permalink.md#foo) [A first fragment inline](another-page.md#foo) and [a second fragment in the same line](page-with-permalink.md#bar) [A indented reference][indented-reference] [A post](_posts/2016-01-01-test.md) [Another post](subdir/_posts/2016-01-01-test.md) [An item](_items/some-item.md) [Another item](_items/some-subdir/another-item.md) [[A link with square brackets]](another-page.md) [\[A link with escaped square brackets\]](/another-page.md) [A link with a title](another-page.md "This is a link with a \"title\"") [Quotes in url & title](/another-page.md#'apostrophe' 'Quotes in url & title') Content end [reference]: another-page.md [reference-with-fragment]: another-page.md#foo [reference-brackets]: another-page.md#(bar) [indented-reference]: another-page.md [reference-with-whitespace]: another-page.md [reference-with-title]: another-page.md "This is a reference with a title" jekyll-relative-links-0.7.0/spec/fixtures/site/subdir/000077500000000000000000000000001436033256400230045ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/fixtures/site/subdir/_posts/000077500000000000000000000000001436033256400243135ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/fixtures/site/subdir/_posts/2016-01-01-test.md000066400000000000000000000002401436033256400266320ustar00rootroot00000000000000--- excerpt_separator: --- # Some post [Another Page](../../another-page.md) [Another Post](../../_posts/2016-01-01-test.md) Foobarjekyll-relative-links-0.7.0/spec/fixtures/site/subdir/another-subdir-page.md000066400000000000000000000000371436033256400271660ustar00rootroot00000000000000--- --- # Another subdir page jekyll-relative-links-0.7.0/spec/fixtures/site/subdir/page.md000066400000000000000000000003531436033256400242430ustar00rootroot00000000000000--- --- # Subdir page [Another subdir page](another-subdir-page.md) [Relative subdir page](./another-subdir-page.md) [Dir traversal](../page.md) [leading slash starts from the root](/another-page.md) ![image](../jekyll-logo.png) jekyll-relative-links-0.7.0/spec/jekyll-relative-links/000077500000000000000000000000001436033256400231205ustar00rootroot00000000000000jekyll-relative-links-0.7.0/spec/jekyll-relative-links/context_spec.rb000066400000000000000000000005621436033256400261460ustar00rootroot00000000000000# frozen_string_literal: true RSpec.describe JekyllRelativeLinks::Context do subject { described_class.new(site) } let(:site) { fixture_site("site") } it "stores the site" do expect(subject.site).to eql(site) end it "returns the registers" do expect(subject.registers).to have_key(:site) expect(subject.registers[:site]).to eql(site) end end jekyll-relative-links-0.7.0/spec/jekyll-relative-links/generator_spec.rb000066400000000000000000000273401436033256400264530ustar00rootroot00000000000000# frozen_string_literal: true RSpec.describe JekyllRelativeLinks::Generator do subject { described_class.new(site.config) } let(:site_config) do overrides["relative_links"] = plugin_config if plugin_config overrides end let(:overrides) { {} } let(:plugin_config) { nil } let(:site) { fixture_site("site", site_config) } let(:page) { page_by_path(site, "page.md") } let(:html_page) { page_by_path(site, "html-page.html") } let(:another_page) { page_by_path(site, "another-page.md") } let(:subdir_page) { page_by_path(site, "subdir/page.md") } let(:post) { doc_by_path(site, "_posts/2016-01-01-test.md") } let(:subdir_post) { doc_by_path(site, "subdir/_posts/2016-01-01-test.md") } let(:item) { doc_by_path(site, "_items/some-item.md") } let(:item_2) { doc_by_path(site, "_items/some-subdir/another-item.md") } before do site.reset site.read end it "saves the config" do expect(subject.config).to eql(site.config) end context "detecting markdown" do before { subject.instance_variable_set :@site, site } it "knows when an extension is markdown" do expect(subject.send(:markdown_extension?, ".md")).to be(true) end it "knows when an extension isn't markdown" do expect(subject.send(:markdown_extension?, ".html")).to be(false) end it "knows the markdown converter" do expect(subject.send(:markdown_converter)).to be_a(Jekyll::Converters::Markdown) end end context "generating" do before { subject.generate(site) } it "converts relative links" do expect(page.content).to include("[Another Page](/another-page.html)") end it "converts relative links with symbols" do expect(page.content).to include("[Page with Symbols?](/page%20with%20symbols?.html)") end it "converts relative links with permalinks" do expect(page.content).to include("[Page with permalink](/page-with-permalink/)") end it "converts relative links with leading slashes" do expect(page.content).to include("[Page with leading slash](/another-page.html)") end it "converts relative links with leading slashes in sub dir" do expect(page.content).to include("[Page with leading slash multi level](/subdir/page.html)") end it "converts pages in sub-directories" do expect(page.content).to include("[Subdir Page](/subdir/page.html)") end it "handles links within subdirectories" do expected = "[Another subdir page](/subdir/another-subdir-page.html)" expect(subdir_page.content).to include(expected) end it "handles relative links within subdirectories" do expected = "[Relative subdir page](/subdir/another-subdir-page.html)" expect(subdir_page.content).to include(expected) end it "handles directory traversal" do expect(subdir_page.content).to include("[Dir traversal](/page.html)") end it "handles paths from the root" do expected = "[leading slash starts from the root](/another-page.html)" expect(subdir_page.content).to include(expected) end it "Handles HTML pages" do expect(page.content).to include("[HTML Page](/html-page.html)") end it "doesn't mangle invalid pages" do expect(page.content).to include("[Ghost page](ghost-page.md)") end it "handles links with nested square brackets" do expected = "[[A link with square brackets]](/another-page.html)" expect(page.content).to include(expected) end it "handles links with escaped nested square brackets" do expected = "[\\[A link with escaped square brackets\\]](/another-page.html)" expect(page.content).to include(expected) end it "handles links with a title" do expected = "[A link with a title](/another-page.html \"This is a link with a \\\"title\\\"\")" expect(page.content).to include(expected) end it "handles links with quotes in url fragment and title" do # single_quotes are valid in urls expected = "[Quotes in url & title](/another-page.html#'apostrophe' 'Quotes in url & title')" expect(page.content).to include(expected) end context "reference links" do it "handles reference links" do expect(page.content).to include("[reference]: /another-page.html") end it "handles indented reference links" do expect(page.content).to include("[indented-reference]: /another-page.html") end it "handles reference links with trailing whitespace" do expected = "[reference-with-whitespace]: /another-page.html" expect(page.content).to include(expected) end it "leaves newlines intact" do expected = "\n\nContent end\n\n[reference]: /another-page.html\n\n" expect(page.content).to include(expected) end it "handles reference links with titles" do expected = "[reference-with-title]: /another-page.html \"This is a reference with a title\"" expect(page.content).to include(expected) end end context "with a baseurl" do let(:overrides) { { "baseurl" => "/foo" } } it "converts relative links" do expect(page.content).to include("[Another Page](/foo/another-page.html)") end it "handles links within subdirectories" do expected = "[Another subdir page](/foo/subdir/another-subdir-page.html)" expect(subdir_page.content).to include(expected) end it "handles relative links within subdirectories" do expected = "[Relative subdir page](/foo/subdir/another-subdir-page.html)" expect(subdir_page.content).to include(expected) end it "handles directory traversal" do expect(subdir_page.content).to include("[Dir traversal](/foo/page.html)") end end context "with a non-standard permalink structure" do let(:overrides) { { "permalink" => "/:year/:month/:title:output_ext" } } it "includes the extension" do expect(page.content).to include("[Another Page](/another-page.html)") end end context "linking to page fragments" do it "converts relative links" do expect(page.content).to include("[Fragment](/another-page.html#foo)") end it "converts relative links with permalinks" do expected = "[Fragment with permalink](/page-with-permalink/#foo)" expect(page.content).to include(expected) end it "converts reference links" do expected = "[reference-with-fragment]: /another-page.html#foo" expect(page.content).to include(expected) end it "converts reference links with brackets in fragment" do expected = "[reference-brackets]: /another-page.html#(bar)" expect(page.content).to include(expected) end it "converts multiple fragments in the same line" do expected_fst = "[A first fragment inline](/another-page.html#foo)" expected_snd = "[a second fragment in the same line](/page-with-permalink/#bar)" expect(page.content).to include(expected_fst) expect(page.content).to include(expected_snd) end end context "images" do it "handles images" do expect(subdir_page.content).to include("![image](/jekyll-logo.png)") end end context "disabled" do let(:plugin_config) { { "enabled" => false } } it "does not process pages when disabled" do expect(page.content).to include("[Another Page](another-page.md)") end end context "collections" do let(:plugin_config) { { "collections" => true } } let(:overrides) do { "collections" => { "items" => { "permalink" => "/items/:name/", "output" => true, }, }, } end it "converts relative links from pages to posts" do expect(page.content).to include("[A post](/2016/01/01/test.html)") end it "converts relative links from posts to pages" do expect(post.content).to include("[Another Page](/another-page.html)") end it "converts relative links from posts to pages in the excerpt" do expect(post.excerpt.content).to include("[Another Page](/another-page.html)") end it "converts relative links with permalinks from posts to pages " do expect(post.content).to include("[Page with permalink](/page-with-permalink/)") end it "handles reference links from posts to pages" do expect(post.content).to include("[reference]: /another-page.html") end it "converts reference links" do expected = "[reference-with-fragment]: /another-page.html#foo" expect(post.content).to include(expected) end it "converts reference links with brackets in fragment" do expected = "[reference-brackets]: /another-page.html#(bar)" expect(post.content).to include(expected) end context "posts in subdirs" do it "converts relative links from pages to posts" do expect(page.content).to include("[Another post](/subdir/2016/01/01/test.html)") end it "converts relative links from posts to pages" do expect(subdir_post.content).to include("[Another Page](/another-page.html)") end it "converts relative links from posts to posts" do expect(subdir_post.content).to include("[Another Post](/2016/01/01/test.html)") end it "converts relative links from posts to posts in the excerpt" do expect(subdir_post.excerpt.content).to include("[Another Post](/2016/01/01/test.html)") end end context "items (with output)" do it "converts relative links from pages to items" do expect(page.content).to include("[An item](/items/some-item/)") expect(page.content).to include("[Another item](/items/another-item/)") end it "converts relative links from items to pages" do expect(item.content).to include("[Another Page](/another-page.html)") expect(item_2.content).to include("[Another Page](/another-page.html)") end it "converts relative links from posts to items" do expect(post.content).to include("[Item](/items/some-item/)") end it "converts relative links from items to posts" do expect(item.content).to include("[A post](/2016/01/01/test.html)") end end context "excludes" do let(:excludes) do [ "another-page.md", "_posts/2016-01-01-test.md", "_items/some-subdir/another-item.md", ] end let(:plugin_config) { { "collections" => true, "exclude" => excludes } } context "pages" do it "includes included pages" do expect(page.content).to include("[Another Page](/another-page.html)") end it "excludes excluded pages" do expect(another_page.content).to include("[Page](page.md)") end end context "posts" do it "includes included posts" do expect(subdir_post.content).to include("[Another Page](/another-page.html)") end it "excludes excluded posts" do expect(post.content).to include("[Another Page](../another-page.md)") end end context "collections" do it "includes included documents" do expect(item.content).to include("[Another Page](/another-page.html)") end it "excludes excluded documents" do expect(item_2.content).to include("[Another Page](../../another-page.md)") end end end end end context "a page without content" do before { page_by_path(site, "page.md").content = nil } it "doesn't error out" do expect { subject.generate(site) }.not_to raise_error end end end jekyll-relative-links-0.7.0/spec/spec_helper.rb000066400000000000000000000021551436033256400215200ustar00rootroot00000000000000# frozen_string_literal: true require_relative "../lib/jekyll-relative-links" RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true end config.filter_run_when_matching :focus config.example_status_persistence_file_path = "spec/examples.txt" config.disable_monkey_patching! config.default_formatter = "doc" if config.files_to_run.one? config.order = :random Kernel.srand config.seed end Jekyll.logger.adjust_verbosity(:quiet => true) def fixture_path(fixture) File.expand_path "./fixtures/#{fixture}", File.dirname(__FILE__) end def fixture_site(fixture, overrides = {}) default_config = { "source" => fixture_path(fixture) } config = Jekyll::Utils.deep_merge_hashes(default_config, overrides) config = Jekyll.configuration(config) Jekyll::Site.new(config) end def page_by_path(site, path) site.pages.find { |p| p.path == path } end def doc_by_path(site, path) site.documents.find { |p| p.relative_path == path } end