GithubHelp home page GithubHelp logo

vuejs / vuepress Goto Github PK

View Code? Open in Web Editor NEW
22.3K 265.0 4.8K 14.83 MB

๐Ÿ“ Minimalistic Vue-powered static site generator

Home Page: https://vuepress.vuejs.org

License: MIT License

JavaScript 55.35% HTML 0.25% Vue 19.66% CSS 0.02% TypeScript 22.02% Stylus 2.68% Dockerfile 0.02%
vue vuepress seo static-site-generator docs-generator blog-engine

vuepress's Introduction

logo

Downloads Version License VuePress channel on Discord

Status

VuePress is now in maintenance mode. For a next-gen Vue-based SSG built on top of Vue 3 + Vite, check out VitePress.

Documentation

Check out our docs at https://vuepress.vuejs.org/.

Showcase

Contribution

Want to contribute? Check our Contributing Guide and issues for beginners!

yarn install # install all dependencies
yarn dev  # serves VuePress' own docs with itself
yarn test # make sure your code change pass the test

If you don't have a local checkout, you can also open VuePress in Gitpod, a free online IDE for GitHub.

If you intend to make "substantial" changes to VuePress or its documentation, please checkout VuePress RFCs.

If you have a VuePress-related project/component/tool, add it with a pull request to this curated list!

Contributors

Creator / Lead

Evan You
Evan You

๐Ÿ’ป
ULIVZ
ULIVZ

๐Ÿ’ป ๐Ÿ“–

Active Core Team

Billyyyyy3320
Billyyyyy3320

๐Ÿ’ป
meteorlxy
meteorlxy

๐Ÿ’ป
Ramona
Ramona

๐Ÿ’ป ๐Ÿ“–
Franck Abgrall
Franck Abgrall

๐Ÿ’ป ๐Ÿ’ฌ

Core Team Emeriti

Here we honor some no-longer-active core team members who have made valuable contributions in the past.

Ben Hong
Ben Hong

๐Ÿ’ป ๐Ÿ“– ๐Ÿ’ฌ
Giraud Florent
Giraud Florent

๐Ÿ’ป
Sarah Dayan
Sarah Dayan

๐Ÿ’ป ๐Ÿ“–
Vinayak Kulkarni
Vinayak Kulkarni

๐Ÿ”Œ ๐Ÿ’ป ๐Ÿ“
Victoria Bergquist
Victoria Bergquist

๐Ÿ’ป ๐ŸŽจ
Nikita Sobolev
Nikita Sobolev

๐Ÿ’ป ๐Ÿ“–
Fatih Acet
Fatih Acet

๐Ÿ’ป
Vladimir Pouzanov
Vladimir Pouzanov

๐Ÿ’ป

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

License

MIT

vuepress's People

Contributors

bencodezen avatar billyyyyy3320 avatar chungzh avatar cuyl avatar cyrilf avatar d-pollard avatar dependabot-preview[bot] avatar ekoeryanto avatar fjc0k avatar janvennemann avatar jaylinski avatar jjyyxx avatar kefranabg avatar kidonng avatar luisdanielroviracontreras avatar markhoney avatar meteorlxy avatar mister-hope avatar nimitbhargava avatar posva avatar sarahdayan avatar shigma avatar siguremo avatar spinda avatar ulivz avatar vinayakkulkarni avatar wangyi7099 avatar ycmjason avatar yyx990803 avatar znck 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  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

vuepress's Issues

External Navbar Links

In the Navbar Links section of the Default Theme Config documentation, there's an example including an external link:

module.exports = {
  themeConfig: {
    nav: [
      { text: 'Home', link: '/' },
      { text: 'Guide', link: '/guide/' },
      { text: 'External', link: 'https://google.com' },
    ]
  }
}

The external link ends up being a link to http://localhost:8080/https://google.com.

When port 8080 is in use nothing happenes

Expected behaviour :The cli should prompt me if certain port is already in use and suggest another port.
If this is a confirmed issue I would love to pick it up ๐Ÿ‘

[Discussion] Multiple Language Support

After exploration with current working flow and code details, and tried to implement i18n with different approach. finally I think that the idea from @egoist's docute would be minimalistic and useful enough for now.

Let me describe the story.

Since most users (Vue is also the same) will only consider supporting the main language support at the beginning, so I pass in an array that contains link items to nav:

module.exports = {
  themeConfig: {
    nav: [
      {
        text: 'Guide',
        link: '/guide/',
      },
      // rest pages ...
    ],
  }
}

