diff --git a/scripts/spin.rhai b/scripts/spin.rhai deleted file mode 100644 index abaa84eed..000000000 --- a/scripts/spin.rhai +++ /dev/null @@ -1,41 +0,0 @@ -// This function lists all of the pages, subject to the constraints. -// -// It returns an array of objects of the form: -// [ -// #{ -// uri: "path/to/page", -// page: { -// head: {title: "some title", description: "Some description", ...} -// body: "This is the HTML" -// } -// } -// ] -// -// The array is sorted with the earlier items being most recent, and the oldest items at the end. - -// Param 1 should be `site.pages` -let pages = params[0]; - -// Loop through them and return all of the page objects that are in the specified path. -let spin_pages = []; - -// Get each page, assigning it to {path: object}. -let keys = pages.keys(); -for item in keys { - if item.index_of("/content/spin/") == 0 { - // Remove /content and .md - let path = item.sub_string(8); - let page = pages[item]; - path = path.sub_string(0, path.index_of(".md")); - - spin_pages.push(#{ - uri: path, - page: page, - // The template to use for these pages - template: "spin_main", - }); - } - -} - -spin_pages diff --git a/static/js/main.js b/static/js/main.js index 00471e73e..95a4a15a9 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -639,7 +639,7 @@ parcelHelpers.export(exports, "searchButton", ()=>searchButton); parcelHelpers.export(exports, "searchModal", ()=>searchModal); const { el , mount , text , list , setChildren , setStyle , setAttr } = redom; const projectList = [ - "Spin", + "Wasm Functions", "Cloud", "Bartholomew" ]; @@ -659,21 +659,6 @@ async function setupSearch() { let currentPath = window.location.pathname; let splitPath = currentPath.split("/"); let version = splitPath[2]; - if (version == "v1") documents = documents.filter((k)=>{ - if (k.project != "spin") return true; - return k.url.includes("spin/v1/"); - }); - else if (version == "v2") documents = documents.filter((k)=>{ - if (k.project != "spin") return true; - return k.url.includes("spin/v2/"); - }); - else if (version == "v3") documents = documents.filter((k)=>{ - if (k.project != "spin") return true; - return k.url.includes("spin/v3/"); - }); - else documents = documents.filter((k)=>{ - return k.project != "spin" || k.url.includes("spin/v3/"); - }); idx = lunr(function() { this.field("title"); this.field("subheading"); @@ -865,22 +850,22 @@ class ModalSuggest { constructor(){ this.projectData = [ { - project: "Spin", + project: "Wasm Functions", link1: [ - "Install", - "/spin/install" + "Quickstart", + "/wasm-functions/quickstart" ], link2: [ - "Quickstart", - "/spin/quickstart/" + "Deploy", + "/wasm-functions/deploy" ], link3: [ - "Develop", - "/spin/developing" + "Support", + "/wasm-functions/support" ], link4: [ - "Deploy", - "/spin/deploying-to-fermyon/" + "FAQ", + "/wasm-functions/faq" ] }, { @@ -1250,15 +1235,9 @@ class multiTabBlockHandler { return k.dataset.title; }); this.active = this.langs.indexOf(activeValue); - if (tabClass != "spin-version") this.active = this.active > 0 ? this.active : 0; - else this.active = this.active > 0 ? this.active : this.nodes.length - 1; + this.active = this.active > 0 ? this.active : 0; this.tabs = list("ul", codeblockLanguageTab, null, this.ChildEventHandler.bind(this)); this.el = el("div.tabs.is-boxed", this.tabs); - // If the tabClass is `spin-version` reverse the order of the list - if (tabClass === "spin-version") setStyle(this.tabs, { - display: "flex", - "flex-direction": "row-reverse" - }); this.tabs.update(this.langs, { active: this.active }); diff --git a/static/js/src/modules/multiTab.js b/static/js/src/modules/multiTab.js index b18c280e2..5c1e05198 100644 --- a/static/js/src/modules/multiTab.js +++ b/static/js/src/modules/multiTab.js @@ -29,19 +29,9 @@ class multiTabBlockHandler { this.nodes = Array.from(nodes) this.langs = this.nodes.map(k => { return k.dataset.title }) this.active = this.langs.indexOf(activeValue) - if (tabClass != "spin-version") { - this.active = this.active > 0 ? this.active : 0 - } else { - this.active = this.active > 0 ? this.active : this.nodes.length - 1 - } + this.active = this.active > 0 ? this.active : 0 this.tabs = list("ul", codeblockLanguageTab, null, this.ChildEventHandler.bind(this)) this.el = el("div.tabs.is-boxed", this.tabs) - - // If the tabClass is `spin-version` reverse the order of the list - if (tabClass === "spin-version") { - setStyle(this.tabs, { display: "flex", "flex-direction": "row-reverse" }) - } - this.tabs.update(this.langs, { active: this.active }) this.updateTabContent(this.active) } diff --git a/static/js/src/modules/search.js b/static/js/src/modules/search.js index 6d63c993e..381111935 100644 --- a/static/js/src/modules/search.js +++ b/static/js/src/modules/search.js @@ -1,6 +1,6 @@ const { el, mount, text, list, setChildren, setStyle, setAttr } = redom; -const projectList = ["Spin", "Cloud", "Bartholomew"]; +const projectList = ["Wasm Functions", "Cloud", "Bartholomew"]; const versionPattern = /^v\d+$/; let idx; let documents; @@ -15,41 +15,12 @@ async function getSearchIndex() { } // -// This function filters and builds the search index, based on which project is selected (Spin v1, V2, V3, Cloud, Etc.), +// This function filters and builds the search index, based on which project is selected (Wasm Functions, Cloud, Etc.), // async function setupSearch() { documents = await getSearchIndex(); let currentPath = window.location.pathname; let splitPath = currentPath.split("/"); - let version = splitPath[2]; - // Adds spin/v1, spin/v2 or spin/v3 based on current path. - // If not on a spin project (e.g., cloud), add spin/v3 (latest) - if (version == "v1") { - documents = documents.filter((k) => { - if (k.project != "spin") { - return true; - } - return k.url.includes("spin/v1/"); - }); - } else if (version == "v2") { - documents = documents.filter((k) => { - if (k.project != "spin") { - return true; - } - return k.url.includes("spin/v2/"); - }); - } else if (version == "v3") { - documents = documents.filter((k) => { - if (k.project != "spin") { - return true; - } - return k.url.includes("spin/v3/"); - }); - } else { - documents = documents.filter((k) => { - return k.project != "spin" || k.url.includes("spin/v3/"); - }); - } idx = lunr(function () { this.field("title"); @@ -271,11 +242,11 @@ class ModalSuggest { constructor() { this.projectData = [ { - project: "Spin", - link1: ["Install", "/spin/install"], - link2: ["Quickstart", "/spin/quickstart/"], - link3: ["Develop", "/spin/developing"], - link4: ["Deploy", "/spin/deploying-to-fermyon/"], + project: "Wasm Functions", + link1: ["Quickstart", "/wasm-functions/quickstart"], + link2: ["Deploy", "/wasm-functions/deploy"], + link3: ["Support", "/wasm-functions/support"], + link4: ["FAQ", "/wasm-functions/faq"], }, { project: "Cloud", diff --git a/templates/404.hbs b/templates/404.hbs index 7eef27200..977ccdada 100644 --- a/templates/404.hbs +++ b/templates/404.hbs @@ -1,4 +1,4 @@

The page does not exist!

-

Find your way back to the homepage or the Spin docs or the Fermyon Cloud docs

\ No newline at end of file +

Find your way back to the homepage or the Fermyon Wasm Functions docs or the Fermyon Cloud docs

\ No newline at end of file diff --git a/templates/changelog.hbs b/templates/changelog.hbs index a1b0fd02e..83eb13a5e 100644 --- a/templates/changelog.hbs +++ b/templates/changelog.hbs @@ -17,7 +17,6 @@ read_pages_glob = ["cloud/changelog/*.md"] Projects

diff --git a/templates/common_sidebar.hbs b/templates/common_sidebar.hbs index 30ee8c529..ee812acea 100644 --- a/templates/common_sidebar.hbs +++ b/templates/common_sidebar.hbs @@ -4,7 +4,6 @@ Index

@@ -21,7 +20,6 @@

diff --git a/templates/content_navbar.hbs b/templates/content_navbar.hbs index 2bdfa0a2c..d6ff4fcf3 100644 --- a/templates/content_navbar.hbs +++ b/templates/content_navbar.hbs @@ -45,25 +45,19 @@