Rodney Vg

Rodney Vg

1588610160

Vite & Vue Powered Static Site Generator

VitePress VuePress’ little brother, built on top of vite

npm install -D vitepress
echo '# Hello VitePress' > index.md

# starts dev server
npx vitepress

# build > .vitepress/dist
npx vitepress build

Note this is early WIP! The default theme is non-existent, but the basic workflow is there.

Customization

Configuration can be done via .vitepress/config.js (see src/config.ts)

You can develop your custom theme by adding the following files:

.vitepress/theme/Layout.vue

<template>
  <h1>Custom Layout!</h1>
  <Content/><!-- make sure to include markdown outlet -->
</template>

.vitepress/theme/index.js

import Layout from './Layout.vue'

export default {
  Layout,
  NotFound: () => 'custom 404', // <- this is a Vue 3 functional component
  enhanceApp({ app, router, siteData }) {
    // app is the Vue 3 app instance from createApp()
    // router is VitePress' custom router (see `lib/app/router.js`)
    // siteData is a ref of current site-level metadata.
  }
}

Unlike VuePress, the only file with a fixed location in a theme is index.js - everything else is imported and exported there like in a normal application.

Motivation

I love VuePress, but being built on top of webpack, the time it takes to spin up the dev server for a simple doc site with a few pages is just becoming unbearable. Even HMR updates can take up to seconds to reflect in the browser!

As a reference, the Composition API RFC repo is just two pages, but it takes 4 seconds to spin up the server, and almost 2 seconds for any edit to reflect in the browser.

Fundamentally, this is because VuePress is a webpack app under the hood. Even with just two pages, it’s a full on webpack project (including all the theme source files) being compiled. It gets even worse when the project has many pages - every page must first be fully compiled before the server can even display anything!

Incidentally, vite solves these problems really well: nearly instant server start, on-demand compilation that only compiles the page being served, and lightning fast HMR. Plus, there are a few additional design issues I have noted in VuePress over time, but never had the time to fix due to the amount of refactoring it would require.

Now, with vite and Vue 3, it is time to rethink what a “Vue-powered static site generator” can really be.

Improvements over VuePress

  • Uses Vue 3.

    • Leverages Vue 3’s improved template static analysis to stringify static content as much as possible. Static content is sent as string literals instead of JavaScript render function code - the JS payload is therefore much cheaper to parse, and hydration also becomes faster.

      Note the optimization is applied while still allowing the user to freely mix Vue components inside markdown content - the compiler does the static/dynamic separation for you automatically and you never need to think about it.

  • Uses vite under the hood:

    • Faster dev server start
    • Faster hot updates
    • Faster build (uses Rollup internally)
  • Lighter page weight.

    • Vue 3 tree-shaking + Rollup code splitting
    • Does not ship metadata for every page on every request. This decouples page weight from total number of pages. Only the current page’s metadata is sent. Client side navigation fetches the new page’s component and metadata together.
    • Does not use vue-router because the need of VitePress is very simple and specific - a simple custom router (under 200 LOC) is used instead.
    • (WIP) i18n locale data should also be fetched on demand.

Other Differences

  • More opinionated and less configurable: VitePress aims to scale back the complexity in the current VuePress and restart from its minimalist roots.

  • Future oriented: VitePress only targets browsers that support native ES module imports. It encourages the use of native JavaScript without transpilation, and CSS variables for theming.

Will this become the next VuePress in the future?

Maybe! It’s currently under a different name so that we don’t over commit to the compatibility with the current VuePress ecosystem (mostly themes and plugins). We’ll see how close we can get without compromising the design goals listed above. But the overall idea is that VitePress will have a drastically more minimal theming API (preferring JavaScript APIs instead of file layout conventions) and likely no plugins (all customization is done in themes).

Download Details:

Author: vuejs

GitHub: https://github.com/vuejs/vitepress

#vuejs #javascript #vue-js

What is GEEK

Buddha Community

Vite & Vue Powered Static Site Generator
Luna  Mosciski

Luna Mosciski

1600583123

8 Popular Websites That Use The Vue.JS Framework

In this article, we are going to list out the most popular websites using Vue JS as their frontend framework.

Vue JS is one of those elite progressive JavaScript frameworks that has huge demand in the web development industry. Many popular websites are developed using Vue in their frontend development because of its imperative features.

This framework was created by Evan You and still it is maintained by his private team members. Vue is of course an open-source framework which is based on MVVM concept (Model-view view-Model) and used extensively in building sublime user-interfaces and also considered a prime choice for developing single-page heavy applications.

Released in February 2014, Vue JS has gained 64,828 stars on Github, making it very popular in recent times.

Evan used Angular JS on many operations while working for Google and integrated many features in Vue to cover the flaws of Angular.

“I figured, what if I could just extract the part that I really liked about Angular and build something really lightweight." - Evan You

#vuejs #vue #vue-with-laravel #vue-top-story #vue-3 #build-vue-frontend #vue-in-laravel #vue.js

Vincent Lab

Vincent Lab

1605177550

Building a Static Website with Hugo

#hugo #static #site #generator #markup #static site generator

Simpliv LLC

Simpliv LLC

1582887678

Training Course on Leverage the Power of Generations | Simpliv

Description
There are now 4 generations in the workplace and our assumptions of the generations is getting in the way of our work. Are you getting along with your team members?

Leverage the Power of Generations aims to generate discussions and open-mindedness that leads to innovative solutions between all age groups. This “generation” course truly applies to every audience and organisation to understand that everyone has something to learn and everyone has something to teach.

Through bite-sized lessons including videos (20 minutes), written material and exercises from your own toolkit, the course focuses on creating common bonds among generations and looking at our differences as assets that can create real change. It is how we choose to work together that determines our success for the future.

Who is the target audience?

Individuals, managers and HR professionals
Basic knowledge
Come with an open mind to learn
What will you learn
To establish that there is conflict among the generations and this is nothing new
Learn that our assumptions about the generations are not always correct
Choose to see our differences among the generations as opportunities not challenges
Learn to be curious, be respectful and find common ground through a common experience
Use tools to guide you to change your perception of the generations
Determine who can help you lead the change process
Understand that everyone has something to learn and something to teach, no matter their generation
Create a dynamic culture of cooperation among the generations

ENROLL

#Leverage The Power Of Generations #Training Course on Leverage the Power of Generations #Leverage the Power of Generations - simpliv #Leverage

sophia tondon

sophia tondon

1620885491

Microsoft Power BI Consulting | Power BI Solutions in India

Hire top dedicated Mirosoft power BI consultants from ValueCoders who aim at leveraging their potential to address organizational challenges for large-scale data storage and seamless processing.

We have a team of dedicated power BI consultants who help start-ups, SMEs, and enterprises to analyse business data and get useful insights.

What are you waiting for? Contact us now!

No Freelancers, 100% Own Staff
Experienced Consultants
Continuous Monitoring
Lean Processes, Agile Mindset
Non-Disclosure Agreement
Up To 2X Less Time

##power bi service #power bi consultant #power bi consultants #power bi consulting #power bi developer #power bi development

sophia tondon

sophia tondon

1619670565

Hire Power BI Developer | Microsoft Power BI consultants in India

Hire our expert Power BI consultants to make the most out of your business data. Our power bi developers have deep knowledge in Microsoft Power BI data modeling, structuring, and analysis. 16+ Yrs exp | 2500+ Clients| 450+ Team

Visit Website - https://www.valuecoders.com/hire-developers/hire-power-bi-developer-consultants

#power bi service #power bi consultant #power bi consultants #power bi consulting #power bi developer #power bi consulting services