Then one day, I find I want to add translations for my docs, taking adding Chinese translation as an example, I will need to do the following work to achieve i18n:

  1. Create a directory in the name of language at .vuepress
  2. Change the config to:
const langs = [
  { text: 'English', link: '/' },
  { text: '็ฎ€ไฝ“ไธญๆ–‡', link: '/zh/' },
]

module.exports = {
  themeConfig: {
    nav: {
      default: [
        { text: 'Guide', link: '/guide/' },
        { title: 'Languages', type: 'dropdown', items: langs },
      ],
      zh: [
        { text: 'ๆŒ‡ๅ—', link: '/zh/guide/' },
        { title: '้€‰ๆ‹ฉ่ฏญ่จ€', type: 'dropdown', items: langs },
      ]
    }
  }
}

There is a WIP PR for this solution: https://github.com/ulivz/vuepress/pull/1 (i18n + Chinese Translations)

This solution also has some issues:

  1. No consideration for i18n for Vue Component. (Using vue-i18n or making an another tiny lib?)
  2. No consideration for the two field title and description at config. (Don't have a good idea now.)

Here I just said my thoughts, free free to share your thoughts, so that we can deliver multiple language support faster and better.

Thanks.

@yyx990803 @egoist

Updated

Finished Chinese translation and open a complete PR: #48

Build failing if executed from locally installed version inside node_modules

This is a bit odd and I tried to spend a bit of time at least narrowing down a simple and reproducible scenario and "workaround" that I hope might help tracking things down. I seemed to have varying results when testing things, but I have narrowed things down to there being some issue with where the vuepress.js file is actually located when it is executed.

After assembling these screenshots, I tried installing globally and still got the same errors using that method. Although, I use a non-standard npm global directory location, so that could and occasionally does cause other issues.

On the surface this looks the same as #34, but hopefully this issue and method is a little easier to reproduce if it is the same. The screenshots include all steps for setup, multiple ways of trying to run the build process, and the somewhat surprising workaround.

In short, if vuepress is executed while under the node_modules directory, the build fails. If I simply move the vuepress directory out of there and into another directory, even at the same relative depth, it seems to work fine.

I am going to try and dig through the actual code a bit this evening, but wanted to share this first once I had a clearly reproducible scenario. As a side note, I've been extremely happy with what I think this is going to help me a ton with on some internal documentation and really excited to keep playing with it more, so please know the work is appreciated.

vp1-screenshot from 2018-04-15 14-34-18

vp2-screenshot from 2018-04-15 14-34-44

vp3-screenshot from 2018-04-15 14-35-04

vp4-screenshot from 2018-04-15 14-35-17

vp5-screenshot from 2018-04-15 14-46-29

vp6-screenshot from 2018-04-15 14-45-13

Any way to pass a css class or ID to an element?

Not really an issue, more of a question, as I couldn't find anything about that. The problem is, I have diferent tables on diferent pages and would like to style them seperately, and it doesn't seem possible, as the only specific ID's I see are in the headings, which don't wrap anything more than the headings. I know I can use HTML and wrap the table in a div or something, but was avoiding to use it, as I prefer to keep the pages markdown only.

Can not place headline

hello. im trying VuePress.
i encountered a troubled problem and i will report it.

Environment

  • Node: 8.9.1
  • VuePress: 0.3.1
    • .vuepress/config.js is not exist, all default settings

Reproduction

Please put this markdown down.

# Headline1
headline1 contains

## Headline2
headline2 contains

and, the error occurred like this. (TypeError: renderChildren(...) is not iterable)
when remove headline2 or replace to level1 headline, this error no occur.

$ npx vuepress build

Rendering static HTML...
Rendering page: /Error rendering /:
TypeError: renderChildren(...) is not iterable
    at children.map.c (server-bundle.js:2005:10)
    at Array.map (<anonymous>)
    at renderChildren (server-bundle.js:2001:61)
    at render (server-bundle.js:1978:21)
    at renderWithStyleInjection (server-bundle.js:195:16)
    at createFunctionalComponent (~/reproduction/node_modules/vue/dist/vue.runtime.common.js:4058:30)
    at createComponent (~/reproduction/node_modules/vue/dist/vue.runtime.common.js:4248:12)
    at _createElement (~/reproduction/node_modules/vue/dist/vue.runtime.common.js:4418:15)
    at createElement (~/reproduction/node_modules/vue/dist/vue.runtime.common.js:4355:10)
    at vm._c (~/reproduction/node_modules/vue/dist/vue.runtime.common.js:4487:42)
    at server-bundle.js:1944:521
    at VueComponent.renderList [as _l] (~/reproduction/node_modules/vue/dist/vue.runtime.common.js:3703:16)
    at VueComponent.Sidebarvue_type_template_id_5e11e29e_render (server-bundle.js:1944:258)
    at VueComponent.Vue._render (~/reproduction/node_modules/vue/dist/vue.runtime.common.js:4542:22)
    at renderComponentInner (~/reproduction/node_modules/vue-server-renderer/build.js:7521:25)
    at renderComponent (~/reproduction/node_modules/vue-server-renderer/build.js:7491:5)

Success! Generated static files in .vuepress/dist.

perhaps it might be related

thanks ๐Ÿ˜‡

TypeError: Cannot read property 'vue' of undefined

็ณป็ปŸ๏ผšOSX 10.13.3
node็‰ˆๆœฌ๏ผšv9.10.1
ๆ–ฐๅปบ็š„webpack-simple้กน็›ฎ๏ผŒๆŒ‰็…งๅฎ˜็ฝ‘ๅฎ‰่ฃ…ไพ่ต–ไน‹ๅŽไฝฟ็”จnpx vuepress dev docsๅ‘ฝไปคๆž„ๅปบๆŠฅ้”™

ERROR in ./node_modules/_vuepress@0.4.0@vuepress/lib/default-theme/NotFound.vue
Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (/Users/zhuliang/idea_workspace/myPro/tesetpress1/node_modules/_vue-loader@13.7.1@vue-loader/lib/loader.js:61:18)
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/app.js 6:0-32 47:13-21
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
@ multi ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js

ERROR in ./node_modules/_vuepress@0.4.0@vuepress/lib/default-theme/Layout.vue
Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (/Users/zhuliang/idea_workspace/myPro/tesetpress1/node_modules/_vue-loader@13.7.1@vue-loader/lib/loader.js:61:18)
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/.temp/routes.js 4:0-26 8:17-22
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/app.js
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
@ multi ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js

ERROR in ./docs/README.md
Module build failed: TypeError: Cannot read property 'vue' of undefined
at Object.module.exports (/Users/zhuliang/idea_workspace/myPro/tesetpress1/node_modules/_vue-loader@13.7.1@vue-loader/lib/loader.js:61:18)
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/.temp/routes.js 10:8-81
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/app.js
@ ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js
@ multi ./node_modules/_vuepress@0.4.0@vuepress/lib/app/clientEntry.js

Asset handling via Frontmatter

Hey there!

I would love to specify an image path via frontmatter for e.g. a header image for a specific page.
How would I do that?

  1. I can't use webpack aliases as they are only interpreted for markdown images
  2. I can't resolve the path, there is nothing exported by utils to resolve assets

The root path remain always active

I've noticed a strange behavior in the navbar: if I change the page the Home link (the '/' path) remains always highlighted, as you can see below

navbar-vuepress

The code in the inspector is:

inspector-code-navbar-vuepress

But in the sidebar it's working as exprected

sidebar-vuepress

Is it a bug or I'm missing something?

How to config root path in 'Matiple Sidebars'

image
In the Matiple Sidebars config, it just tell me how to config the subpath, but what about the root path? I have tried to config like this:

 sidebar: {
      '/': [
         '',
        'one',
        'two'
      ],
      // sidebar for pages under /foo/
      '/foo/': [
        '',
        'one',
        'two'
      ]
    }

but it doesn't work.....

Very slow installation

I don't know if this issue is network related, but this was the slowest npm installation that I ever made. I'm using npm 5.8.0 on Windows 10.

Theme development onboarding

Hello.

I'm trying to get started with a custom theme, but I really would love to just tinker with the existing theme and adapt it to my needs, without starting entirely from scratch.

Is there a way to load the default theme into .vuepress? Preferably via a terminal command provided via vuepress.
But I guess doing a sparse checkout of a repo will do it too for now.

TypeError: promisify is not a function

sudo npm install -g vuepress
/usr/bin/vuepress -> /usr/lib/node_modules/vuepress/bin/vuepress.js
/usr/lib
โ””โ”€โ”€ [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules/vuepress/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

vuepress dev

TypeError: promisify is not a function
at Object. (/usr/lib/node_modules/vuepress/lib/prepare.js:6:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at dev (/usr/lib/node_modules/vuepress/lib/dev.js:14:19)
at args (/usr/lib/node_modules/vuepress/bin/vuepress.js:83:12)

Cannot connect to ws~

Version

  • Node.js v8.9.3
  • VuePress v0.4.0

Problem

After startup the server, the site keep to connect to websocket...So it's not able to hot reload.

The Console showed:
like this

TypeError: renderChildren(...) is not iterable

Repro:

git clone https://github.com/anishkny/vuepress-base
cd vuepress-base
npm i
npm run build

Error:

npm run build

> [email protected] build /Users/anish/playground/vuepress-base
> vuepress build


Rendering static HTML...
Rendering page: /Error rendering /:
TypeError: renderChildren(...) is not iterable
    at children.map.c (server-bundle.js:2005:10)
    at Array.map (<anonymous>)
    at renderChildren (server-bundle.js:2001:61)
    at render (server-bundle.js:1978:21)
    at renderWithStyleInjection (server-bundle.js:195:16)
    at createFunctionalComponent (/Users/anish/playground/vuepress-base/node_modules/vue/dist/vue.runtime.common.js:4058:30)
    at createComponent (/Users/anish/playground/vuepress-base/node_modules/vue/dist/vue.runtime.common.js:4248:12)
    at _createElement (/Users/anish/playground/vuepress-base/node_modules/vue/dist/vue.runtime.common.js:4418:15)
    at createElement (/Users/anish/playground/vuepress-base/node_modules/vue/dist/vue.runtime.common.js:4355:10)
    at vm._c (/Users/anish/playground/vuepress-base/node_modules/vue/dist/vue.runtime.common.js:4487:42)
    at server-bundle.js:1944:521
    at VueComponent.renderList [as _l] (/Users/anish/playground/vuepress-base/node_modules/vue/dist/vue.runtime.common.js:3703:16)
    at VueComponent.Sidebarvue_type_template_id_5e11e29e_render (server-bundle.js:1944:258)
    at VueComponent.Vue._render (/Users/anish/playground/vuepress-base/node_modules/vue/dist/vue.runtime.common.js:4542:22)
    at renderComponentInner (/Users/anish/playground/vuepress-base/node_modules/vue-server-renderer/build.js:7521:25)
    at renderComponent (/Users/anish/playground/vuepress-base/node_modules/vue-server-renderer/build.js:7491:5)

Success! Generated static files in .vuepress/dist.

The site does get generated, but upon loading get console error in browser:

app.f38efceb.js:8 TypeError: Ma(...) is not a function or its return value is not iterable
    at Ma.e.map.e (app.f38efceb.js:13)
    at Array.map (<anonymous>)
    at Ma (app.f38efceb.js:13)
    at render (app.f38efceb.js:13)
    at app.f38efceb.js:8
    at rn (app.f38efceb.js:8)
    at app.f38efceb.js:8
    at sn (app.f38efceb.js:8)
    at t._c (app.f38efceb.js:8)
    at app.f38efceb.js:13
Ft @ app.f38efceb.js:8
127.0.0.1/ Failed to load resource: the server responded with a status of 404 (Not Found)

I am on MacOS Sierra 10.12.6, Node v8.9.4, npm v5.6.0.

Linking to index.html results in 404

If I link directly to the index.html file that is generated from the the README.md it responds with a 404 when it probably shouldn't, as the file exists. It does that with the index.html in the root folder and with any other index.html that is inside any other folder.

Multiplatform support similar to multi language

First off - thanks for the good work ๐Ÿ‘

I was looking at the vuejs docs and I assume that the multi-language support coming to vuepress will generate similar docs, i.e.:

  • some.url/path (default, English)
  • br.some.url/path (portugese)
  • and so on.

Since documentation will often be developed for multiple platform (browser, android, iOS) I was wondering if there could be some way to do it such that the "url+path" combination only changes similar to how it works for languages?

I must admit that I don't have a solution in mind for this (other than that the current selection is tied to localstorage and that the path remains the same until user selects another platform) but it would be awesome if this were to be possible.

Thanks!
Saurabh

SEO friendly URLs

Right now, the only workaround is to create README.md files in folders, which are generated as index.html.

Since this is a static site generator to be deployed to almost all platforms (apache, node, nginx) this might be a bit more trickier to set up.

A start would be to have more fine-grained control about which file is used as an index.html (README.md is a bit github centric, which is fine for the start)

I don't know if the workaround should be entirely on the rendered output side. But maybe an alternative to providing a .htaccess file or node server with routes based on output, is to create folders for subpages and create subpage/index.html instead.

This is also related to the Blog support roadmap (#36)

Theming: Add vertical space to end of footer

Please add some vertical space to the end of the footer. On phones like the iPhone X it is difficult to click links in there like previous and next due to rounded screen corners.

failed to locate @import file ~@temp/override.styl

Netlify fails to pass CI, throwing error:

11:58:41 AM: Module build failed: ModuleBuildError: Module build failed: Error: /opt/build/repo/docs/.vuepress/theme/styles/config.styl:17:9
11:58:41 AM:    13| $MQNarrow = 959px
11:58:41 AM:    14| $MQMobile = 719px
11:58:41 AM:    15| $MQMobileNarrow = 419px
11:58:41 AM:    16|
11:58:41 AM:    17| @import '~@temp/override.styl' // generated from user config
11:58:41 AM: ---------------^
11:58:41 AM:    18|
11:58:41 AM: failed to locate @import file ~@temp/override.styl
11:58:41 AM:     at CachedPathEvaluator.visitImport (/opt/build/repo/node_modules/stylus-loader/lib/evaluator.js:157:21)
11:58:41 AM:     at CachedPathEvaluator.Visitor.visit (/opt/build/repo/node_modules/stylus/lib/visitor/index.js:28:40)
11:58:41 AM:     at CachedPathEvaluator.Evaluator.visit (/opt/build/repo/node_modules/stylus/lib/visitor/evaluator.js:160:18)
11:58:41 AM:     at CachedPathEvaluator.Evaluator.visitBlock (/opt/build/repo/node_modules/stylus/lib/visitor/evaluator.js:720:39)
11:58:41 AM:     at CachedPathEvaluator.Visitor.visit (/opt/build/repo/node_modules/stylus/lib/visitor/index.js:28:40)
11:58:41 AM:     at CachedPathEvaluator.Evaluator.visit (/opt/build/repo/node_modules/stylus/lib/visitor/evaluator.js:160:18)
11:58:41 AM:     at CachedPathEvaluator.importFile (/opt/build/repo/node_modules/stylus-loader/lib/evaluator.js:84:18)
11:58:41 AM:     at CachedPathEvaluator.visitImport (/opt/build/repo/node_modules/stylus-loader/lib/evaluator.js:162:27)
11:58:41 AM:     at CachedPathEvaluator.Visitor.visit (/opt/build/repo/node_modules/stylus/lib/visitor/index.js:28:40)
11:58:41 AM:     at CachedPathEvaluator.Evaluator.visit (/opt/build/repo/node_modules/stylus/lib/visitor/evaluator.js:160:18)
11:58:41 AM:     at CachedPathEvaluator.Evaluator.visitRoot (/opt/build/repo/node_modules/stylus/lib/visitor/evaluator.js:707:27)
11:58:41 AM:     at CachedPathEvaluator.Visitor.visit (/opt/build/repo/node_modules/stylus/lib/visitor/index.js:28:40)
11:58:41 AM:     at CachedPathEvaluator.Evaluator.visit (/opt/build/repo/node_modules/stylus/lib/visitor/evaluator.js:160:18)
11:58:41 AM:     at CachedPathEvaluator.Evaluator.evaluate (/opt/build/repo/node_modules/stylus/lib/visitor/evaluator.js:247:15)
11:58:41 AM:     at Renderer.render (/opt/build/repo/node_modules/stylus/lib/renderer.js:86:26)
11:58:41 AM:     at /opt/build/repo/node_modules/stylus-loader/index.js:167:12
11:58:41 AM:     at runLoaders (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:242:20)
11:58:41 AM:     at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:364:11
11:58:41 AM:     at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:230:18
11:58:41 AM:     at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
11:58:41 AM:     at /opt/build/repo/node_modules/stylus-loader/index.js:169:11
11:58:41 AM:     at Renderer.render (/opt/build/repo/node_modules/stylus/lib/renderer.js:107:12)
11:58:41 AM:     at /opt/build/repo/node_modules/stylus-loader/index.js:167:12
11:58:42 AM:     at tryCatchReject (/opt/build/repo/node_modules/when/lib/makePromise.js:840:30)
11:58:42 AM:     at runContinuation1 (/opt/build/repo/node_modules/when/lib/makePromise.js:799:4)
11:58:42 AM:     at Fulfilled.when (/opt/build/repo/node_modules/when/lib/makePromise.js:590:4)
11:58:42 AM:     at Pending.run (/opt/build/repo/node_modules/when/lib/makePromise.js:481:13)
11:58:42 AM:     at Scheduler._drain (/opt/build/repo/node_modules/when/lib/Scheduler.js:62:19)
11:58:42 AM:     at Scheduler.drain (/opt/build/repo/node_modules/when/lib/Scheduler.js:27:9)
11:58:42 AM:     at _combinedTickCallback (internal/process/next_tick.js:131:7)
11:58:42 AM:     at process._tickCallback (internal/process/next_tick.js:180:9)
11:58:42 AM:  @ ./docs/.vuepress/theme/Page.vue?vue&type=style&index=0&lang=stylus 1:0-451 1:467-470 1:472-920 1:472-920
11:58:42 AM:  @ ./docs/.vuepress/theme/Page.vue
11:58:42 AM:  @ ./node_modules/buble-loader??ref--5-0!./node_modules/vue-loader/lib??vue-loader-options!./docs/.vuepress/theme/Layout.vue?vue&type=script&lang=js
11:58:42 AM:  @ ./docs/.vuepress/theme/Layout.vue?vue&type=script&lang=js
11:58:42 AM:  @ ./docs/.vuepress/theme/Layout.vue
11:58:42 AM:  @ ./node_modules/vuepress/lib/app/.temp/routes.js
11:58:42 AM:  @ ./node_modules/vuepress/lib/app/app.js
11:58:42 AM:  @ ./node_modules/vuepress/lib/app/clientEntry.js
11:58:42 AM:  @ multi ./node_modules/vuepress/lib/app/clientEntry.js
11:58:42 AM: (undefined) ./docs/.vuepress/theme/Sidebar.vue?vue&type=style&index=0&lang=stylus (./node_modules/mini-css-extract-plugin/dist/loader.js!./node_modules/css-loader??ref--11-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/lib??ref--11-oneOf-1-2!./node_modules/stylus-loader??ref--15-oneOf-1-3!./node_modules/vue-loader/lib??vue-loader-options!./docs/.vuepress/theme/Sidebar.vue?vue&type=style&index=0&lang=stylus)

Is there anything unusual that I have to setup to make easy CI to pass? (simple deploy to gh pages or netlify)

Blog Support roadmap (Resolved)

Hello,

I'm excited to use vuepress for my personal website but I kinda want blog support before I switch, so I was thinking I'd kickstart that discussion on that now. This issue is to seek input as to what blog support might look like.

I was thinking a minimum viable product might be

  • some kind of tag/category system
  • An alternative default theme which feels more like a blog
  • helper utilities for themes (high order components?) for getting lists of posts around the tag/category system
  • Pre-defined markdown templates that correspond to theme vue components, like hexo's layouts
  • A CLI command for bootstrapping posts, vuepress new [layout] <post title>

local preview via file protocol

Hello!

The Base path is set to "/" by default I guess.
When I want to preview the built website without being deployed, I open the file in my browser by double clicking the file in my file explorer.

There the path is file://...../vuepress/dist/index.html

Is there something I could do to make this also possible?

Thanks in advance.

SyntaxError: Unexpected token (

I just installed vuepress and tried to run vuepress dev

/usr/local/lib/node_modules/vuepress/bin/vuepress.js:44
.action(async (dir = '.') => {
^

SyntaxError: Unexpected token (
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)

Build deletes the .git folder

I followed the docs, that suggested git init inside the generate .vuepress/dist folder, but when I run a new build, I think it's deleting the entire dist folder, along with the .git folder which is there because i want to push to github pages.

Maybe exclude the .git folder when clearing dist would solve this ?

SyntaxError: Unexpected token function

When trying to run vuepress dev ., this error is triggered. Any idea? :/

screen shot 2018-04-14 at 4 55 12 pm

EDIT: I think it is because my version of Node is v7.5.0. Let me check one minute. ^^

Error: Cannot find module 'babel-runtime/regenerator'

When I try to build the site I coded using the command vuepress build, I get this error on console after a while:

Error: Cannot find module 'babel-runtime/regenerator'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> ($HOME/.config/yarn/global/node_modules/workbox-build/build/lib/copy-workbox-libraries.js:3:20)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> ($HOME/.config/yarn/global/node_modules/workbox-build/build/index.js:19:28)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at build ($HOME/.config/yarn/global/node_modules/vuepress/lib/build.js:86:17)
    at <anonymous>

I installed babel-runtime using this guide and installing too the last version of that module.

My package.json just look like this

{
  //some other fields
  "dependencies": {
    "babel-runtime": "5.3.0",
    "vuepress": "^0.4.0"
  }
}

Unable to include HTML in markup using tickmarks when it includes the Content tag

I am trying to write up the process of creating .a custom theme. When I tried to use this text in my markup:

<template>
  <div class="theme-container">
    <Content/>
  </div>
</template>

I get this cool thing where the content of my entire .md page gets recursively copied in a cool mirror-in-a-mirror effect. Unfortunately I do not like that cool effect in my notes.

Note that if instead if tickmarks I indent with 4 spaces instead of the 3 tickmarks this problem does away. But it's annoying.

Bonus question: I suspect "theme-container" is a placeholder for a class name but I don't know what it is.

Generate a sitemap

Since I saw blogging support is planned, I thought I'd create a request for sitemap support as well (and maybe even RSS feed while we're at it?). Could try and work on it as well.

Reports "success!" even if all docs fail to render

I just installed and tested Vuepress with 1000 simple Markdown files in a folder:

โ–ถ time vuepress build .

After 2 minutes it starts to spit errors of the kind below. The main point of this issue, however, is the "Success!" part.

/usr/local/lib/node_modules/vuepress/node_modules/vue-server-renderer/build.js:7521:25)
    at renderComponent (/usr/local/lib/node_modules/vuepress/node_modules/vue-server-renderer/build.js:7491:5)
Error rendering /README998.html:
TypeError: G(...) is not a function or its return value is not iterable
    at G.t.map.t (server-bundle.js:3:355591)
    at Array.map (<anonymous>)
    at G (server-bundle.js:3:355484)
    at render (server-bundle.js:3:356015)
    at s.render (server-bundle.js:1:1550)
    at createFunctionalComponent (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4058:30)
    at createComponent (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4248:12)
    at _createElement (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4418:15)
    at createElement (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4355:10)
    at vm._c (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4487:42)
    at server-bundle.js:3:358322
    at VueComponent.renderList [as _l] (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:3703:16)
    at VueComponent.<anonymous> (server-bundle.js:3:358105)
    at VueComponent.Vue._render (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4542:22)
    at renderComponentInner (/usr/local/lib/node_modules/vuepress/node_modules/vue-server-renderer/build.js:7521:25)
    at renderComponent (/usr/local/lib/node_modules/vuepress/node_modules/vue-server-renderer/build.js:7491:5)
Error rendering /README999.html:
TypeError: G(...) is not a function or its return value is not iterable
    at G.t.map.t (server-bundle.js:3:355591)
    at Array.map (<anonymous>)
    at G (server-bundle.js:3:355484)
    at render (server-bundle.js:3:356015)
    at s.render (server-bundle.js:1:1550)
    at createFunctionalComponent (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4058:30)
    at createComponent (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4248:12)
    at _createElement (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4418:15)
    at createElement (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4355:10)
    at vm._c (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4487:42)
    at server-bundle.js:3:358322
    at VueComponent.renderList [as _l] (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:3703:16)
    at VueComponent.<anonymous> (server-bundle.js:3:358105)
    at VueComponent.Vue._render (/usr/local/lib/node_modules/vuepress/node_modules/vue/dist/vue.runtime.common.js:4542:22)
    at renderComponentInner (/usr/local/lib/node_modules/vuepress/node_modules/vue-server-renderer/build.js:7521:25)
    at renderComponent (/usr/local/lib/node_modules/vuepress/node_modules/vue-server-renderer/build.js:7491:5)

Success! Generated static files in .vuepress/dist.
vuepress build .   133.71s  user 5.26s system 170% cpu 1:21.70 total

The Markdown used in test:

# Qua et pennis in sim inmitem

## Lumen exspectato est fecisse enim pericula totidemque

Lorem markdownum mortis caede *intima animi sinus* vestes iustissime, finita.
**Torus motaque timidumque** sacerdos dea arida deos vix tamquam, **per**.
Raptor et Vulcani pisce; ullus rabie sanguine memoresque supremumque clamat.
Quaeque satis; virum iam Taurusque intrat Phoronidos regina ferant, altis!

Nutu aspera totidem blanditias regimen Isthmo est illa damnatus! Adhuc crimen
flagratque remorata labores servaturis pius.
[Refertque](http://vulnerequoque.org/) suo fixa confessam leonis perlucida
vultus Tritonia deos, vidistis Saturnius Silenus neve est et perierunt.

- Mansit nymphe discussit superest terga contendere laceras
- Erat anus
- Ades caesa petunt crudelis cecidisse Eleis me
- Sibi recepta etiamnum
- Potiere virginis
- Hoc sine magna aera omnis

## Manus columbae perfudit coniuge cornum Medusae vitiato

Arcana ille herbae idque, praebuit mensis, quisquis misceri *error*, qui.
Equumque opaca, positoque violas perdiderat auditi tempore caespite mutatas.
Adhuc **illius deficiunt** infirmos verbis. Satiantur versa, dum verba humo nec
Perseus ibant demere [ablata gelidi](http://puellae.org/creatis.php) est, in
aperire iubent tum! Huius evehor terram gemitumque nullis te laetus **solebat
vultibus** certamine translata tamen.

Huic inpositum strata percepto utque: undas omnia, perosus demi namque. Misit
digiti gaudia cepit quadriiugo varias. Aeratas de corpore quantusque villis
spectansque ille ipsius soror.

Erat erit et inde esse praesens et recepto [modo
peperit](http://pyreneusdiramque.org/) iram: sub sub viscata sua. Ac serta ne
maestis gaudia nemorisque Theti et ille rex? Revincta Gorgoneis terram virgo
siqua omnibus; peto parentum, patrem **contortam facies adsumit**: ambo tanta.
Et damnare crematisregia sine ululare Alcyonen tabellas litora hirsutaque
confinia requiem satyri adhuc sceleris!

- Carica hastam properas fecerat
- Bellator murice sed populus dextra pulvereamque quove
- Ad amor nautae
- Ita medios in iussis vocant cubitoque quae
- Adcommodat consurgit tellus putaret fugio intremuere dederis
- Soporis huc ipsum velis estque dixit haec

Nisi relictum Stygiam contra mihi **unda decerpta aures** radix, qui et. Tu
Cytherea canam sorsque obstitit. Que *quid*. Deos vastum depulerant!

ERROR in ./README.md

I just installed vuepress and tried to run vuepress dev,

ERROR in ./README.md
Module build failed: TypeError: Cannot read property 'join' of undefined
    at Object.module.exports (C:\Users\xxy\AppData\Roaming\npm\node_modules\vuepress\lib\webpack\markdownLoader.js:81:17)
 @ C:/Users/xxy/AppData/Roaming/npm/node_modules/vuepress/lib/app/.temp/routes.js 10:8-68
 @ C:/Users/xxy/AppData/Roaming/npm/node_modules/vuepress/lib/app/app.js
 @ C:/Users/xxy/AppData/Roaming/npm/node_modules/vuepress/lib/app/clientEntry.js
 @ multi C:/Users/xxy/AppData/Roaming/npm/node_modules/vuepress/lib/app/clientEntry.js

Thanks!

Insert image syntax does not work

According to the tutorial in the "Asset Handling" section, I used the

![An image][./image.png]

statement to insert an image, but it did not work and was output to the page as it was.
image
image

Create a plugin system and a guide on how to create plugins

I think Plugins are one of the most essential things in static site generators as they do a lot of functionalities that can not be implemented otherwise so I think there should be a guide explaining how to create a plugin and future plans on the plugin system

escape text in code block when lang is 'text' or not specified

Content in my markdown file:

Run vuepress dev, it throws an error:

Run vuepress build, it doesn't throw an error. But the page is not rendered as expected:


I guess the cause is that code isn't escaped, when lang is 'text' or not specified.

function wrap (code, lang) {
return `<pre v-pre class="language-${lang}"><code>${code}</code></pre>`
}

Since prism would automatically escape code:

> prism.highlight('<scheme>', prism.languages['html'], 'html')
'<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>scheme</span><span class="token punctuation">></span></span>'

A quick solution might be:

const escapeHtml = require('escape-html')

function wrap (code, lang) {
  if (lang === 'text') {
    code = escapeHtml(code)
  }
  return `<pre v-pre class="language-${lang}"><code>${code}</code></pre>`
}

This solution works well both on vuepress dev and vuepress build. But I don't know if this is a good solution

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.