Skip to content

Migrating from Gitbook #951

Open
Open
@danvega

Description

@danvega

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions