vuejs/vuepress

Migrating from Gitbook

Open

#951 ouverte le 22 oct. 2018

Voir sur GitHub
 (5 commentaires) (0 réactions) (0 assignés)JavaScript (4 782 forks)batch import
help wanted

Métriques du dépôt

Stars
 (22 300 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur