Logo: Relish

  1. Sign in

Project: relish

Readable URLs

Relish's URL scheme should be readable, so you can use the URL
as a navigation aid.

The URL for each page of documentation is made up as follows:

http://relishapp.com/<publisher>/<project>/docs/<page path>

or:

http://relishapp.com/<publisher>/<project>/v/<version>/docs/<page path>

If the project has versions but you don't specify one in the path, Relish
will assume you're looking for the documentation for the latest version.

The page path is made by taking the title of the page, and any directory
that it sits in, and turning them into lower-case slugs:

<directory slug>/<page title slug>

The title of the page depends on it's source. If it comes from a Gherkin
feature, it's the name of the feature. If it comes from a Markdown file, it's
the name of the file on disk, unless overriden in a .nav file.

Scenarios
Push a single feature once
Given
a project "rspec/rspec-core" with the following Feature:
Feature: This is a test
When
I navigate to http://relishapp.com/rspec/rspec-core/docs/this-is-a-test
Then
I should be on the page for the Feature
Push two features with the same name

The URL is generated from the name of the feature. If you've accidentally created two
features with the same name, relish automatically adds a bang! to the end of the path
for the second one.

So, if you see a bang! in a path, it means you've got a duplicate title.

Given
a project "rspec/rspec-core"
And
two different features which both contain:
Feature: Whoops I'm a duplicate
When
I visit the page for the project
Then
I should see links to topics with the following paths:
/rspec/rspec-core/docs/whoops-i-m-a-duplicate
/rspec/rspec-core/docs/whoops-i-m-a-duplicate!

Last published about 7 years ago by mattwynne.