Skip to content

Latest commit

 

History

History
105 lines (82 loc) · 2.94 KB

slugs.md

File metadata and controls

105 lines (82 loc) · 2.94 KB

Slugs

In Kumu, a slug is a piece of text that has had all letters converted to lowercase, all special characters removed, and all spaces replaced with hyphens. Kumu uses slugs in many different places:

Knowing how to recognize, read, and write slugs is a skill that will come in handy, especially if you work in the Advanced Editor! Here are some sample slugs:

Original text Slug
My First Kumu Project my-first-kumu-project
Honolulu, HI honolulu-hi
Friends don't let friends map alone! friends-dont-let-friends-map-alone
Method and System for Dynamically Creating and Exploring Graph Structures method-and-system-for-dynamically-creating-and-exploring-graph-structures
От Kumu с любовью от-kumu-с-любовью

Create your own slug

Need a slug for your project? Use this tool to create your own:

<style> #result { position: relative; } #copy-icon { position: absolute; top: 2px; right: 0; background-color: #f7f7f7; padding: 5px; } #copy-success { opacity: 0; transition: all 0.2s ease; } </style>
<i class="fa fa-copy" id="copy-icon" onclick="copySlug()">  </i>

Copied to clipboard

<script> function simpleSlugify() { var string = document.querySelector("#simple-slugify-input").value; var success = document.querySelector("#copy-success"); success.style.opacity = "0"; string = string .normalize("NFD").replace(/[\u0300-\u036f]/g, '') // remove diacritics .replace(/'/g, '') .replace(/[^a-z0-9]/gi, '-') .replace(/-{2,}/g, '-') .replace(/^-/, '').replace(/-$/, '') .toLowerCase(); var result = document.querySelector("#simple-slugify-result"); result.value = string; } function copySlug() { var slug = document.querySelector('#simple-slugify-result'); slug.select(); document.execCommand("copy"); var success = document.querySelector("#copy-success"); success.style.opacity = "1"; } </script>

edit this page