<spanclass=toggle-dark><svgxmlns="http://www.w3.org/2000/svg"width="20"height="20"viewBox="0 0 24 24"fill="none"stroke="currentcolor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="feather feather-moon"><pathd="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg></span><spanclass=toggle-light><svgxmlns="http://www.w3.org/2000/svg"width="20"height="20"viewBox="0 0 24 24"fill="none"stroke="currentcolor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="feather feather-sun"><circlecx="12"cy="12"r="5"/><linex1="12"y1="1"x2="12"y2="3"/><linex1="12"y1="21"x2="12"y2="23"/><linex1="4.22"y1="4.22"x2="5.64"y2="5.64"/><linex1="18.36"y1="18.36"x2="19.78"y2="19.78"/><linex1="1"y1="12"x2="3"y2="12"/><linex1="21"y1="12"x2="23"y2="12"/><linex1="4.22"y1="19.78"x2="5.64"y2="18.36"/><linex1="18.36"y1="5.64"x2="19.78"y2="4.22"/></svg></span></button><ulclass="navbar-nav social-nav order-3 order-md-5"><liclass=nav-item><aclass=nav-linkhref=https://gitea.arsenm.dev/Arsen6331><spanclass=iconifydata-icon=cib:giteadata-inline=false></span><spanclass="ml-2 sr-only">Gitea</span></a></li><liclass=nav-item><aclass=nav-linkhref=https://gitlab.com/moussaelianarsen><spanclass=iconifydata-icon=fa-brands:gitlabdata-inline=false></span><spanclass="ml-2 sr-only">GitLab</span></a></li></ul><divclass="collapse navbar-collapse order-4 order-md-1"><ulclass="navbar-nav main-nav mr-auto order-5 order-md-2"><liclass=nav-item><aclass=nav-linkhref=/>Home</a></li><liclass="nav-item active"><aclass=nav-linkhref=/docs/>Docs</a></li></ul><divclass="break order-6 d-md-none"></div><formclass="navbar-form flex-grow-1 order-7 order-md-3"><inputid=userinputclass="form-control is-search"type=searchplaceholder="Search docs..."aria-label="Search docs..."autocomplete=off><divid=suggestionsclass="shadow bg-white rounded"></div></form></div></div></header><divclass="wrap container"role=document><divclass=content><divclass="row flex-xl-nowrap"><divclass="col-lg-5 col-xl-4 docs-sidebar"><navclass=docs-linksaria-label="Main navigation"><h3>Docs</h3><ulclass=list-unstyled><li><aclass=docs-linkhref=/docs/advmake/>AdvMake Docs</a></li><li><aclass=docs-linkhref=/docs/kbdemu/>KbdEmu Docs</a></li><li><aclass=docs-linkhref=/docs/opensend/>OpenSend Docs</a></li><li><aclass=docs-linkhref=/docs/pak/>Pak Docs</a></li><li><aclass=docs-linkhref=/docs/simpledash/>Simpledash Docs</a></li></ul></nav></div><navclass="docs-toc d-none d-xl-block col-xl-3"aria-label="Secondary navigation"><divclass=page-links><h3>On this page</h3><navid=TableOfContents><ul><li><ahref=#flags>Flags</a></li><li><ahref=#config-file>Config file</a><ul><li><ahref=#title>Title</a></li><li><ahref=#theme>Theme</a></li><li><ahref=#loginrequired>LoginRequired</a></li><li><ahref=#session>Session</a></li><li><ahref=#users>Users</a></li><li><ahref=#cards>Cards</a></li></ul></li></ul></nav></div></nav><mainclass="docs-content col-lg-11 col-xl-9 mx-xl-auto"><ahref=..>⇐ Simpledash Docs</a><h1style=margin-top:.2rem>Configuration</h1><pclass=lead></p><h2id=flags>Flags<ahref=#flagsclass=anchoraria-hidden=true>#</a></h2><p>Simpledash can be run using the simpledash binary directly, or for convenience, using <code>advmake run</code>.</p><p>If using the binary directly, the listen IP, port, etc. can be configured via flags.</p><p>This is the help screen of simpledash:</p><divclass=highlight><preclass=chroma><codeclass=language-textdata-lang=text>Usage of ./simpledash:
-a, --addr ip Bind address for HTTP server (default 0.0.0.0)
-p, --port int Bind port for HTTP server (default 8080)
simpledash: help requested
</code></pre></div><p>The default address of simpledash is <code>0.0.0.0:8080</code> meaning any origin IP on any interface, port 8080.</p><p>The <code>--hash</code> option creates a suitable bcrypt password hash for use in the config, prints it, and exits.</p><h2id=config-file>Config file<ahref=#config-fileclass=anchoraria-hidden=true>#</a></h2><p>Simpledash is configured using a TOML configuration file (simpledash.toml by default). It contains the users, cards, etc.</p><p>An example file is provided in the simpledash repository. It contains examples of all the card types in simpledash.</p><p>This is the example:</p><divclass=highlight><preclass=chroma><codeclass=language-tomldata-lang=toml><spanclass=nx>title</span><spanclass=p>=</span><spanclass=s2>"SimpleDash"</span>
</code></pre></div><h3id=title>Title<ahref=#titleclass=anchoraria-hidden=true>#</a></h3><p>The title field sets the name of the website which will be used in all mentions including title tags and headers.</p><h3id=theme>Theme<ahref=#themeclass=anchoraria-hidden=true>#</a></h3><p>The theme can either be dark or light. The dark theme was generated using darkreader.</p><h3id=loginrequired>LoginRequired<ahref=#loginrequiredclass=anchoraria-hidden=true>#</a></h3><p>The loginRequired field denotes whether login is required to view the dashboard. If <code>false</code>, public cards will be viewable without logging in.</p><h3id=session>Session<ahref=#sessionclass=anchoraria-hidden=true>#</a></h3><p>The session section contains one field, <code>name</code>. This field is the name of the session cookie set in the browser upon visiting simpledash.</p><h3id=users>Users<ahref=#usersclass=anchoraria-hidden=true>#</a></h3><p>The <code>users</code> section contains all users and their associated cards. A user can be defined like so:</p><divclass=highlight><preclass=chroma><codeclass=language-tomldata-lang=toml><spanclass=p>[</span><spanclass=nx>users</span><spanclass=p>.</span><spanclass=nx>admin</span><spanclass=p>]</span>
</code></pre></div><p>The <code>passwordHash</code> field contains a hash as created by the <code>--hash</code> flag.</p><p>The <code>showPublic</code> field is a boolean denoting whether to show public cards as well when logged in.</p><h3id=cards>Cards<ahref=#cardsclass=anchoraria-hidden=true>#</a></h3><p>Cards reside under their respective user in the config file. A card can be defined like so:</p><divclass=highlight><preclass=chroma><codeclass=language-tomldata-lang=toml><spanclass=p>[[</span><spanclass=nx>users</span><spanclass=p>.</span><spanclass=nx>admin</span><spanclass=p>.</span><spanclass=nx>card</span><spanclass=p>]]</span>
</code></pre></div><p>The cards contain various fields, some required, some not:</p><ul><li><code>type</code>: The type of the card. (required)</li><li><code>title</code>: The title of the card to be used in the header. (required)</li><li><code>icon</code>: The icon to be used in various places depending on the card. Icons can be anything from <ahref=https://iconify.design>iconify</a>.</li><li><code>desc</code>: The description of the card’s content.</li><li><code>url</code>: The URL of the card to be used for various purposes depending on the card.</li><li><code>data</code>: A dictionary containing any extra data not listed above.</li></ul><p>Card types can be added simply by adding a file to <code>resources/templates/cards</code>. The name of the file will be used as the name of the card type</p></main></div></div></div><scriptsrc=/main.f6b484f556ad1f3bcf6061082139a2f21fa759f13930c39a25fe4a9f78f35e64122c2d86dffd56e67b292dabbda4095d8077194f196e0e348441c106a9f3d40e.jsintegrity="sha512-9rSE9VatHzvPYGEIITmi8h+nWfE5MMOaJf5Kn3jzXmQSLC2G3/1W5nspLau9pAldgHcZTxluDjSEQcEGqfPUDg=="crossorigin=anonymousdefer></script><scriptsrc=/index.min.519647b94aaacaa6fa73ffc9e4bda4ccc0d6ab69b03000caea7466a9dc6806cf38f9d8c6926c09e49970a5fe43183e0d589a028bbf3b8ef0ef5c98fc6fb78206.jsintegrity="sha512-UZZHuUqqyqb6c//J5L2kzMDWq2mwMADK6nRmqdxoBs84+djGkmwJ5Jlwpf5DGD4NWJoCi787jvDvXJj8b7eCBg=="crossorigin=anonymousdefer></script></body></html>