# Customize docs plugin text link

**URL:** https://meta.discourse.org/t/customize-docs-plugin-text-link/278644
**Category:** Support
**Tags:** docs
**Created:** [September 12, 2023, 3:53am UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644 "2023-09-12T03:53:18Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Hyan](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@Hyan](https://meta.discourse.org/u/Hyan)
#### Post date: [September 12, 2023, 3:53am UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/1 "2023-09-12T03:53:18Z")

</div>

Hi Discourse community,  
I enabled discourse-docs plugin and add it to top menu. By default, its link is for example, [www.example.com/docs](http://www.example.com/docs), how can I change it to something like [www.example.com/my-docs](http://www.example.com/my-docs)?

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 12, 2023, 9:32am UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/2 "2023-09-12T09:32:38Z")

</div>

Hi Hyan 👋

~~This is not possible. This URL part is hardcoded here:~~

> <https://github.com/discourse/discourse-docs/blob/main/plugin.rb#L24>

There’s no setting to change this.

**Edit:** But you can change it using an environment variable in your app.yml. See @RGJ’s post below

---

<div class="post-metadata">

### Author: ![Hyan](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@Hyan](https://meta.discourse.org/u/Hyan)
#### Post date: [September 12, 2023, 1:44pm UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/3 "2023-09-12T13:44:01Z")

</div>

Thanks, @Canapin. I do see there’re some sites which docs link customized. Maybe they modify the code somehow. Probably there’re reasons do not expose the config to admin dashboard.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [September 12, 2023, 1:46pm UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/4 "2023-09-12T13:46:37Z")

</div>

> [@Hyan](#):
>
> I do see there’re some sites which docs link customized.

Can you share them?

---

<div class="post-metadata">

### Author: ![Hyan](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@Hyan](https://meta.discourse.org/u/Hyan)
#### Post date: [September 13, 2023, 11:59pm UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/5 "2023-09-13T23:59:00Z")

</div>

I got to know that the website customized by code changing. I thought only the line of code needs to change if I would try to do. Mark the answer as resolved. 😀

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [November 22, 2023, 4:00pm UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/6 "2023-11-22T16:00:13Z")

</div>

The whole idea of that setting is to make it configurable. The only thing that’s hardcoded is the default value.

You can set `DISCOURSE_DOCS_PATH` in your `app.yml` to change it.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [November 23, 2023, 11:07am UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/7 "2023-11-23T11:07:04Z")

</div>

I’ve added a section to the doc 👍 [https://meta.discourse.org/t/discourse-docs-documentation-management/130172#renaming-the-docs-path-5](https://meta.discourse.org/t/discourse-docs-documentation-management/130172#renaming-the-docs-path-5)

---

<div class="post-metadata">

### Author: ![Hyan](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@Hyan](https://meta.discourse.org/u/Hyan)
#### Post date: [November 29, 2023, 12:47pm UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/8 "2023-11-29T12:47:20Z")

</div>

Oh. Thank you so much letting me know this env vars. @RGJ I have one more questions regarding how Discourse or Rails framework works. I assume if the Discourse or its plugins running behavior can be changed through an env variable, then there must be the same env var name mentioned its relevant code. In this case DISCOURSE\_DOCS\_PATH should be appeared in the code of [GitHub - discourse/discourse-docs · GitHub](https://github.com/discourse/discourse-docs), but I didn’t find any code related. How it works?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [November 29, 2023, 4:27pm UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/9 "2023-11-29T16:27:14Z")

</div>

A very short summary is that environment variables `DISCOURSE_XYZ` are available in code as `GlobalSettings.xyz` or `SiteSettings.xyz`.

In this specific case you can find `GlobalSettings.docs_path` [here](https://github.com/discourse/discourse-docs/blob/ca8501aaf5eeb68e8128653f7f6b52b6c8eca8d7/lib/docs/engine.rb#L9C1-L9C1).

---

<div class="post-metadata">

### Author: ![Hyan](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@Hyan](https://meta.discourse.org/u/Hyan)
#### Post date: [November 30, 2023, 12:19am UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/10 "2023-11-30T00:19:39Z")

</div>

Thank, @RGJ Get to know how the environment setting names maps the config in Discourse.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 30, 2023, 12:19am UTC](https://meta.discourse.org/t/customize-docs-plugin-text-link/278644/11 "2023-12-30T00:19:47Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
