From f01992b8cf5c1f581dcf7a852330eb7b594900c7 Mon Sep 17 00:00:00 2001
From: Sean Madsen <sean@seanmadsen.com>
Date: Sat, 24 Jun 2017 19:40:58 -0600
Subject: [PATCH] Add .md to internal hyperlinks

This way MkDocs will be able to report errors for broken links

Done with:

perl -0777 -i -pe \
's@(?<!!)\[([^\]]*)\]\((?!https?://)(?!mailto:)(/(?:(?:(?:/(?![\)#]))|[^/)#])(?!.md))+)/?(#[^)]*)?\)@[$1]($2.md$3)@gm' \
`find . -name '*.md'`
---
 docs/api/joins.md                             | 10 +++++-----
 docs/basics/planning.md                       |  2 +-
 docs/core/architecture.md                     |  4 ++--
 docs/documentation/markdown.md                |  2 +-
 docs/documentation/style-guide.md             |  2 +-
 docs/extensions/civix.md                      | 12 ++++++------
 docs/extensions/index.md                      |  6 +++---
 docs/extensions/lifecycle.md                  |  2 +-
 docs/hooks/hook_civicrm_alterMenu.md          |  6 +++---
 docs/hooks/hook_civicrm_caseTypes.md          |  2 +-
 docs/hooks/hook_civicrm_contactListQuery.md   |  2 +-
 docs/hooks/hook_civicrm_customFieldOptions.md |  2 +-
 docs/hooks/hook_civicrm_entityTypes.md        |  2 +-
 docs/hooks/hook_civicrm_optionValues.md       |  2 +-
 docs/hooks/hook_civicrm_post_case_merge.md    |  2 +-
 docs/hooks/hook_civicrm_pre_case_merge.md     |  4 ++--
 docs/hooks/hook_civicrm_selectWhereClause.md  |  2 +-
 docs/hooks/hook_civicrm_tabs.md               |  2 +-
 docs/hooks/hook_civicrm_tokenValues.md        |  2 +-
 docs/hooks/hook_civicrm_tokens.md             |  2 +-
 docs/hooks/hook_civicrm_xmlMenu.md            |  6 +++---
 docs/hooks/index.md                           |  4 ++--
 docs/hooks/setup/symfony.md                   |  2 +-
 docs/tools/buildkit.md                        |  2 +-
 docs/tools/civibuild.md                       |  8 ++++----
 docs/tools/index.md                           | 12 ++++++------
 26 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/docs/api/joins.md b/docs/api/joins.md
index 30521bda..dafb7eee 100644
--- a/docs/api/joins.md
+++ b/docs/api/joins.md
@@ -7,7 +7,7 @@ addresses, you may want to return the name of the associated contact from the
 Contact entity.
 
 The CiviCRM API supports two methods of returning data from associated entities;
