2020-02-15 11:30:23 -07:00
|
|
|
import { ExternalUrl } from "../external_urls";
|
2018-01-12 14:42:12 -07:00
|
|
|
|
|
|
|
/** A centralized list of all documentation slugs in the app makes it easier to
|
|
|
|
* rename / move links in the future. */
|
2019-01-09 19:28:37 -07:00
|
|
|
export const DOC_SLUGS = {
|
2019-06-14 16:59:11 -06:00
|
|
|
"weed-detection": "Weed Detector",
|
|
|
|
"camera-calibration": "Camera Calibration",
|
2019-01-09 19:28:37 -07:00
|
|
|
"the-farmbot-web-app": "Web App",
|
|
|
|
"farmware": "Farmware",
|
2020-02-15 11:30:23 -07:00
|
|
|
"connecting-farmbot-to-the-internet": "Connecting FarmBot to the Internet",
|
|
|
|
"for-it-security-professionals": "For IT Security Professionals",
|
2019-01-09 19:28:37 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
export type DocSlug = keyof typeof DOC_SLUGS;
|
2018-01-12 14:42:12 -07:00
|
|
|
|
|
|
|
/** WHY?: The function keeps things DRY. It also makes life easier when the
|
|
|
|
* documentation URL / slug name changes. */
|
2020-02-15 11:30:23 -07:00
|
|
|
export const docLink = (slug?: DocSlug) =>
|
|
|
|
`${ExternalUrl.softwareDocs}/${slug || ""}`;
|