Convert Figma logo to code with AI

jackhutu logojackblog-vue

Jackblog vue 版, 个人博客系统, 使用 vue2, vuex, vue-resource, vue-router, vee-validate, vue-toast 等.

1,940
455
1,940
2

Top Related Projects

207,677

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

22,531

📝 Minimalistic Vue-powered static site generator

54,472

The Intuitive Vue Framework.

25,724

Quasar Framework - Build high-performance VueJS user interfaces in record time

29,757

🛠️ webpack-based tooling for Vue.js Development

28,416

🗃️ Centralized State Management for Vue.js.

Quick Overview

Jackblog-vue is a full-stack blog application built using Vue.js for the frontend and Express.js for the backend. It demonstrates a modern, single-page application architecture with features like user authentication, article management, and commenting system.

Pros

  • Utilizes Vue.js, providing a reactive and component-based frontend architecture
  • Implements server-side rendering for improved SEO and initial load performance
  • Includes a comprehensive set of features common to blog applications
  • Demonstrates integration of frontend and backend technologies in a full-stack application

Cons

  • The project hasn't been updated recently, potentially using outdated dependencies
  • Documentation is primarily in Chinese, which may limit accessibility for non-Chinese speakers
  • Lacks detailed setup instructions or contribution guidelines in the README
  • May require significant effort to modernize and adapt to current best practices

Code Examples

<!-- Example of a Vue component for displaying an article -->
<template>
  <div class="article">
    <h1>{{ article.title }}</h1>
    <p>{{ article.content }}</p>
    <span>Author: {{ article.author }}</span>
  </div>
</template>

<script>
export default {
  props: ['article'],
}
</script>
// Example of an API call using Axios in a Vuex action
import axios from 'axios'

export const fetchArticles = ({ commit }) => {
  return axios.get('/api/articles')
    .then(response => {
      commit('SET_ARTICLES', response.data)
    })
    .catch(error => {
      console.error('Error fetching articles:', error)
    })
}
<!-- Example of using Vuex state in a component -->
<template>
  <ul>
    <li v-for="article in articles" :key="article.id">
      {{ article.title }}
    </li>
  </ul>
</template>

<script>
import { mapState } from 'vuex'

export default {
  computed: {
    ...mapState(['articles'])
  }
}
</script>

Getting Started

  1. Clone the repository:

    git clone https://github.com/jackhutu/jackblog-vue.git
    cd jackblog-vue
    
  2. Install dependencies:

    npm install
    
  3. Set up environment variables (create a .env file based on .env.example).

  4. Start the development server:

    npm run dev
    
  5. Open your browser and navigate to http://localhost:3000 to view the application.

Competitor Comparisons

207,677

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Pros of Vue

  • Much larger and more active community with over 200k stars on GitHub
  • More comprehensive documentation and learning resources
  • Wider ecosystem of plugins and tools

Cons of Vue

  • Steeper learning curve for beginners compared to Jackblog-vue
  • Potentially overkill for simple blog projects
  • Requires more setup and configuration

Code Comparison

Vue (main.js):

import { createApp } from 'vue'
import App from './App.vue'

createApp(App).mount('#app')

Jackblog-vue (main.js):

import Vue from 'vue'
import App from './App'

new Vue({
  el: '#app',
  render: h => h(App)
})

Summary

Vue is a full-featured framework suitable for large-scale applications, while Jackblog-vue is a specialized blog template. Vue offers more flexibility and power but may be more complex for simple projects. Jackblog-vue provides a ready-to-use blog solution with a gentler learning curve.

The code comparison shows that Vue uses the newer composition API, while Jackblog-vue uses the older options API. This reflects Vue's evolution and Jackblog-vue's focus on simplicity.

Choose Vue for complex applications or if you need a versatile framework. Opt for Jackblog-vue if you want a quick, pre-configured blog setup without the overhead of a full framework.

22,531

📝 Minimalistic Vue-powered static site generator

Pros of VuePress

  • Designed specifically for creating documentation sites, with built-in features for technical writing
  • Offers a default theme optimized for documentation, reducing setup time
  • Supports Vue components in Markdown, allowing for dynamic and interactive content

Cons of VuePress

  • Less flexible for general-purpose blogging compared to Jackblog-vue
  • Steeper learning curve for users not familiar with Vue.js ecosystem
  • Limited built-in features for user authentication and comments

Code Comparison

VuePress config example:

module.exports = {
  title: 'My Documentation',
  description: 'A VuePress site',
  themeConfig: {
    nav: [{ text: 'Home', link: '/' }, { text: 'Guide', link: '/guide/' }]
  }
}

Jackblog-vue route example:

export default [
  { path: '/', component: Home },
  { path: '/article/:id', component: Article },
  { path: '/admin', component: Admin, meta: { requireAuth: true } }
]

VuePress focuses on documentation structure and navigation, while Jackblog-vue provides more flexibility for custom routing and authentication.

54,472

The Intuitive Vue Framework.

Pros of Nuxt

  • More comprehensive framework with built-in server-side rendering and static site generation
  • Larger community and ecosystem, with extensive documentation and plugins
  • Regular updates and active maintenance from Vue.js core team members

Cons of Nuxt

  • Steeper learning curve due to additional concepts and configuration options
  • Potentially heavier bundle size for smaller applications
  • More opinionated structure, which may limit flexibility for some projects

Code Comparison

Jackblog-vue (Vue.js SPA approach):

