GithubHelp home page GithubHelp logo

ttskch / vuepress-theme-blog-vuetify Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 10.0 11.62 MB

πŸ’₯The world's most simple, beautiful and customizable 2 columns VuePress blog theme built with Vuetify

Home Page: https://vuepress-theme-blog-vuetify.ttskch.com/

License: MIT License

Vue 3.53% JavaScript 2.64% CSS 92.31% SCSS 1.52%
vue vuepress vuepress-theme blog blog-theme

vuepress-theme-blog-vuetify's Introduction

vuepress-theme-blog-vuetify

πŸ’₯The world's most simple, beautiful and customizable 2 columns VuePress blog theme built with Vuetify.

It has following features.

  • List hot tags automatically
  • List recent posts automatically
  • Scroll-spy TOC
  • SEO ready (perfect <title> and <meta> tags)
  • Mobile friendly
  • Customizable styles using scss (not stylus)
  • Ability of inserting your own content into the layout of the theme

Live demo

πŸ‘‰ https://vuepress-theme-blog-vuetify.ttskch.com/

Installation

$ yarn add --dev vuepress-theme-blog-vuetify

# or
$ npm install -D vuepress-theme-blog-vuetify

Usage

// .vuepress/config.js
module.exports = {
  theme: 'blog-vuetify',
  themeConfig: {
    // ...
  }
}

Configurations

You can see the valid options and default values here πŸ‘

Customizing styles

You can customize styles flexibly by overwrite scss variables.

In order to overwrite them, you have to just place .vuepress/styles/variables.scss which re-defines some variables like this πŸ‘

Inserting your own content into the layout of the theme

You can insert your own content like as following.

1. Create Vue component

For example, create .vuepress/components/AfterPage.vue like following.

<template>
  <div id="after-page">
    <p>Some content for after page content of each page</p>
  </div>
</template>

2. Create enhanceApp.js and register your component to Vue app

import AfterPage from './components/AfterPage'

// @see https://vuepress.vuejs.org/theme/writing-a-theme.html#app-level-enhancements
export default ({
  Vue, // the version of Vue being used in the VuePress app
  options, // the options for the root Vue instance
  router, // the router instance for the app
  siteData // site metadata
}) => {
  Vue.component('MyAfterPage', AfterPage)
}

3. Notify the name of your component to the theme

themeConfig: {
  components: {
    afterPage: 'MyAfterPage'
  }
}

That's it πŸ˜ƒ

Default (empty) components for valid hook points are them.

vuepress-theme-blog-vuetify's People

Contributors

ttskch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vuepress-theme-blog-vuetify's Issues

How should I redevelop the project?

Hello,
I really like this project, but the layout is different from what I want, how should I start debugging locally? I don't see any instructions that can be used.
Thanks.

want to remove concrete package list from building process of example blog

npm install --no-save \
@fortawesome/fontawesome-free \
@mdi/font \
@vuepress/plugin-blog \
@vuepress/plugin-google-analytics \
@vuepress/plugin-medium-zoom \
@vuepress/plugin-nprogress \
@vuepress/plugin-search \
dayjs \
lodash \
remove-markdown \
sass \
sass-loader \
vue-scrollactive \
vuepress \
vuepress-plugin-seo \
vuetify

npm uninstall \
@fortawesome/fontawesome-free \
@mdi/font \
@vuepress/plugin-blog \
@vuepress/plugin-google-analytics \
@vuepress/plugin-medium-zoom \
@vuepress/plugin-nprogress \
@vuepress/plugin-search \
dayjs \
lodash \
remove-markdown \
sass \
sass-loader \
vue-scrollactive \
vuepress \
vuepress-plugin-seo \
vuetify

maybe https://github.com/npm/read-package-json is good

escape html tags in page title

if we use some html tags in page title, it will not be rendered.

---
title: "title with <html> tag"
---

some posts with frontmatter like above will be rendered as following.

title with tag

Including npm package with Vuetify dependency overrides/resets styling

Hello,

first of all thanks for this great template! Really like it so far.
However, I am experiencing a strange problem:

If I include a component from npm that uses Vuetify itself (for example: v-stripe-elements, but also others), then the blog styling is overridden with default Vuetify styling.
For example: font-size

If I inspect rendered font-size CSS on a normal page (without npm component), it shows correctly 15px:

  • font-size: 15px (from _variables.scss, imported in BaseLayout.vue in blog repo)
  • font-size: 16px (from default Vuetify style vuetify.css in blog repo)
    image

But, if I go to a page where a external npm component is used, it shows 16px:

  • font-size: 16px (from default Vuetify style main.sass in Vuetify package!)
  • font-size: 15px (from _variables.scss, imported in BaseLayout.vue in blog repo)
  • font-size: 16px (from default Vuetify style vuetify.css in blog repo)
    image

I have tried for many hours finding the issue, also tested in new projects with Vuetify, couldn't reproduce the problem. Every time I import it to an other Vuetify project, it works. If I import it here into vuepress-theme-blog-vuetify, it "breaks" the style (resets to default Vuetify style), and the whole layout is broken (containers, font sizes, font families, etc.).

Do you have an idea what happens here? Maybe something with the way how styles are imported in vuepress-theme-blog-vuetify?

I would be very very happy for any help! 😊

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.