---
title: "Edit Link"
description: "A link to the source file."
canonical_url: "https://nnsvn.me/products/nuxt-starter-kit/api/configuration/edit-link"
---

> Index of every page on this site: [llms.txt](https://nnsvn.me/llms.txt)

An edit link allows you to display a link at the end of each page to edit the page on GitHub / GitLab.

```ts [docs.config.ts]
export const DOCS_CONFIG = {
  main: {
    editLink: {
      enable: true,
      pattern: 'https://github.com/No-Name-Studio-VN/Homepage/edit/main/content/:path',
      text: 'Edit this page on GitHub',
      icon: 'lucide:square-pen',
      placement: ['docsFooter', 'toc'],
    },
  },
};
```

- The `pattern` option defines the URL structure for the link, and `:path` is going to be replaced with the page path.
- The `text` option allows you to customize the link text (default is `Edit this page`)
- The `icon` option allows you to customize the icon (default is `lucide:square-pen`)
- The `placement` option controls the places to put the edit link.
  - `docsFooter`: at the end of the page.
  - `toc`: in the TOC links section.

### Front Matter

The edit link can be disabled per-page using the `editLink` option in front matter.

```yaml
---
editLink: false
---
```

## Parameters

<ct-field-group>
<ct-field name="enable" type="boolean" default-value="false">

Whether to turn on the edit link.

</ct-field>

<ct-field name="pattern" type="string">

The link pattern.

</ct-field>

<ct-field name="text" type="string" default-value="Edit this page">

Text displayed on the link.

</ct-field>

<ct-field name="icon" type="string" default-value="lucide:square-pen">

The icon preceding the link.

</ct-field>

<ct-field name="placement" type="('docsFooter' | 'toc')[]" default-value="['docsFooter']">

Where to place the edit link.

</ct-field>
</ct-field-group>

## Sitemap

See the full [sitemap](https://nnsvn.me/sitemap.md) for all pages.
