Nazwę strony możesz też pobierać z document.title, jak masz ustawione w kodzie html <title>
<!DOCTYPE html>
<html>
<head>
. . .
<title>NAZWA STRONY</title>
. . .
</head>
. . .
</html>
Moja propozycja na rotowanie danych
const planet = ["Start","Contact", "First","Second", "Third", "Fourth", "Fifth", "Sixth"];
planet_name = 'First';
console.log('Wybrany: ' + planet_name, rotateArray(planet , planet_name));
planet_name = 'Contact';
console.log('Wybrany: ' + planet_name, rotateArray(planet , planet_name));
function rotateArray(arr, choice) {
const from_index = arr.indexOf(choice);
return [].concat(arr.slice(from_index, arr.length), arr.slice(0, from_index));
}
Zestawienie podanych propozycji, wybór należy do Ciebie 
const planet = ["Start","Contact", "First","Second", "Third", "Fourth", "Fifth", "Sixth"];
console.info('Orginalna: ', planet);
/* kopie do testów */
let test1 = [...planet];
let test2 = [...planet];
let test3 = [...planet];
console.warn('Wersja: rotateArray_v1');
let planet_name = 'First';
console.log('Wybrany: ' + planet_name, rotateArray_v1(test1, planet_name));
planet_name = 'Contact';
console.log('Wybrany: ' + planet_name, rotateArray_v1(test1, planet_name));
console.warn('Wersja: rotateArray_v2');
planet_name = 'First';
test2 = rotateArray_v2(test2, planet_name);
console.log('Wybrany: ' + planet_name, test2);
planet_name = 'Contact';
test2 = rotateArray_v2(test2, planet_name);
console.log('Wybrany: ' + planet_name, test2);
console.warn('Wersja: rotateArray_v3');
planet_name = 'First';
test3 = rotateArray_v3(test3, planet_name);
console.log('Wybrany: ' + planet_name, test3);
planet_name = 'Contact';
test3 = rotateArray_v3(test3, planet_name);
console.log('Wybrany: ' + planet_name, test3);
function rotateArray_v1(arr, choice) {
return arr.sort(function(x, y) { return x === choice ? -1 : y === choice ? 1 : 0; });
}
function rotateArray_v2(arr, choice) {
while (arr[0] != choice) arr.push(arr.shift());
return arr;
}
function rotateArray_v3(arr, choice) {
const from_index = arr.indexOf(choice);
return [].concat(arr.slice(from_index, arr.length), arr.slice(0, from_index));
}
Demonstracja z użyciem document.title
<!DOCTYPE html>
<html>
<head>
<title>Contact</title>
</head>
<body>
<div class="name_container">
<p class="pn"></p>
<p class="more">READ MORE</p>
</div>
<script>
const planet = ["Start","Contact", "First","Second", "Third", "Fourth", "Fifth", "Sixth"];
let planet_menu = [];
/* symulacja odczytania <title> na potrzeby codepen-a */
document.title = 'Contact';
planet_menu = rotateArray(planet, document.title);
document.querySelector('.pn').textContent = planet_menu[0];
console.log(planet_menu);
function rotateArray(arr, choice) {
if (arr.indexOf(choice) > -1) { // lub if (arr.includes(choice))
const from_index = arr.indexOf(choice);
return [].concat(arr.slice(from_index, arr.length), arr.slice(0, from_index));
}
return arr;
}
</script>
</body>
</html>