File tree Expand file tree Collapse file tree 6 files changed +19
-9
lines changed
Expand file tree Collapse file tree 6 files changed +19
-9
lines changed Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 88
99 <hr class =" w-1/3 mx-auto border-t-2 border-gray-200 py-3" />
1010
11- <p class ="text-white" >© <a class ="hover:text-gray-300" href ="https://github.com/DevSnowflake" >Snowflake Studio ❄</a > - {new Date ().getFullYear ()}</p >
11+ <p class ="text-white" >Yukitoki - © <a class ="hover:text-gray-300" href ="https://github.com/DevSnowflake" >Snowflake Studio ❄</a > - {new Date ().getFullYear ()}</p >
1212</footer >
Original file line number Diff line number Diff 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 ) ) ;
Original file line number Diff line number Diff 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} ) ;
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments