Coder Social home page Coder Social logo

wiki-js-kaspa's Introduction

WikiJS Theme for Kaspa Wiki

A theme for the Official Kaspa Wiki.

Supports light & dark mode.

๐Ÿ’ก You can enable Dark/Light Mode by signing into your free wiki account on wiki.kaspa.org and under "Preferences" edit your "Appearance" setting to your choice.

Screenshots

Light Mode

Dark Mode


Installation

You can use the theme directly by copying the compiled theme into your WikiJS instance.

  1. Login with an administrator account and navigate to Administration (top right gear), then "Themes".
  2. Paste this CSS into the "CSS Override" textbox.
  3. Then click Apply.

install

๐Ÿ’ก This is not a theme "package", instead it is provided as simple CSS overrides to the standard WikiJS theme.

Development

These instructions assume you are running a modern x86 linux OS. You will need to adapt them accordingly to your OS if you are running something different.

To build the theme, you'll need sass and esbuild.
To install these on a linux system for all users, you can run the following as root:

curl -L "https://github.com/sass/dart-sass/releases/download/1.69.5/dart-sass-1.69.5-linux-x64.tar.gz" \
  -o /tmp/dart-sass.tar.gz \
  && tar -xzf /tmp/dart-sass.tar.gz -C /tmp/ \
  && rm -rf /usr/share/dart-sass \
  && mv -f /tmp/dart-sass /usr/share/ \
  && chown root:root -R /usr/share/dart-sass \
  && echo "export PATH=\$PATH:/usr/share/dart-sass" >> /etc/profile
curl -L "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.4.tgz" \
  -o /tmp/esbuild.tar.gz \
  && tar -xzf /tmp/esbuild.tar.gz -C /tmp/ \
  && mv -f /tmp/package/bin/esbuild /usr/bin \
  && chown root:root -R /usr/bin/esbuild

To build the theme, cd into theme/ and then run either the build script build.sh or execute commands separately:

sass --no-source-map kaspa-wiki.scss publish/wiki.css
esbuild kaspa-wiki.js --bundle --outfile=publish/wiki.js --format=iife

Optionally you can instead affix the --watch argument to these commands to watch the theme files for changes and automatically have them recompiled.

Testing in a Local WikiJS

Docker is used to spin up a test instance of WikiJS. You can then configure and test the theme without impacting live systems.

You'll want to create a peristent data folder for the docker wikiJS database:

mkdir data && chmod 777 data

Then you can run the wikijs docker image in two ways:

Either in daemon mode:

docker run -d -p 8080:3000 --name wikijs --restart unless-stopped -e DB_TYPE=sqlite -e DB_FILEPATH=/srv/db.sqlite -v "$(pwd)/data:/srv:rw" requarks/wiki

or on your current terminal:

docker run -p 8080:3000 --name wikijs --restart unless-stopped -e DB_TYPE=sqlite -e DB_FILEPATH=/srv/db.sqlite -v "$(pwd)/data:/srv:rw" requarks/wiki

wiki-js-kaspa's People

Contributors

thuun avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.