|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <title>Configuration file</title> |
| 6 | + <meta name="description" content="this is the docs of your vulpix" /> |
| 7 | + <meta name="author" content="https://x.com/codeshaine" /> |
| 8 | + <meta name="og:title" content="Configuration file" /> |
| 9 | + <meta name="og:description" content="this is the docs of your vulpix" /> |
| 10 | + <meta name="og:url" content="doc.vulpix.com" /> |
| 11 | + <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 12 | + |
| 13 | + <link rel="preconnect" href="https://fonts.googleapis.com" /> |
| 14 | + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> |
| 15 | + <link |
| 16 | + href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" |
| 17 | + rel="stylesheet" |
| 18 | + /> |
| 19 | + <link rel="icon" href="/favicon.ico" type="image/x-icon" /> |
| 20 | + <script> |
| 21 | + (function () { |
| 22 | + const savedTheme = localStorage.getItem("theme"); |
| 23 | + if (savedTheme === "dark") { |
| 24 | + document.documentElement.setAttribute("data-theme", "dark"); |
| 25 | + } |
| 26 | + })(); |
| 27 | + </script> |
| 28 | + |
| 29 | + <link rel="stylesheet" href="/style.css" /> |
| 30 | + |
| 31 | + </head> |
| 32 | + <body> |
| 33 | + <div class="mobile-overlay" id="mobileOverlay"></div> |
| 34 | + |
| 35 | + <header class="mobile-header"> |
| 36 | + <button class="mobile-nav-toggle" id="mobileNavToggle">☰</button> |
| 37 | + <a href="/" class="mobile-logo">Vulpix</a> |
| 38 | + </header> |
| 39 | + |
| 40 | + <button class="theme-toggle" onclick="toggleTheme()" id="themeToggle"> |
| 41 | + 🌙 |
| 42 | + </button> |
| 43 | + |
| 44 | + <nav class="bar" id="sidebar"> |
| 45 | + <a href="/" class="logo"> Vulpix </a> |
| 46 | + <div class="container"> |
| 47 | + |
| 48 | + <section> |
| 49 | + <h3>Basics</h3> |
| 50 | + <ul> |
| 51 | + |
| 52 | + <li> |
| 53 | + <a href="/basics/installation">Installation</a> |
| 54 | + </li> |
| 55 | + |
| 56 | + <li> |
| 57 | + <a href="/basics/usage">Usage</a> |
| 58 | + </li> |
| 59 | + |
| 60 | + <li> |
| 61 | + <a href="/basics/configfile">Config File</a> |
| 62 | + </li> |
| 63 | + |
| 64 | + </ul> |
| 65 | + </section> |
| 66 | + |
| 67 | + <section> |
| 68 | + <h3>Guides</h3> |
| 69 | + <ul> |
| 70 | + |
| 71 | + <li> |
| 72 | + <a href="/guides/deploy">Deployement</a> |
| 73 | + </li> |
| 74 | + |
| 75 | + </ul> |
| 76 | + </section> |
| 77 | + |
| 78 | + <section> |
| 79 | + <h3>Links</h3> |
| 80 | + <ul> |
| 81 | + |
| 82 | + <li> |
| 83 | + <a href="https://github.com/codeshaine/vulpix">Github</a> |
| 84 | + </li> |
| 85 | + |
| 86 | + <li> |
| 87 | + <a href="https://x.com/code_shaine">Twitter</a> |
| 88 | + </li> |
| 89 | + |
| 90 | + </ul> |
| 91 | + </section> |
| 92 | + |
| 93 | + </div> |
| 94 | + </nav> |
| 95 | + <main class="content"> |
| 96 | + <h1>Configuration file</h1> |
| 97 | + <p>As of right now config file of vulpix is very minmal. you don't get lot of features like you get from feature rich ssg like hugo or even the astro starlight. This ssg is simple, minimal and was designed for me</p> |
| 98 | +<p>Unlike other SSGs I am using YAML format as the config type, because It is more elegant to look at.</p> |
| 99 | +<p>config file:</p> |
| 100 | +<pre><code class="language-yaml">title: Vulpix |
| 101 | +domain: doc.vulpix.com # (optional) |
| 102 | +description: this is the docs of your vulpix |
| 103 | +handle: https://x.com/codeshaine |
| 104 | +source: doc/src |
| 105 | +build: dist |
| 106 | +sidebar: |
| 107 | + - title: Basics |
| 108 | + pages: |
| 109 | + - - Getting started |
| 110 | + - /getting_started/installation |
| 111 | + - title: Links |
| 112 | + pages: |
| 113 | + - - Github |
| 114 | + - https://github.com/codeshaine |
| 115 | + - - Twitter |
| 116 | + - https://x.com/code_shaine |
| 117 | +</code></pre> |
| 118 | +<p>The config file is more self exploratory.</p> |
| 119 | +<ul> |
| 120 | +<li>title, domain, description, handle are used for the meta info of the site.</li> |
| 121 | +<li>note that title used as main logo</li> |
| 122 | +<li>source and build direcory is the path of your source and build that you want to generate</li> |
| 123 | +<li>sidebar is the main feature available here like other SSGs. This follow a list of object so you can have flexibility |
| 124 | +these are all the main features and characterstics</li> |
| 125 | +</ul> |
| 126 | + |
| 127 | + </main> |
| 128 | + <script> |
| 129 | + function toggleTheme() { |
| 130 | + const html = document.documentElement; |
| 131 | + const toggleBtn = document.getElementById("themeToggle"); |
| 132 | + if (html.getAttribute("data-theme") === "dark") { |
| 133 | + html.removeAttribute("data-theme"); |
| 134 | + toggleBtn.textContent = "🌙"; |
| 135 | + localStorage.setItem("theme", "light"); |
| 136 | + } else { |
| 137 | + html.setAttribute("data-theme", "dark"); |
| 138 | + toggleBtn.textContent = "☀️"; |
| 139 | + localStorage.setItem("theme", "dark"); |
| 140 | + } |
| 141 | + } |
| 142 | + |
| 143 | + |
| 144 | + const mobileNavToggle = document.getElementById("mobileNavToggle"); |
| 145 | + const sidebar = document.getElementById("sidebar"); |
| 146 | + const mobileOverlay = document.getElementById("mobileOverlay"); |
| 147 | + |
| 148 | + function toggleMobileNav() { |
| 149 | + sidebar.classList.toggle("open"); |
| 150 | + mobileOverlay.classList.toggle("active"); |
| 151 | + |
| 152 | + |
| 153 | + if (sidebar.classList.contains("open")) { |
| 154 | + mobileNavToggle.textContent = "✕"; |
| 155 | + } else { |
| 156 | + mobileNavToggle.textContent = "☰"; |
| 157 | + } |
| 158 | + } |
| 159 | + |
| 160 | + function closeMobileNav() { |
| 161 | + sidebar.classList.remove("open"); |
| 162 | + mobileOverlay.classList.remove("active"); |
| 163 | + mobileNavToggle.textContent = "☰"; |
| 164 | + } |
| 165 | + |
| 166 | + |
| 167 | + mobileNavToggle.addEventListener("click", toggleMobileNav); |
| 168 | + mobileOverlay.addEventListener("click", closeMobileNav); |
| 169 | + |
| 170 | + |
| 171 | + sidebar.addEventListener("click", (e) => { |
| 172 | + if (e.target.tagName === "A" && window.innerWidth <= 768) { |
| 173 | + closeMobileNav(); |
| 174 | + } |
| 175 | + }); |
| 176 | + |
| 177 | + |
| 178 | + window.addEventListener("resize", () => { |
| 179 | + if (window.innerWidth > 768) { |
| 180 | + closeMobileNav(); |
| 181 | + } |
| 182 | + }); |
| 183 | + |
| 184 | + |
| 185 | + (function () { |
| 186 | + const savedTheme = localStorage.getItem("theme"); |
| 187 | + if (savedTheme === "dark") { |
| 188 | + document.documentElement.setAttribute("data-theme", "dark"); |
| 189 | + document.getElementById("themeToggle").textContent = "☀️"; |
| 190 | + } |
| 191 | + })(); |
| 192 | + </script> |
| 193 | + </body> |
| 194 | +</html> |
0 commit comments