import Vue from 'vue'
import App from './App.vue'
import router from './router'

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

Nuxt (Server-side rendering approach):

export default {
  asyncData({ params }) {
    return { id: params.id }
  },
  head() {
    return { title: `Post ${this.id}` }
  }
}

Jackblog-vue is a simpler Vue.js single-page application, while Nuxt provides a more structured approach with built-in server-side rendering capabilities. Nuxt offers additional features like automatic code splitting and easier SEO optimization, but may be overkill for smaller projects. Jackblog-vue is more lightweight and straightforward, making it suitable for simpler blog applications or as a starting point for custom Vue.js projects.

25,724

Quasar Framework - Build high-performance VueJS user interfaces in record time

Pros of Quasar

  • Comprehensive UI framework with a large set of pre-built components
  • Cross-platform development support (web, mobile, desktop)
  • Active community and regular updates

Cons of Quasar

  • Steeper learning curve due to its extensive feature set
  • Larger bundle size compared to minimal Vue.js setups

Code Comparison

Quasar component usage:

<template>
  <q-page>
    <q-btn color="primary" label="Click me" />
    <q-input v-model="text" label="Enter text" />
  </q-page>
</template>

Jackblog-vue component usage:

<template>
  <div class="page">
    <button class="btn btn-primary">Click me</button>
    <input v-model="text" placeholder="Enter text" />
  </div>
</template>

Quasar offers a more opinionated structure with custom components, while Jackblog-vue uses standard HTML elements with Vue.js bindings. Quasar's approach can lead to faster development and consistent styling, but may require more familiarity with the framework's specific components and conventions.

29,757

🛠️ webpack-based tooling for Vue.js Development

Pros of vue-cli

  • Official Vue.js project scaffolding tool with extensive ecosystem support
  • Provides a full-featured development environment out of the box
  • Offers plugin-based architecture for easy customization and extension

Cons of vue-cli

  • May be overkill for smaller projects or learning purposes
  • Requires additional setup time compared to simpler boilerplates
  • Can be overwhelming for beginners due to its extensive features

Code Comparison

vue-cli (vue create example-project):

Vue CLI v4.5.13
? Please pick a preset: Default (Vue 3) ([Vue 3] babel, eslint)
? Pick the package manager to use when installing dependencies: npm

jackblog-vue (manual setup):

git clone https://github.com/jackhutu/jackblog-vue.git
cd jackblog-vue
npm install
npm run dev

Summary

vue-cli is a powerful and flexible tool for creating Vue.js projects, offering a comprehensive development environment and extensive customization options. It's ideal for medium to large-scale applications and teams looking for a standardized setup.

jackblog-vue, on the other hand, is a simpler boilerplate focused on creating a blog application. It's more suitable for beginners or those looking to quickly set up a specific type of project without the need for extensive configuration.

The choice between the two depends on project requirements, team expertise, and desired level of customization.

28,416

🗃️ Centralized State Management for Vue.js.

Pros of Vuex

  • More comprehensive state management solution for Vue.js applications
  • Larger community support and regular updates
  • Better documentation and extensive examples

Cons of Vuex

  • Steeper learning curve for beginners
  • May be overkill for smaller projects
  • Requires more boilerplate code

Code Comparison

Vuex:

import { createStore } from 'vuex'

export default createStore({
  state: {
    count: 0
  },
  mutations: {
    increment(state) {
      state.count++
    }
  }
})

Jackblog-vue:

export default {
  data() {
    return {
      count: 0
    }
  },
  methods: {
    increment() {
      this.count++
    }
  }
}

Vuex provides a centralized store for state management, while Jackblog-vue uses Vue's built-in reactivity system for simpler state handling. Vuex offers more structure and scalability for larger applications, whereas Jackblog-vue's approach is more straightforward for smaller projects.

Vuex is maintained by the Vue.js core team and has extensive documentation, making it a reliable choice for complex applications. Jackblog-vue, being a blog project, demonstrates a simpler implementation that may be sufficient for less complex use cases.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Jackblog Vue 版

Dependency Status devDependency Status

Jackblog 是使用 Node.js + MongoDB + 其它客户端框架开发的个人博客系统,前后端分离,仿简书模板.
服务端有: express 版 , koa 版
客户端有: angular1.x 版 , angular2.x 版 , react 版 , vue 版
移动端有: react native 版, ionic2.0 版

此为客户端vue版, 需要配合服务端使用.

服务端任选一种, 请预先安装并启动服务端

开发

$ git clone git@github.com:jackhutu/jackblog-vue.git
$ cd jackblog-vue
$ npm install
$ npm run dev

在浏览器中自动打开 http://localhost:3000

调试

目录结构

.
├── README.md           
├── dist                     // 项目build目录
├── logs                     // 生产环境日志目录
├── src                      // 生产目录
│   ├── api                  // API 请求
│   ├── assets               // css 和图片资源
│   ├── components           // 组件
│   ├── utils                // 工具函数
│   └── store            		 // vuex相关文件, store,action
│   └── config.js            // api url, cookie domain等配置文件
│   └── index.html           // 主页html
│   └── routes.js            // 路由配置
│   └── index.js             // 入口文件
├── .babelrc                 // babel配置
├── .eslintrc.json           // eslint配置
├── History.md               // 更新日志
├── process.json             // pm2配置文件
├── server.js                // 生产环境启动server
├── webpack.config.js        // Webpack 配置文件

生产环境构建

$ npm run build

线上布署

$ pm2 start process.json

License

MIT