Skip to content

Render build-time data #37

@giladgd

Description

@giladgd

What is the problem this feature would solve?

I have this in one of the markdown files of the node-llama-cpp documentation:

<script setup lang="ts">
import {data} from "./cmakeOptions.data.js";
const cmakeOptionsTable = data.cmakeOptionsTable;
const cmakeOptionsFileUrl = data.cmakeOptionsFileUrl;
</script>

`llama.cpp` has CMake build options that can be configured to customize the build.

:::details `llama.cpp` CMake build options

<div v-html="cmakeOptionsTable"></div>

> Source: <a :href="cmakeOptionsFileUrl">`CMakeLists`</a>

:::

When using the vitepress-plugin-llms plugin, it renders into this:

`llama.cpp` has CMake build options that can be configured to customize the build.

:::details `llama.cpp` CMake build options

> Source: `CMakeLists`

:::

With stripHTML: false it renders into this:

<script setup lang="ts">
import {data} from "./cmakeOptions.data.js";
const cmakeOptionsTable = data.cmakeOptionsTable;
const cmakeOptionsFileUrl = data.cmakeOptionsFileUrl;
</script>

`llama.cpp` has CMake build options that can be configured to customize the build.

:::details `llama.cpp` CMake build options

<div v-html="cmakeOptionsTable"></div>

> Source: <a :href="cmakeOptionsFileUrl">`CMakeLists`</a>

:::

It's worth noting that in this example the content of cmakeOptionsTable is an HTML table, but I still want to include it in the output.

What is the feature you are proposing to solve the problem?

Use the relevant component from Vitepress to execute the code inside markdown files to render their dynamic content.

What alternatives have you considered?

No alternatives

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions