Coder Social home page Coder Social logo

soulsam480 / rengoku Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 3.0 8.34 MB

A simple, minimal and light-weight Vitepress blog theme inspired by Flame Hasira Kyōjurō Rengoku.

Home Page: https://rengoku.sambitsahoo.com/

License: MIT License

JavaScript 2.50% Vue 61.23% TypeScript 32.00% SCSS 2.24% HTML 2.03%
vite theme vue demon-slayer rengoku vitepress vitepress-blog

rengoku's Introduction

Rengoku

Rengoku banner

A Vitepress blog theme inspired from Flame Hashira Kyōjurō Rengoku.

In active development. New features are possible to arrive.

Installation

Instead of publishing this theme to npm, I prefer to clone it from the theme branch, so that you can customize the theme easily according to your liking.

  • Scaffold the theme branch
git clone https://github.com/soulsam480/rengoku.git
# or
npx degit soulsam480/rengoku#theme my-rengoku-directory
  • Install dependencies
cd my-rengoku-directory
yarn # or npm install
  • Run the dev server
yarn dev
  • Build for production
yarn build
yarn serve # to preview built files in a browser

Home page

The content/index.md file serves as the home page of the theme. It's critical that you don't change the name of the content directory.

Frontmatter variables

The home page has some specific frontmatter variables by using them you can enable some features.

---
hero: true
heroImage: /rengoku_banner.webp
heroQuote: Go ahead and live with your head held high. No matter how devastated you may be by your own weakness or uselessness, set your heart ablaze. Grit your teeth and look straight ahead.
heroName: Kyōjurō Rengoku
---

By setting the hero variable to false you can disble the default hero banner layout of the homepage. Only when it's set to false, the markdown content of the index.md file will be visible on the homepage.

Blog feed on home page

To show your blog feed on home page, set feedOnHomepage true in content/.vitepress/config.js.

Writing blog articles

The content/blog directory is used to store blog articles and it's critical that you don't change the name of the directory. Also the presence of content/blog/index.md is also mandatory as the blog listing is rendered on that page. All the other files in the content/blog directory except the content/blog/index.md are treated as blog articles and will be loaded with metadata for blog listing.

Frontmatter variables for blog articles

The blog articles use some pre-defined frontmatter variables for specific features.

---
title: Rengoku - a vitepress theme. # MANDATORY - Article title
description: A vitepress theme inspired by Flame Hashira Kyōjurō Rengoku. # MANDATORY - A description under 200 words, exceeding length will be truncated
date: 2021-05-10 # MANDATORY - Article date in YYYY-MM-DD format
banner: /rengoku_banner.webp # article banner, loaded from content/public directory
author: 
   name: Sambit Sahoo
   github: soulsam480 # github username
tags: welcome,rengoku,introduction # comma separated values with no space in between
---

Along with these variables, vitepress specific variables can also be used see.

Blog article tags

To get full support for tags in blog articles, create content/tags.md. This page will be used to render tag specific articles when clicked on a tag. Tags for an article can be added by using the pre-defined frontmatter variable tags in blog article files.

---
tags: welcome,rengoku,introduction # comma separated values with no space in between
---

Images

To use images inside blog aricles, put them in the content/public directory and reference them by absolute paths e.g. /rengoku_banner.webp.

Comments

Rengoku uses cusdis for comment system. Change app_id in cinfig.js to setup your account for comments.

Theme config

Theme config can be referenced from content/.vitepress/theme/config.ts.

export namespace DefaultTheme {
  export interface Config {
    /**
     * Show posts feed on home
     * @default false
     */
    feedOnHomepage?: boolean;
    /**
     * Nav items on the Nav bar
     * max array length 3
     */
    nav?: Nav[];
    /**
     * Split row in blog listing page into two column layout
     *
     * can also be enabled from  `content/blog/index.md` , e.g.
     * ```yaml
     * ---
     * splitRow: true
     * ---
     * ```
     * @default false
     */
    splitRow?: boolean;
  }
  export type Nav = {
    /**
     * link - url of page
     */
    link?: string;
    /**
     * text - nav label
     */
    text?: string;
  };
}

Inspirations

From the amazing work behind

rengoku's People

Contributors

soulsam480 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.