KB User's Guide - Documents Tab - UrlSlug Field
The KB allows you the option to assign a UrlSlug for each new document based on its title. Using short, memorable URLs makes it easier for visitors to find and share your content. While the document title remains designed for display and human readability, its slug may be optimized for brevity or for consumption by search engines.
What is a UrlSlug?
A UrlSlug is the part of a URL which identifies the document using human-readable keywords.
UrlSlugs can be generated by the KB author from the document title and also can also be further edited. While the page title remains designed for display and human readability, the UrlSlug may be optimized for brevity or for consumption by search engine page results. Longer document titles may also be truncated to keep the final UrlSlug to a reasonable length.
Location of the UrlSlug Field
To find the UrlSlug field in a New Document, go to the KB Admin Tools > Documents tab > NewDoc link. The UrlSlug field is located under the Title field. It is not a required field.
In the image below, we see an arrow pointing to the UrlSlug field in the Creating a New Document screen.
How to Make a UrlSlug for Your Document
- Enter a title in the Title field and click on the Make slug link on the far right of the UrlSlug field.
- The UrlSlug field will populate with the words in the title changed to all lower case, each word separated by dashes "-". If you are satisfied with the results, continue editing the document as per your KB group's workflow.
Updating your UrlSlug
At the touch of a button, your document's url can become a friendlier url.
In the image below, the Make slug link was used to create a UrlSlug in an already existing document. The UrlSlug contains all the words in the Title, however they are all in lowercase and separated by dashes "-".
While your document Title may adhere to a specific naming standard, the Title based UrlSlug may not be all that informative. You may edit the UrlSlug to make it even more meaningful to your users.
- Make updates to the UrlSlug field
- Do NOT click on the Make Slug link, if you do, your update will be overwritten and field will revert back to all the words in the Title separated by dashes format.
- Instead, click on the Save changes or Submit button to save your changes.
- Note: After clicking on the Save change or Update button when you modifying your existing UrlSlug, please notify those you initially sent the CleanURL that it has been updated.
After you save your document, you will see the current UrlSLug field in the document information table while viewing your doc in Document Review Mode while in the KB Admin Tools. The image below shows the current UrlSlug in that document.
Any words you add to the UrlSlug that are not found in the Title field will automatically be added to the Keywords field. In the image below, the words that are not found in the Title field that were added to the UrlSlug field, "docs" and "group" has been added to the keywords.
Your keyword updates will be captured in the Revision History. In the image below, the two keywords that were added as a result of the UrlSlug update are circled in red.
When viewing the document in the Live Site(s), you will see that the UrlSlug has been changed to a hotlink called a CleanUrl. It is found the Document Information Table at the bottom of the document.
In the image below, you will see the CleanURL circled in red beneath the Sites filed in the Document Information Table of a Live document..
The CleanURL is friendly and easy to remember. You may copy and paste the link into emails, chat windows and other communiques. The CleanURL helps cut down on typos because there is less confusion about what exactly to write and type.
Characters and Word specification in your UrlSlug
- Must be between 3 and 200 characters
- ASCII characters only
- Only special character allowed is the dash (-)
- All accented characters, like "é" for example, are converted to ASCII type characters
- Space(s) allowed in UrlSlug, however, they will be converted to dash(es) upon clicking Save Change/Submit button.
- Words that are contractions will be converted, for example; I'll > ill; don't > dont; can't > cant, etc.
UrlSlug Uniqueness Not Enforced
KB Admins need not worry whether their UrlSlug is unique or not. Uniqueness is not enforced.
In the image below, a search was performed on the Wisconsin Unified site at https://kb.wisc.edu. The UrlSlug, "kb-training-demo-document" was typed in the browser. Three documents with the same UrlSlug appeared. Each document is owned by a different KB Group.
The URL displayed in the browser immediately changes to list the 3 document ID numbers that have identical UrlSlugs. In the image below, you will see the UrlSlug is replaced by 3 document ID numbers circled in blue.
Best Practices When Using the terms "Internal" or "External" in the UrlSlug
"Internal" in the UrlSlug Field
You may enter the single word "internal" in the UrlSlug field. However, since the word "internal" appears in the document URL (e.g. when a document is saved to the internal KB site), the KB System appends the Document ID number to the word "internal". There is no space in between the word "internal" and the Document ID.
The image below shows document 75464 with the single word "internal" in the UrlSlug field. Once the Save Change or Submit button was clicked, the KB System appended the UrlSlug with the Document ID, "75464". Note that there is not a space between "internal" and the Document ID number in the lower half of the image.
"External" in the UrlSlug Field
You may enter the single word "external" in the UrlSlug field.
The image below shows the single word "external" in the UrlSlug field of document 36805.
When you call the document up on either of your Live KB Sites, the CleanURL will present your KB Group Space name and the word "external" in the Document Information Table located at the bottom of the page..
The image below shows a Live Site side-by-side comparison of both CleanURL fields for document 36805. On the left, the Internal Site document presents a CleanURL of https://kb.wisc.edu/kbGuide/internal/external. The Public Site on the right presents a CleanURL of https://kb.wisc.edu/kbGuide/external.