Skip to content

Commit 7e97234

Browse files
committed
more customizable
1 parent b79e8bf commit 7e97234

File tree

6 files changed

+19
-9
lines changed

6 files changed

+19
-9
lines changed

config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ const config = {
4040
TITLE: "About",
4141
VALUE: "A customizable website to view docs for your projects"
4242
},
43+
DESCRIPTION_LIST: {
44+
TITLE: "Why?",
45+
VALUE: [
46+
"Fast",
47+
"Easy to install",
48+
"Responsive",
49+
"Dark & Light mode",
50+
"Custom 404 page"
51+
]
52+
},
4353
FOOTER: {
4454
HEADER: "Yukitoki",
4555
DESCRIPTION: "Custom documentation viewing website"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-app",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"private": true,
55
"scripts": {
66
"build": "routify -b && rollup -c",

src/components/Footer.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
<hr class="w-1/3 mx-auto border-t-2 border-gray-200 py-3" />
1010

11-
<p class="text-white">&copy; <a class="hover:text-gray-300" href="https://github.com/DevSnowflake">Snowflake Studio ❄</a> - {new Date().getFullYear()}</p>
11+
<p class="text-white">Yukitoki - &copy; <a class="hover:text-gray-300" href="https://github.com/DevSnowflake">Snowflake Studio ❄</a> - {new Date().getFullYear()}</p>
1212
</footer>

src/data/DocsManager.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class DocsManager {
66
constructor(docsOptions) {
77
if (!docsOptions) throw new Error("Invalid docs options");
88

9+
this.docsBranch = docsOptions.docsBranch ?? "docs";
910
this.id = docsOptions.id;
1011
this.name = docsOptions.name;
1112
this.global = docsOptions.global;
@@ -78,7 +79,7 @@ class DocsManager {
7879
}
7980

8081
async fetchDocs(tag) {
81-
return await fetch(`https://raw.githubusercontent.com/${this.repo}/docs/${tag}.json`).then(async (res) => {
82+
return await fetch(`https://raw.githubusercontent.com/${this.repo}/${this.docsBranch}/${tag}.json`).then(async (res) => {
8283
if (!res.ok && !window.localStorage.getItem(`docs-${tag}`)) throw new Error("Could not fetch docs data");
8384
const doc = res.ok ? await res.json() : JSON.parse(window.localStorage.getItem(`docs-${tag}`));
8485
window.localStorage.setItem(`docs-${tag}`, JSON.stringify(doc));

src/data/MainSource.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ export default new DocsManager({
88
global: "Yukitoki",
99
repo: "DevSnowflake/yukitoki-docs",
1010
defaultTag: "main",
11+
docsBranch: "docs",
1112
branchFilter: (branch) => !blacklisted.has(branch)
1213
});

src/pages/index.svelte

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@
5959
<p class="text-lg font-semibold">{config.DESCRIPTION.VALUE}</p>
6060
</div>
6161
<div class="why py-4 px-6 md:mx-auto">
62-
<h1 class="text-3xl font-bold opacity-90 dark:text-white text-gray-800">Why</h1>
62+
<h1 class="text-3xl font-bold opacity-90 dark:text-white text-gray-800">{config.DESCRIPTION_LIST.TITLE}</h1>
6363
<ul class="text-lg font-semibold list-disc">
64-
<li>Fast</li>
65-
<li>Easy to install</li>
66-
<li>Responsive</li>
67-
<li>Dark & Light mode</li>
68-
<li>Custom 404 page</li>
64+
{#each config.DESCRIPTION_LIST.VALUE as item}
65+
<li>{item}</li>
66+
{/each}
6967
</ul>
7068
</div>
7169
</div>

0 commit comments

Comments
 (0)