-API Joins and [API Chaining](/api/chaining).  API joins provide higher
+API Joins and [API Chaining](/api/chaining.md).  API joins provide higher
 performance by making a single SQL query with a
 [SQL join](https://dev.mysql.com/doc/refman/5.7/en/join.html), and are
 generally preferable to API chaining where available.
@@ -43,15 +43,15 @@ $result = civicrm_api3('Event', 'get', array(
 ));
 ```
 !!! tip
-    Joins are available only with the [get](/api/actions/#getfields),
-    [getsingle](/api/actions/#getsingle), and [getcount](/api/actions/#getcount)
+    Joins are available only with the [get](/api/actions.md#getfields),
+    [getsingle](/api/actions.md#getsingle), and [getcount](/api/actions.md#getcount)
     actions.
 
 ## Identifying fields eligible for a join
 
-It is possible to join an entity to any other entity if the [xml](/core/architecture/#xml)
+It is possible to join an entity to any other entity if the [xml](/core/architecture.md#xml)
 schema identifies a [foreign key](https://en.wikipedia.org/wiki/Foreign_key) or
-a pseudoconstant.  The [getfields](/api/actions/#getfields) action identifies
+a pseudoconstant.  The [getfields](/api/actions.md#getfields) action identifies
 fields that are eligible for an API join.
 
 !!! warning
diff --git a/docs/basics/planning.md b/docs/basics/planning.md
index 7319ece8..6875364c 100644
--- a/docs/basics/planning.md
+++ b/docs/basics/planning.md
@@ -78,7 +78,7 @@ your work by considering how you will provide automated testing for it.
 Starting with the buildkit will make this much simpler for you to set up.
 Getting started with unit-testing may seem daunting and onerous when you start,
 but you will soon come to love the freedom it gives you. If you are
-unsure how to proceed with testing ask the [community](/basics/community).
+unsure how to proceed with testing ask the [community](/basics/community.md).
 
 **Create a native [extension](/extensions/index.md)**.
 If you have new functionality to add to CiviCRM, it probably belongs in an
diff --git a/docs/core/architecture.md b/docs/core/architecture.md
index 2bf2f74b..fc3cd5e8 100644
--- a/docs/core/architecture.md
+++ b/docs/core/architecture.md
@@ -5,7 +5,7 @@ This chapter provides a general overview of the codebase organisation.
 !!! tip
     In order to explore the directories inside the CiviCRM repository it is
     generally quickest to to make a local clone of the CiviCRM from GitHub,
-    or better yet install the [buildkit](/requirements/#buildkit).
+    or better yet install the [buildkit](/requirements.md#buildkit).
 
 !!! tip
     The CiviCRM codebase is object oriented. If you aren't familiar with object
@@ -57,7 +57,7 @@ The CiviCRM **data access objects** (DAOs) are PHP classes that
 ([e.g. `CRM/Pledge/DAO`](https://github.com/civicrm/civicrm-core/tree/master/CRM/Pledge/DAO))
 expose the contents
 of the database.  The release script generates each DAO automatically based
-on the matching XML file in the [data schema](/framework/schema-definition).  DAO objects tend to be instantiated in BAO classes.
+on the matching XML file in the [data schema](/framework/schema-definition.md).  DAO objects tend to be instantiated in BAO classes.
 
 The DAO classes all extend the core
 [DAO base class](https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/DAO.php)
diff --git a/docs/documentation/markdown.md b/docs/documentation/markdown.md
index 626b3c5f..d27ec2d8 100644
--- a/docs/documentation/markdown.md
+++ b/docs/documentation/markdown.md
@@ -62,7 +62,7 @@ Try [CiviCRM](https://civicrm.org) for your database.
 An internal hyperlink on mkdocs. Both of the following syntaxes work because the `.md` is optional. *Make sure to use an absolute path and precede the path with a slash, as shown below.*
 
 ```
-[extensions](/extensions/basics)
+[extensions](/extensions/basics.md)
 [extensions](/extensions/basics.md)
 ```
 
diff --git a/docs/documentation/style-guide.md b/docs/documentation/style-guide.md
index 06530cb8..150c02e4 100644
--- a/docs/documentation/style-guide.md
+++ b/docs/documentation/style-guide.md
@@ -111,7 +111,7 @@ Alternative Text  (ALT Tags) should be included for every image.
 
 ### Machine-readable symbols
 
-Machine-readable symbols (e.g. files names, classes, functions, variables, database tables, database columns, commands, etc.) should be formatted either with inline monospace or preformatted code blocks (also in monospace). See the [markdown syntax](/markdownrules/#code) to use for such formatting.
+Machine-readable symbols (e.g. files names, classes, functions, variables, database tables, database columns, commands, etc.) should be formatted either with inline monospace or preformatted code blocks (also in monospace). See the [markdown syntax](/markdownrules.md#code) to use for such formatting.
 
 ### URLs
 
diff --git a/docs/extensions/civix.md b/docs/extensions/civix.md
index f155c0c3..b2699bf8 100644
--- a/docs/extensions/civix.md
+++ b/docs/extensions/civix.md
@@ -8,7 +8,7 @@ community-endorsed method for building your CiviCRM extensions.
 Follow the installation instructions in the
 [GitHub repository](https://github.com/totten/civix/).
 
-After fulfilling the [Pre-Requisites](/extensions/basics/#pre-requisites), you can verify that all your configuration is correct by running the following command from
+After fulfilling the [Pre-Requisites](/extensions/basics.md#pre-requisites), you can verify that all your configuration is correct by running the following command from
 within your extensions directory with:
 
 ```bash
@@ -31,7 +31,7 @@ civix help civicrm:ping
 ## Generating a skeletal extension {:#generate-module}
 
 To generate a skeletal extension module, we will use `civix generate:module`
-and pass in the name for our extension. See [here](/extensions/basics/#extension-names)
+and pass in the name for our extension. See [here](/extensions/basics.md#extension-names)
 for details of naming conventions.
 
 Start with:
@@ -48,7 +48,7 @@ civix generate:module com.example.myextension --license=AGPL-3.0
 ```
 
 This command will report that it has created three files, following the
-[standard extension structure](/extensions/files).
+[standard extension structure](/extensions/files.md).
 
 The command attempts to auto-detect authorship information (your name and
 email address) by reading your
@@ -191,9 +191,9 @@ to create a new entity. For this, you can use the command `civix generate:entity
 
 1. Run `civix generate:entity MyEntity` (use CamelCase here). This creates a skeletal file for your XML schema, your BAO, and your API. It does NOT create a skeletal SQL file to create your table or DAO files at this time.
 
-1. Edit the [XML schema definitions](/framework/schema-definition) in the `xml` folder to define your desired fields.
+1. Edit the [XML schema definitions](/framework/schema-definition.md) in the `xml` folder to define your desired fields.
 
-1. Generate a [DAO file](/core/architecture/#dao) and SQL to create your table. *(For now, civix does not handle this part. Hopefully these steps will become easier at some point in the future.)*
+1. Generate a [DAO file](/core/architecture.md#dao) and SQL to create your table. *(For now, civix does not handle this part. Hopefully these steps will become easier at some point in the future.)*
 
     1. Begin with a development installation of CiviCRM core (e.g. as installed with buildkit) which has a clean git status. We will henceforth refer to the CiviCRM root directory within this installation as `<civiroot>`. This core installation can actually be any installation, not necessarily the one you're using to develop your extension. We're basically just temporarily hijacking its environment to generate DAO and SQL.
 
@@ -428,7 +428,7 @@ $values = CRM_Core_BAO_CustomValueTable::getValues($params);
 ### Add a hook function
 
 CiviCRM
-[hook functions](/hooks/)
+[hook functions](/hooks.md)
 allow extensions to run extra logic as
 part of the normal CiviCRM processing. For example,
 `hook_civicrm_buildForm()` allows a module to run logic whenever a
diff --git a/docs/extensions/index.md b/docs/extensions/index.md
index de6f0023..4561cdac 100644
--- a/docs/extensions/index.md
+++ b/docs/extensions/index.md
@@ -88,10 +88,10 @@ the entire ecosystem.
 
 Extension authors may make their extensions available to the larger CiviCRM
 community by publishing them in the [Extensions Directory](https://civicrm.org/extensions).
->> See: [Publish](/extensions/publish)
+>> See: [Publish](/extensions/publish.md)
 
-Extensions which undergo a [formal review](/extend-stages#formal-review) may be
+Extensions which undergo a [formal review](/extend-stages.md#formal-review) may be
 distributed in-app. Approved extensions can be [installed
 directly](https://docs.civicrm.org/user/en/master/introduction/extensions/#installing-extensions)
 into CiviCRM via the user interface, lowering the barrier to entry for many users.
->> See: [Automated Distribution](/extensions/publish#automated-distribution)
+>> See: [Automated Distribution](/extensions/publish.md#automated-distribution)
diff --git a/docs/extensions/lifecycle.md b/docs/extensions/lifecycle.md
index bb2c507e..1a618c0d 100644
--- a/docs/extensions/lifecycle.md
+++ b/docs/extensions/lifecycle.md
@@ -164,7 +164,7 @@ The review process assess several criteria, and as a rule of thumb, *Contributed
 
 To become an extensions reviewer, please take the following steps:
 
-1. Set up accounts on these sites *(if you need help, reach out through the [community resources](/basics/community))*
+1. Set up accounts on these sites *(if you need help, reach out through the [community resources](/basics/community.md))*
     1.  [civicrm.org](https://civicrm.org/user/)
     1.  [issues.civicrm.org](https://issues.civicrm.org/jira/login.jsp) - log in using your civicrm.org account
 1.  Contact the [CiviCRM Extension Ecosystem Working
diff --git a/docs/hooks/hook_civicrm_alterMenu.md b/docs/hooks/hook_civicrm_alterMenu.md
index e8b7ccde..4215047c 100644
--- a/docs/hooks/hook_civicrm_alterMenu.md
+++ b/docs/hooks/hook_civicrm_alterMenu.md
@@ -14,9 +14,9 @@ Added in CiviCRM 4.7.11.
 !!! note "Comparison of Related Hooks"
     This is one of three related hooks. The hooks:
 
-    -   [hook_civicrm_navigationMenu](/hooks/hook_civicrm_navigationMenu) manipulates the navigation bar at the top of every screen
-    -    [hook_civicrm_alterMenu](/hooks/hook_civicrm_alterMenu) manipulates the list of HTTP routes (using PHP arrays)
-    -   [hook_civicrm_xmlMenu](/hooks/hook_civicrm_xmlMenu) manipulates the list of HTTP routes (using XML files)
+    -   [hook_civicrm_navigationMenu](/hooks/hook_civicrm_navigationMenu.md) manipulates the navigation bar at the top of every screen
+    -    [hook_civicrm_alterMenu](/hooks/hook_civicrm_alterMenu.md) manipulates the list of HTTP routes (using PHP arrays)
+    -   [hook_civicrm_xmlMenu](/hooks/hook_civicrm_xmlMenu.md) manipulates the list of HTTP routes (using XML files)
 
 
 
diff --git a/docs/hooks/hook_civicrm_caseTypes.md b/docs/hooks/hook_civicrm_caseTypes.md
index 1fa05188..b4656edf 100644
--- a/docs/hooks/hook_civicrm_caseTypes.md
+++ b/docs/hooks/hook_civicrm_caseTypes.md
@@ -5,7 +5,7 @@
 This hook defines available CiviCRM case types.
 
 Note that this hook is actually an adapter
-for [hook_civicrm_managed](/hooks/hook_civicrm_managed)
+for [hook_civicrm_managed](/hooks/hook_civicrm_managed.md)
 , so any case Type defined inside this hook will be automatically
 inserted, updated, deactivated, and deleted in tandem with enabling,
 disabling, and uninstalling the module. For more background, see [API
diff --git a/docs/hooks/hook_civicrm_contactListQuery.md b/docs/hooks/hook_civicrm_contactListQuery.md
index d2e9663f..36fc2ecd 100644
--- a/docs/hooks/hook_civicrm_contactListQuery.md
+++ b/docs/hooks/hook_civicrm_contactListQuery.md
@@ -5,7 +5,7 @@
 !!! warning "Deprecation Notice"
     This hook is called in very few places in version 4.5+ because most contact reference fields have been migrated to go through the api instead of constructing an ad-hoc query. It will be removed in a future version.
 
-    For a substitute, see [hook_civicrm_apiWrappers](/hooks/hook_civicrm_apiWrappers).
+    For a substitute, see [hook_civicrm_apiWrappers](/hooks/hook_civicrm_apiWrappers.md).
 
 
 Use this hook to populate the list of contacts returned by Contact
diff --git a/docs/hooks/hook_civicrm_customFieldOptions.md b/docs/hooks/hook_civicrm_customFieldOptions.md
index 6bb739cb..3edd7578 100644
--- a/docs/hooks/hook_civicrm_customFieldOptions.md
+++ b/docs/hooks/hook_civicrm_customFieldOptions.md
@@ -3,7 +3,7 @@
 ## Description
 
 !!! warning "Deprecated"
-    This hook is deprecated in 4.7 in favor of [hook_civicrm_fieldOptions](/hooks/hook_civicrm_fieldOptions). Use that instead for modifying all option lists, not limited to custom fields.
+    This hook is deprecated in 4.7 in favor of [hook_civicrm_fieldOptions](/hooks/hook_civicrm_fieldOptions.md). Use that instead for modifying all option lists, not limited to custom fields.
 
 
 ## Definition
diff --git a/docs/hooks/hook_civicrm_entityTypes.md b/docs/hooks/hook_civicrm_entityTypes.md
index 69dd53e1..27d4e087 100644
--- a/docs/hooks/hook_civicrm_entityTypes.md
+++ b/docs/hooks/hook_civicrm_entityTypes.md
@@ -2,7 +2,7 @@
 
 ## Description
 
-This hook is called for declaring managed entities via API. [See this tutorial](/extensions/civix/#generate-entity) for a more complete description of creating a managed entity.
+This hook is called for declaring managed entities via API. [See this tutorial](/extensions/civix.md#generate-entity) for a more complete description of creating a managed entity.
 
 ## Definition
 
diff --git a/docs/hooks/hook_civicrm_optionValues.md b/docs/hooks/hook_civicrm_optionValues.md
index fcc0f5dc..12b22d7e 100644
--- a/docs/hooks/hook_civicrm_optionValues.md
+++ b/docs/hooks/hook_civicrm_optionValues.md
@@ -1,7 +1,7 @@
 # hook_civicrm_optionValues
 
 !!! warning "Deprecated"
-    This hook is deprecated in 4.7 in favor of [hook_civicrm_fieldOptions](/hooks/hook_civicrm_fieldOptions). Use that instead for modifying all option lists, not limited to items in the `civicrm_option_values` table.
+    This hook is deprecated in 4.7 in favor of [hook_civicrm_fieldOptions](/hooks/hook_civicrm_fieldOptions.md). Use that instead for modifying all option lists, not limited to items in the `civicrm_option_values` table.
 
 
 ## Description
diff --git a/docs/hooks/hook_civicrm_post_case_merge.md b/docs/hooks/hook_civicrm_post_case_merge.md
index 526d1adb..cc5f5000 100644
--- a/docs/hooks/hook_civicrm_post_case_merge.md
+++ b/docs/hooks/hook_civicrm_post_case_merge.md
@@ -52,4 +52,4 @@ new case.
 
 ## See also
 
-[hook_civicrm_pre_case_merge](/hooks/hook_civicrm_pre_case_merge)
\ No newline at end of file
+[hook_civicrm_pre_case_merge](/hooks/hook_civicrm_pre_case_merge.md)
\ No newline at end of file
diff --git a/docs/hooks/hook_civicrm_pre_case_merge.md b/docs/hooks/hook_civicrm_pre_case_merge.md
index 96a99f22..92b6c783 100644
--- a/docs/hooks/hook_civicrm_pre_case_merge.md
+++ b/docs/hooks/hook_civicrm_pre_case_merge.md
@@ -28,8 +28,8 @@ Added in CIviCRM 4.5
 ## Example
 
 See for an example the documentation of the
-[hook_civicrm_post_case_merge](/hooks/hook_civicrm_post_case_merge)
+[hook_civicrm_post_case_merge](/hooks/hook_civicrm_post_case_merge.md)
 
 ## See also
 
-[hook_civicrm_post_case_merge](/hooks/hook_civicrm_post_case_merge)
\ No newline at end of file
+[hook_civicrm_post_case_merge](/hooks/hook_civicrm_post_case_merge.md)
\ No newline at end of file
diff --git a/docs/hooks/hook_civicrm_selectWhereClause.md b/docs/hooks/hook_civicrm_selectWhereClause.md
index 656ad3e7..45210812 100644
--- a/docs/hooks/hook_civicrm_selectWhereClause.md
+++ b/docs/hooks/hook_civicrm_selectWhereClause.md
@@ -15,7 +15,7 @@ This hook is part of a general permissions refactoring which is not yet
 complete.
 
 The Contact entity is fully covered
-by [hook_civicrm_aclWhereClause](/hooks/hook_civicrm_aclWhereClause)
+by [hook_civicrm_aclWhereClause](/hooks/hook_civicrm_aclWhereClause.md)
 and that is the recommended hook for limiting access to contacts. For
 other entities, we need to increase coverage of this hook by using the
 api internally instead of directly executing sql, and by standardizing
diff --git a/docs/hooks/hook_civicrm_tabs.md b/docs/hooks/hook_civicrm_tabs.md
index 2e3ea6fa..3ac27be1 100644
--- a/docs/hooks/hook_civicrm_tabs.md
+++ b/docs/hooks/hook_civicrm_tabs.md
@@ -5,7 +5,7 @@
 !!! warning "Deprecation Notice"
     This hook has been deprecated in 4.7.
 
-    For a substitute, see [hook_civicrm_tabset](/hooks/hook_civicrm_tabset)
+    For a substitute, see [hook_civicrm_tabset](/hooks/hook_civicrm_tabset.md)
 
 
 This hook is called when composing the tabs to display when viewing a
diff --git a/docs/hooks/hook_civicrm_tokenValues.md b/docs/hooks/hook_civicrm_tokenValues.md
index 2153be59..732d0694 100644
--- a/docs/hooks/hook_civicrm_tokenValues.md
+++ b/docs/hooks/hook_civicrm_tokenValues.md
@@ -5,7 +5,7 @@
 This hook is called to get all the values for the tokens registered. Use
 it to overwrite or reformat existing token values, or supply the values
 for custom tokens you have defined in
-[hook_civicrm_tokens](/hooks/hook_civicrm_tokens).\
+[hook_civicrm_tokens](/hooks/hook_civicrm_tokens.md).\
  See [this
 article](https://civicrm.org/blog/colemanw/create-your-own-tokens-for-fun-and-profit) for
 usage examples.
diff --git a/docs/hooks/hook_civicrm_tokens.md b/docs/hooks/hook_civicrm_tokens.md
index 9c31b194..121d0b7b 100644
--- a/docs/hooks/hook_civicrm_tokens.md
+++ b/docs/hooks/hook_civicrm_tokens.md
@@ -4,7 +4,7 @@
 
 This hook is called to allow custom tokens to be defined. Their values
 will need to be supplied by
-[hook_civicrm_tokenValues](/hooks/hook_civicrm_tokenValues).\
+[hook_civicrm_tokenValues](/hooks/hook_civicrm_tokenValues.md).\
   See [this
 article](https://civicrm.org/blog/colemanw/create-your-own-tokens-for-fun-and-profit)
 for usage examples.
diff --git a/docs/hooks/hook_civicrm_xmlMenu.md b/docs/hooks/hook_civicrm_xmlMenu.md
index 57833029..a83da1e6 100644
--- a/docs/hooks/hook_civicrm_xmlMenu.md
+++ b/docs/hooks/hook_civicrm_xmlMenu.md
@@ -10,9 +10,9 @@ to register your custom module url's in CiviCRM. You will need to visit
 !!! note "Comparison of Related Hooks"
     This is one of three related hooks. The hooks:
 
-    -   [hook_civicrm_navigationMenu](/hooks/hook_civicrm_navigationMenu) manipulates the navigation bar at the top of every screen
-    -    [hook_civicrm_alterMenu](/hooks/hook_civicrm_alterMenu) manipulates the list of HTTP routes (using PHP arrays)
-    -   [hook_civicrm_xmlMenu](/hooks/hook_civicrm_xmlMenu) manipulates the list of HTTP routes (using XML files)
+    -   [hook_civicrm_navigationMenu](/hooks/hook_civicrm_navigationMenu.md) manipulates the navigation bar at the top of every screen
+    -    [hook_civicrm_alterMenu](/hooks/hook_civicrm_alterMenu.md) manipulates the list of HTTP routes (using PHP arrays)
+    -   [hook_civicrm_xmlMenu](/hooks/hook_civicrm_xmlMenu.md) manipulates the list of HTTP routes (using XML files)
 
 
 
diff --git a/docs/hooks/index.md b/docs/hooks/index.md
index 53ce8b89..1d28122e 100644
--- a/docs/hooks/index.md
+++ b/docs/hooks/index.md
@@ -56,7 +56,7 @@ function superextension_civicrm_install() {
 !!! tip
     To see what the parameters for your new function should be just check the 
     documentation, in this case 
-    [hook_civicrm_install](/hooks/hook_civicrm_install/)
+    [hook_civicrm_install](/hooks/hook_civicrm_install.md)
 
 ## Targeting Certain Events
 
@@ -99,7 +99,7 @@ You might find it helpful when implementing a hook to delegate certain
 operations to different functions instead of lumping it all in together in 
 the main hook.
 
-If you're using [Civix](/extensions/civix/) to create your extension it will 
+If you're using [Civix](/extensions/civix.md) to create your extension it will 
 automatically generate wrapper code for your hook. 
 
 For more information you can checkout the README in this 
diff --git a/docs/hooks/setup/symfony.md b/docs/hooks/setup/symfony.md
index 1345298f..ff6bc13f 100644
--- a/docs/hooks/setup/symfony.md
+++ b/docs/hooks/setup/symfony.md
@@ -43,7 +43,7 @@ function _example_say_hello($event) {
 
 !!! tip "Using the `$event` object"
     Hook parameters are passed as an object, `$event`.
-    For example, [`hook_civicrm_alterContent`](/hooks/hook_civicrm_alterContent/)
+    For example, [`hook_civicrm_alterContent`](/hooks/hook_civicrm_alterContent.md)
     has the parameters `(&$content, $context, $tplName, &$object)`.
     You can access the data as `$event->content`, `$event->context`, `$event->tplName`, and `$event->object`.
 
diff --git a/docs/tools/buildkit.md b/docs/tools/buildkit.md
index 61678c1d..9a45a65c 100644
--- a/docs/tools/buildkit.md
+++ b/docs/tools/buildkit.md
@@ -2,7 +2,7 @@
 
 [Buildkit](https://github.com/civicrm/civicrm-buildkit) is a collection of ~20 tools for developing and testing CiviCRM, the most important of which is [civibuild](/tools/civibuild.md).
 
-Many of these tools are commonly used by web developers, so you may have already installed a few. Even so, it's generally easier to [install](/buildkit/setup) the full collection &mdash; installing each individually takes a lot of work.
+Many of these tools are commonly used by web developers, so you may have already installed a few. Even so, it's generally easier to [install](/buildkit/setup.md) the full collection &mdash; installing each individually takes a lot of work.
 
 This is the same collection of tools which manages the test/demo/release infrastructure for civicrm.org.
 
diff --git a/docs/tools/civibuild.md b/docs/tools/civibuild.md
index f2e41ef5..00b174e4 100644
--- a/docs/tools/civibuild.md
+++ b/docs/tools/civibuild.md
@@ -54,7 +54,7 @@ The command will print out URLs and credentials for accessing the website.
 $ civibuild create dmaster --url http://dmaster.localhost --admin-pass s3cr3t
 ```
 
-Once you have a working build of `dmaster`, you can continue working with `civibuild` to create different builds (as described below) or [learn more about other day-to-day development tasks](/buildkit/tutorials).
+Once you have a working build of `dmaster`, you can continue working with `civibuild` to create different builds (as described below) or [learn more about other day-to-day development tasks](/buildkit/tutorials.md).
 
 ## Build Types
 
@@ -159,7 +159,7 @@ cd ~/buildkit/build/dmaster/sites/all/modules/civicrm/
 
 ### Check the status of all git repos {:#upgrade-site-git-scan}
 
-There are multiple git repos in your build (`civicrm-core.git`, `civicrm-packages.git`, etal). Before making a major switch, first double-check that all of these repos are in sane condition &mdash; i.e. there shouldn't be any uncommitted changes, and the repos should be on normal branches. For this purpose, use [git-scan](https://github.com/totten/git-scan), (installed with [buildkit](/tools/buildkit)).
+There are multiple git repos in your build (`civicrm-core.git`, `civicrm-packages.git`, etal). Before making a major switch, first double-check that all of these repos are in sane condition &mdash; i.e. there shouldn't be any uncommitted changes, and the repos should be on normal branches. For this purpose, use [git-scan](https://github.com/totten/git-scan), (installed with [buildkit](/tools/buildkit.md)).
 
 ```
 git scan status
@@ -180,7 +180,7 @@ git scan up
 !!! tip
     If you didn't cleanup earlier, then "fast-forward" may not be possible. It takes some judgment to decide what to do &mdash; e.g. a "merge" versus "rebase". Rather than risk a wrong decision, `git scan` will skip these repos and display warnings instead.)
 
-Alternatively, if you'd like to hop to a specific tag, you can use `givi` (a tool included with [buildkit](/tools/buildkit/)), but keep in mind that if you hop to a *previous* tag with code that expects a different database scheme, there will be no way to run database downgrades.
+Alternatively, if you'd like to hop to a specific tag, you can use `givi` (a tool included with [buildkit](/tools/buildkit.md)), but keep in mind that if you hop to a *previous* tag with code that expects a different database scheme, there will be no way to run database downgrades.
 
 ```
 givi checkout 4.7.17
@@ -204,7 +204,7 @@ drush civicrm-upgrade-db
 
 ## Downgrading a site you installed with civibuild {:#downgrade-site}
 
-If you are [reviewing a pull request](/core/pr-review) you may wish to *downgrade* a civibuild site in order to begin replicating the issue and testing the fix. Currently this is **not possible** with civibuild, so instead you will need to do a [rebuild](#rebuild) with the the `--civi-ver` argument to specify your target version of CiviCRM.
+If you are [reviewing a pull request](/core/pr-review.md) you may wish to *downgrade* a civibuild site in order to begin replicating the issue and testing the fix. Currently this is **not possible** with civibuild, so instead you will need to do a [rebuild](#rebuild) with the the `--civi-ver` argument to specify your target version of CiviCRM.
 
 
 ## Rebuilds {:#rebuild}
diff --git a/docs/tools/index.md b/docs/tools/index.md
index c04dae27..016524cd 100644
--- a/docs/tools/index.md
+++ b/docs/tools/index.md
@@ -2,7 +2,7 @@
 
 ## Tools included with buildkit {:#with-buildkit}
 
-When you install [buildkit](/buildkit) you'll get all these tools.
+When you install [buildkit](/buildkit.md) you'll get all these tools.
 
 *This list of tools is also maintained [in the buildkit readme file](https://github.com/civicrm/civicrm-buildkit/blob/master/README.md).*
 
@@ -15,13 +15,13 @@ When you install [buildkit](/buildkit) you'll get all these tools.
     * *documentation: run `cv list`*
     * *[repository](https://github.com/civicrm/cv)*
 * `civix` - Generate skeletal code for CiviCRM extensions
-    * *[documentation](/extensions/civix)*
+    * *[documentation](/extensions/civix.md)*
     * *[repository](https://github.com/totten/civix)*
 * `civistrings` - Scan code for translatable strings (*.pot)
     * *documentation: run `civistrings --help`*
     * *[repository](https://github.com/civicrm/civistrings)*
 * `cividist` - Generate tarballs from a series of git branches/tags
-    * *[documentation](/buildkit/cividist)*
+    * *[documentation](/buildkit/cividist.md)*
     * *repository: [within civicrm-buildkit](https://github.com/civicrm/civicrm-buildkit/blob/master/bin/cividist)*
 * `gitify` - Convert a CiviCRM installation to a git repo
     * *documentation: run `gitify` with no arguments*
@@ -41,7 +41,7 @@ When you install [buildkit](/buildkit) you'll get all these tools.
 
 ### External tools installed with buildkit {:#external}
 
-These tools are not specific to CiviCRM, so you may already have some of them installed on your system. If you install [buildkit](/buildkit) you'll get all these tools at once, in addition to the CiviCRM-specific tools listed above.
+These tools are not specific to CiviCRM, so you may already have some of them installed on your system. If you install [buildkit](/buildkit.md) you'll get all these tools at once, in addition to the CiviCRM-specific tools listed above.
 
 * Dependency management
     * [composer](http://getcomposer.org/) - Manage dependencies for PHP code.
@@ -69,13 +69,13 @@ These tools are not specific to CiviCRM, so you may already have some of them in
 * [git](https://git-scm.com/) - version control system
 * [psysh](http://psysh.org/) - a reply-echo-print-loop for PHP (like `php -a`, but better)
 * [MySQL Workbench](https://www.mysql.com/products/workbench/) - A graphical interface to your local (or remote) MySQL server
-* [MkDocs](http://www.mkdocs.org) - for [editing documentation](/documentation)
+* [MkDocs](http://www.mkdocs.org) - for [editing documentation](/documentation.md)
 
 ### Text editors
 
 If you already have a text editor you love, then stick to that. If you're new and need some recommendations, here are some of the most popular text editors among CiviCRM developers:
 
-* [PhpStorm](https://www.jetbrains.com/phpstorm/) *(See [CiviCRM-specific notes on PhpStorm](/tools/phpstorm))*
+* [PhpStorm](https://www.jetbrains.com/phpstorm/) *(See [CiviCRM-specific notes on PhpStorm](/tools/phpstorm.md))*
 * [NetBeans](https://netbeans.org/)
 * [Sublime](https://www.sublimetext.com/)
 * [Atom](https://atom.io/)
-- 
GitLab