vuejs/vuepress

Migrating from Gitbook

Open

#951 opened on 2018年10月22日

GitHub で見る
 (5 comments) (0 reactions) (0 assignees)JavaScript (22,300 stars) (4,782 forks)batch import
help wanted

説明

I am trying to migrate some docs from Gitbook and being brand new to VuePres I am unsure of how to do something. We have these conditionals in our docs that are used for 2 purposes. When we are running the documentation in dev mode (gitbook serve) they only show 1 language. The more important piece is that when we build it we build documentation for a specific language. That means where ever we see these conditionals they need to be evaluated, only show one language and build it into that languages folder (java/.net/etc)

{% if book.language === "Java" %}
    int numOfBananas = ...;
    String message = 
        "We have " + numOfBananas + " banana" + (numOfBananas != 1 ? "s" : "");
{% elif book.language === 'C#' %}
    int numOfBananas = ...;
    string message = 
        "We have " + numOfBananas + " banana" + (numOfBananas != 1 ? "s" : "");
{% endif %}

I know I can use vue directives and logic in my markdown files but what I am unsure how to do is pass additional options to vuepress dev and vuepress build and where to store those options. Any help here would be greatly appreciated.

コントリビューターガイド

Migrating from Gitbook · vuejs/vuepress#951 | Good First Issue