A Publish theme. ckitakishi.com is built with PaletteTheme

Overview

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 Markdown description
  • Table of contents
  • Support comments
  • ...

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(
    ...
    dependencies: [
        .package(url: "https://github.com/Ckitakishi/PaletteTheme.git", from: "0.1.0"),
    ],
    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:

// Define all sections here.
enum SectionID: String, WebsiteSectionID {
    case home
    case posts
    ...
        
    var pageConfig: PalettePage {
        switch self {
        case .home:
            return .init(
                id: self.rawValue,  // Should be unique
                title: "Home",      // Section title shown on navigation bar
                link: "/",          // The path of section
                isIndex: true       // Represents whether an item is for home page, default is `false`
            )
        case .posts:
            return .init(
                id: self.rawValue,
                title: "Writing",
                link: "/posts"
            )
        ...
        }
    }
}

// Make your blog comform `PaletteCustomizable` protocol.
extension YourBlog: PaletteCustomizable {
    var pages: [PalettePage] {
        SectionID.allCases.map { $0.pageConfig }
    }
}

Description

Description supports Markdown syntax as well.

var description = """
XXX is an iOS developer who has made [project 1](project1.link).
"""

Social items

You can get social icon support by simply comform the PaletteCustomizable protocol and defining social items as following:

extension CkitakishiPlayground: PaletteCustomizable {
    var socialItems: [SocialItem] {
        [
            .init(url: "link", type: .github),
            .init(url: "link", type: .twitter),
            .init(url: "address", type: .email),
        ]
    }
}

Others

Set the path to the profile icon if needed, this property is optional.

var profileIconPath: URLRepresentable? { "url" }

The copyright is shown in the footer.

var copyright: String { get }

License

PaletteTheme is licensed under the MIT license. Check the LICENSE file for details.

Special thanks

Special thanks to the following project:

You might also like...
A publish/subscribe EventBus optimized for iOS

SwiftEventBus Allows publish-subscribe-style communication between components without requiring the components to explicitly be aware of each other Fe

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer documentation.

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer docum

SocialButtons - A plugin for Publish that allows you to easily embed social buttons (e.g. Tweet button) in your site

SocialButtons A plugin for Publish that allows you to easily embed social button

PerFolderResourcesPublishPlugin - Per-folder resources plugin for the Publish package

Per-folder resources for Publish A Publish plugin that copies per-folder resourc

FlexibleImage is implemented with the hope that anyone could easily develop an app that provides features such as Camera Filter and Theme.
FlexibleImage is implemented with the hope that anyone could easily develop an app that provides features such as Camera Filter and Theme.

FlexibleImage is implemented with the hope that anyone could easily develop an app that provides features such as Camera Filter and Theme. When you wr

🎨 Powerful theme/skin manager for iOS 9+ 主题/换肤, 暗色模式
🎨 Powerful theme/skin manager for iOS 9+ 主题/换肤, 暗色模式

Introduction - Demos - Installation - Documents - FAQ - Contribution - 中文文档 Screenshot Running:open SwiftTheme.xcworkspace, run target PlistDemo Intro

👕👚 Theme management in Swift
👕👚 Theme management in Swift

Themes Story Ever want to support Night mode? Or skin the app differently depending on the seasons? Or toggle features according to paid status? Well,

🧛🏻‍♂️ Dark theme for SwiftUI
🧛🏻‍♂️ Dark theme for SwiftUI

Dracula for SwiftUI A dark theme for SwiftUI. Install All instructions can be found at draculatheme.com/swiftui. Team This theme is maintained by the

An unintrusive & light-weight iOS app-theming library with support for animated theme switching.
An unintrusive & light-weight iOS app-theming library with support for animated theme switching.

Gestalt Gestalt is an unintrusive and light-weight framework for application theming with support for animated theme switching. Usage Let's say you wa

SwiftUI module library for adding seasons theme animations to your app
SwiftUI module library for adding seasons theme animations to your app

HolidayThemes SwiftUI module library for adding seasons theme animations to your app. Requirements iOS 13.0+ Xcode 12.0+ Installation Swift Package Ma

A very simple soundboard that plays the first 5 seconds of the CSI Miami theme (YEAAAAAAAAAA)

MiamiSunglasses This app is a single-sound soundboard that plays the first few seconds of the CSI Miami theme song when you press the sunglasses. Disc

This repository contains 🎨 My Xcode theme that I use. It is compatible with all versions of Xcode.
This repository contains 🎨 My Xcode theme that I use. It is compatible with all versions of Xcode.

DRL Xcodetheme Installation Automatic (via script) ./install.sh which will install the file in Xcode FontAndColorThemes directory. Restart Xcode Go t

Theme handling macOS Appkit (Swift/Objective-C)

DSFAppearanceManager A class for simplifying macOS appearance values and detecting setting changes (Swift/Objective-C). Why? If you're performing cust

A powerful lightweight theme 🎨 manager for SwiftUI
A powerful lightweight theme 🎨 manager for SwiftUI

SwiftTheming 🎨 is a handy lightweight handy theme manager which handles multiple themes based on system-wide appearances - light and dark appearances

Solarized Dark Theme for Xcode. Compatible with all modern versions of Xcode since 2013!
Solarized Dark Theme for Xcode. Compatible with all modern versions of Xcode since 2013!

Solarized Dark for Xcode Note I've moved away from using Solarized to a Night-Shift/Dark-Mode-friendly palette of my own creation; Cognac. It's availa

RippleQueries is an iOS application built as assessment task at Ripple Egypt. Built Using MVVM (Model-View-ViewModel) and Clean Architecture concepts
RippleQueries is an iOS application built as assessment task at Ripple Egypt. Built Using MVVM (Model-View-ViewModel) and Clean Architecture concepts

RippleRepositories RippleRepositories is an iOS application built as an assessment task at Ripple Egypt. Built Using RxSwift & MVVM (Model-View-ViewMo

E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy.
E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy.

Touchdown-SwiftUI E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy. Main components and concepts used: @EnvironmentOb

MessengerKit is a drop-in UI for messenger interfaces on iOS built in Swift
MessengerKit is a drop-in UI for messenger interfaces on iOS built in Swift

About MessengerKit is a drop-in UI for messenger interfaces on iOS built in Swift. Centred around a single UIViewController, MessengerKit is themeable

Owner
Yuhan Chen
👩‍💻 iOS developer
Yuhan Chen
👕👚 Theme management in Swift

Themes Story Ever want to support Night mode? Or skin the app differently depending on the seasons? Or toggle features according to paid status? Well,

Khoa 238 Dec 26, 2022
This repository contains 🎨 My Xcode theme that I use. It is compatible with all versions of Xcode.

DRL Xcodetheme Installation Automatic (via script) ./install.sh which will install the file in Xcode FontAndColorThemes directory. Restart Xcode Go t

durul dalkanat 19 Oct 21, 2022
Theme handling macOS Appkit (Swift/Objective-C)

DSFAppearanceManager A class for simplifying macOS appearance values and detecting setting changes (Swift/Objective-C). Why? If you're performing cust

Darren Ford 8 Nov 1, 2022
A powerful lightweight theme 🎨 manager for SwiftUI

SwiftTheming ?? is a handy lightweight handy theme manager which handles multiple themes based on system-wide appearances - light and dark appearances

Dscyre Scotti  38 Dec 29, 2022
Solarized Dark Theme for Xcode. Compatible with all modern versions of Xcode since 2013!

Solarized Dark for Xcode Note I've moved away from using Solarized to a Night-Shift/Dark-Mode-friendly palette of my own creation; Cognac. It's availa

Arthur Ariel Sabintsev 365 Nov 25, 2022
Publish–subscribe design pattern implementation framework, with an ability to publish events by topic.

TopicEventBus Publish–subscribe design pattern implementation framework, with ability to publish events by topic. (NotificationCenter extended alterna

Matan Abravanel 55 Nov 29, 2021
Publish–subscribe design pattern implementation framework, with an ability to publish events by topic.

TopicEventBus Publish–subscribe design pattern implementation framework, with ability to publish events by topic. (NotificationCenter extended alterna

Matan Abravanel 55 Nov 29, 2021
SwiftEventBus - A publish/subscribe EventBus optimized for iOS

Allows publish-subscribe-style communication between components without requiring the components to explicitly be aware of each other

César Ferreira 1k Jan 6, 2023
TopicEventBus is Easy to use, type safe way of implementing Publish–subscribe design pattern.

TopicEventBus Publish–subscribe design pattern implementation framework, with ability to publish events by topic. (NotificationCenter extended alterna

Matan Abravanel 55 Nov 29, 2021
Publish and discover services using Bonjour

Ciao Lib to publish and find services using mDNS Requirements Installation Usage License Requirements iOS 8.0+ / Mac OS X 10.10+ / tvOS 9.0+ Xcode 9.0

Alexandre Mantovani Tavares 55 Dec 14, 2022