Content created in Koken is viewed on your site using links provided by Koken. Though Koken generates these links automatically, their structure and labels may be edited to your liking. We'll explain how here.
A "slug" is a unique identifier at the end of a URL. It is used when linking to single content pages (an album, image, video, essay, etc). Slugs most often use the title of an item, or fallback to filenames if available.
To edit slugs for Library content, first select the item you'd like to edit. You may select a single image/video in the middle column or a single album/set in the left column by clicking on one. Scroll the right "Inspector" column to the bottom until you see the Site section. Inside will be a Link row containing the site URL used to view the item.
Click edit underneath the textarea and a panel will open from the right. Change the slug by clicking in the field and typing at least one character. Numbers and hyphens may also be included. Spaces and capital letters are not allowed and will be automatically converted to hyphens and lowercase characters respectively.
The process is the same when editing essays and pages. Click on Text in Koken's main navigation, then click on any essay or page. Scroll the right "Inspector" column to the bottom until you see the Site. Inside will be a Link field with an edit link identical to the one the Library provides.
What happens to the old slug?
Koken stores a limited number of previously assigned slugs in its database in case an older version of a link was shared or used somewhere outside of your Koken site (links within your Koken site automatically reflect your edits). If an item link is loaded using an older slug, Koken loads the appropriate page, but adds an invisible canonical link to the page's markup to let search engines know a newer, preferred version of the link should be indexed.
Slugs are prefixed with paths that reflect an item's place within a site's hierarchy. These paths use labels like
/essays/, etc. Editing these labels not only change how links are formatted but also control how content is labeled within the entire site, as we'll explain below.
To edit site links and labels, click on Settings in the Koken's main navigation, then Site Publishing in the left column. Towards the bottom of the main column will be a Labels and links row. Uncheck the Use default settings checkbox. The area will expand and display the following:
This area is divided into three columns. The first two — Label (plural) and Label (singular) — control how each data type managed by Koken is labeled on your site. The third column (Link format) controls how links for each data type are formatted. These links are formatted automatically by Koken using the plural labels.
Content, Albums and Essays offer multiple link format options, as shown above. You may see available options by clicking the select and choosing which style of link you'd prefer to use.
Real world example
When would editing links and labels be helpful? Let's take a look at an example.
Let's say you'd prefer the word "Projects" instead of "Albums". You'd first change "Albums" to "Projects" in the Label (plural) column, then change Label (singular) to "Project". The row would then look like this:
Click Save settings button at the bottom to save your changes.
Click Site in Koken's main navigation. Depending on which theme you're using, the navigation link in your site that was labeled "Albums" should now use "Projects" as its label. The same link in each of the left column's navigation groups would also display the change, as illustrated below.
The page's url now uses "/projects" as well:
Additionally, any other place "Albums" appears in a site template will update to "Projects", as illustrated below with the pagination links in Elementary's album page:
Theme designers, check out the necessary Lens variables to output labels in your templates.
Changing back to defaults
If at any time you change your mind and want to revert back to Koken's default labels and links, go back to Site > Site Publishing and check Use default settings. The edit area will close all labels and links will revert to how they were when Koken was installed.