mirror of
https://ghfast.top/https://github.com/discourse/discourse-docs.git
synced 2026-07-18 11:49:37 +08:00
* FEATURE: add a global setting to support custom docs url path This commit adds a GlobalSetting `docs_path` to support custom docs url path for sites that do not want docs page to live at `/docs` and have a customized path. * Fixed the route declaration * Test and linting * Update server.en.yml * Fixed doc test * Fixed linting. * Testing qunit test fix * Fixed tests * Prettified tests * Changed the implementation from SiteSetting to GlobalSetting instead. * Fixed tests * Cleanup * Using Site instead of .js.erb to pass GlobalSetting.docs_url to the front end. Also fixed front end tests * Remove references to obsolete site setting * remove unused fixture file * Rename `docs_url` to `docs_path` and use camelCase in JavaScript * Add serializer tests Co-authored-by: Arpit Jalan <er.ajalan@gmail.com>
9 lines
213 B
JavaScript
9 lines
213 B
JavaScript
import { getDocs } from "../lib/get-docs";
|
|
|
|
export default function () {
|
|
const docsPath = getDocs();
|
|
|
|
this.route("docs", { path: "/" + docsPath }, function () {
|
|
this.route("index", { path: "/" });
|
|
});
|
|
}
|