GithubHelp home page GithubHelp logo

theme's Introduction

Vue Theme

This is the VitePress theme for the official Vue documentation at vuejs.org.

Please note this theme is solely dedicated for vuejs.org and isn't meant to be used as a content-neutral theme. It does not follow semver and may contain hard-coded logic specific to the Vue documentation.

Development Setup

This repo can be developed on its own since it is a self-contained VitePress theme. Make sure to use pnpm as the package manager when installing deps. A demo app is available in /demo and can be run with pnpm dev:

pnpm install
pnpm dev

Developing with Real Content

To work on this theme in the context of the vuejs.org website requires cloning both repos and linking the theme into the docs repo:

  1. Clone repositories:

    git clone [email protected]:vuejs/docs.git
    git clone [email protected]:vuejs/theme.git
  2. Link theme into docs repo:

    # In ./theme
    pnpm install
    # Make @vue/theme available for global linking
    pnpm link --global
    
    # in ./docs
    pnpm install
    # Link theme
    pnpm link --global @vue/theme
  3. Start VitePress server:

    # in ./docs
    pnpm dev

Available Scripts

Here is the list of available scripts that can be used during the development.

# Boot local dev server.
$ pnpm dev

# Build demo, then serve locally. This is for testing
# production build in the local environment.
$ pnpm serve

# Run lint via Prettier.
$ pnpm lint

# Run type check via tsc.
$ pnpm type

License

MIT

Copyright (c) 2021-present Evan You

theme's People

Contributors

antfu avatar brc-dd avatar dboooo avatar denislapi avatar dev-itsheng avatar eben-roux avatar edimitchel avatar hongbusi avatar innocenzi avatar jay-es avatar jessicasachs avatar jinjiang avatar jozefizso avatar kiaking avatar ktquez avatar linusborg avatar shenqingchuan avatar skirtles-code avatar stevenks17 avatar sxzz avatar tolking avatar vexleet avatar viniciusteixeiradias avatar wleven avatar yanxintang avatar ylw5 avatar yunyoujun avatar yyx990803 avatar zhousg avatar zpfz 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

theme's Issues

Some i18n details in this theme

During the Chinese doc site preparation, we found there were some text and labels that need to be translated but hard-written in this theme. We temporarily modified them with patch-package patch like this:

https://github.com/vuejs-translations/docs-zh-cn/blob/f8b66e7dd3862f3e3b7fb1415c886fd71056b1ad/patches/@vue+theme+1.0.2.patch

But it would be great if we can provide a way to customize them by a config file or something else.

To be noticed this patch is not the all of them, since some aria-labels and a11y elements are still under translating.

Thanks.

Code block style problem

In the demo module, it is found that when the automatic line number configured for vitepress is true, the following problems will occur when using the custom code block vue-html, class line-numbers-mode is missing. There is also a problem with the font color of bright mode line size text.
{D{}X0UUVU)Q0QOJ76KS~HY

Decide base icon sets to use

Currently, I'm using Feather for the icons. While I love this icon, there're few cons.

  • It's "stroke" based, so I'm actually expanding the path in Adobe Illustrator and converting it to the "fille" base. Since "fill" based icons are much easier to handle.

  • It would be cool if Vue Theme can re-export existing icon sets from the package, so that we have default icon sets as a design system. What is the best way to do this?

    import { VTIconActivity, VTIconArrowLeft } from 'vue-theme'

Implement bundle system (how to publish the package)

So, how should we publish the package? Here is the spec idea.

Vue Theme will expose many components that can be used by external packages. And they can import them like this.

import { VTButton } from 'vue-theme'

Q1. Is this what we really want? Is there any other way to consume Vue Theme components?
Q2. If yes, how can we bundle the package? Rollup I guess, but I'm not familiar with publishing Vue components, so if there's any advice, that would be awesome 🙌

Layout slots

Similar to the current VitePress default theme, the root layout should support injecting content at different locations via slots.

For now we just need the following:

  • banner
  • sidebar top
  • sidebar bottom
  • aside bottom (below outline)

Replace `npm` to `pnpm` on README.md

The README.md has the following sentence Make sure to use [pnpm](https://pnpm.io/) as the package manager when installing deps., but the scripts in the same file are using npm instead from pnpm. I know it works, but it can be a little confusing.

Screenshot:

image

Vue Docs home page

This should be implemented at docs repo. Listing todos here due to docs repo is public.

mockup https://www.figma.com/proto/YCtYp5hNKswmTYmFEXUYnn/Vue-Theme?page-id=0%3A1&node-id=502%3A154&viewport=-6035%2C68%2C1&scaling=min-zoom

  • Hero section: Pretty much ready to be implemented. Lead text needs to be adjusted.
  • Features section: Need design review. Illustrations might require longer consideration time. In that case, we could start off by this design I think.
  • Sponsors section: Ready to implement. Note that Dark mode design might need extra attention (we can't make BG black because black part of logo will disappear).
  • Subscription section: Ready to implement.
  • Footer: Ready to implement.

Navigation bar typo

In the navigation bar, there is a typo. It should be "Installation" instead of "Installtion"

issue

Will @vue/theme be the theme for vitepress?

Hello~

The new vue3 documentation will be the best development documentation.
Thanks to the vue team for bringing us such a good documentation experience.

Also want to know, @vue/theme will optimize the hardcoded logic specific to Vue documentation to become the official vitepress theme?

Thanks!

Shuffle team members

Currently, the team page members order is not shuffled due to having trouble simple shuffling not working on production build. Investigate it, and let's implement the shuffle feature!

Use shiki's latest API for code block with line highlights

Was poking around the new site to see Shiki's usage in the wild. I think the current line highlighting solution can be simplified.

Shiki 0.10.0 adds an API to highlight specific lines. For example, this:

highlighter
  .codeToHtml(code, {
    lang,
    theme,
    lineOptions: [
      { line: 2, classes: ['highlighted']}
    ]
  })

generates something like:

<span class="line"></span>
<span class="line highlighted"></span>
<span class="line"></span>

The current line highlighter uses a workaround by rendering two layers, one with the highlighted code and the other one with all <br>. By using the API it cuts some HTML for code blocks with highlighted lines:

image

I have a PR - should I wait until this repo is more stabalized to send it?

Fix anchor link not working

This is because we're not setting correct class name to the doc container. VitePress router is referencing the element by the class or id (I forgot).

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.