kxj Svelte Themes

Kxj

Blog in sveltekit

KxJ is a simple blog in SvelteKit.

Features

  • Supports markdown. Obviously.
  • Uses adaptor-static.

Configuration variables

The configuration variables are stored in \src\lib\data\kxjConfig.json. The following are supported.

Variable Usage
show_draft true will show all draft articles. Absence of the variable or any value other than true will hide. In dev environment it will always default to true.
email Your email, if configured will show up in the Socials side bar.
twitter Your twitter handle, if configured will show up in the Socials side bar.
github Your github handle, if configured will show up in the Socials side bar.

Howto Use

Adding articles

Articles will go into the articles directory. Files should have an extension of .md.

Images used within these markdown files should go into the \static\images folder.

If the images are hosted elsewhere then the complete url should be in the markdown file.

Here is an image from the \static\images folder.

![A screenshot from debian home page](/static/images/screenshot.png)

Here is an image linked from an external url.

![The Sheep](https://images.unsplash.com/photo-1730406851326-808a50bac63a?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)

Code highlighting can be done like so in markdown files:

```js
var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.end('Hello World!');
}).listen(8080); 
```

Result of the above:

var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.end('Hello World!');
}).listen(8080); 

Directory structure

|--articles           // Articles live here
|--src                // Source code
|--+static            
|    |
|    +--images        // Images used in articles or otherwise in code

TODOs

  • Responsiveness needs improvement
  • Create reusable components
  • Pagination in article listing

Roadmap

Nothing as of now. New features will be only added when it becomes impossible to live without.

Top categories

Loading Svelte Themes