Skip to content

Ckitakishi/PaletteTheme

Repository files navigation

PaletteTheme

A Publish theme. ckitakishi.com is built with PaletteTheme.

Features

  • Simple and fast
  • Mobile friendly
  • Support both Light/Dark mode
  • Customisable & Extendable
  • Archive articles by year
  • Social items
  • Support comments system
  • Support Google Analytics
  • ...

Screenshot

Desktop Mobile
desktop-screenshot mobile-screenshot

Requirements

Swift version 5.5 (or later)

Quick start

Installation

PaletteTheme is distributed using the Swift Package Manager. To use it into a project, just add the following code to your Package.swift file:

let package = Package(
    ...
    platforms: [.macOS(.v12)],
    dependencies: [
        .package(url: "https://github.com/Ckitakishi/PaletteTheme.git", from: "0.2.3"),
    ],
    targets: [
        .target(
            name: "YourBlog",
            dependencies: ["PaletteTheme"]
        )
    ]
    ...
)

Usage

Import PaletteTheme wherever you’d like to use it:

import PaletteTheme

Configuration

Use theme .palette to generate HTML:

try YourBlog().publish(using: [
    ...
    .generateHTML(withTheme: .palette),
    ...
])

Sections

Add the sections that you want your website to contain in SectionID enum. And you can customize the section by initializing PalettePage like below: