Skip to content

Add "Edit this Page"

Quickie

We will be adding code inside this:

/.vitepress/config.mjs
mjs
import { defineConfig } from "vitepress";

export default defineConfig({
  themeConfig: {
    // ==> Inside Here <==
  },
});

Just add a editLink prop inside the defaultConfig.

Add Search Feature

/.vitepress/config.mjs
mjs
import { defineConfig } from "vitepress";

// https://vitepress.dev/reference/site-config
export default defineConfig({
  themeConfig: {
    editLink: {
      pattern:
        "<github-repo-base-link>/edit/main/<your-source-folder>/:path",
    },
  },
});

So, my Github

WARNING

DONT Do Anything Else This is it.

Reference

Official Docs 🚀

You are your Biggest Ally and Enemy