Skip to content

A minimal theme for the Allwrite API with zero dependencies.

Notifications You must be signed in to change notification settings

LevInteractive/spartan-allwrite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spartan

This is a minimal theme for Allwrite Docs. It has zero dependencies and is built for speed.

You can use the latest and greatest libraries (react, redux, etc) with allwrite, but the goal of this library is to minimal, fast, and not require compilation to run.

Local Demo

Once you have a local or remote allwrite server running, simply cd to /express-example and run npm install and then npm start.

To use:

Step 1

Add the following div:

<div
  id="allwrite-docs"
  class="allwrite-docs"
  data-root="/my/docs/path"
  data-api="http://localhost:8000"></div>
  • data-api should be your allwrite instance.
  • data-root is optional if your serving docs from the root. However, if you're serving from a base slug like /docs, then you'll need to set that to the base.

Step 2

Then add the app.js and include the css and adjust to your liking. You'll also need to add highlight.js (as seen in index.html) if you want code highlighting.

SEO

Spartan is a single-page-app and makes use of the html5 history API. This is awesome for performance, but isn't great for SEO. However, you can use middleware to render the content on the server as seen in the express-example.

Middleware

About

A minimal theme for the Allwrite API with zero dependencies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published