diff --git a/CHANGELOG.md b/CHANGELOG.md index a558b4c28..789593d96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,11 +30,15 @@ For the full list of changes, see the [0.x.y] release notes. - Support for Right-To-Left (RLT) languages is reintroduced via [Bootstrap's base support for RTL][bs-rtl]. +- The URL to your project's contribution guidelines is configurable. For + details, see [Adding a community page]. -**Other changes**: +**Other changes**: TBC [0.x.y]: https://github.com/google/docsy/releases/latest?FIXME=v0.X.Y [bs-rtl]: https://getbootstrap.com/docs/5.3/getting-started/rtl/ +[Adding a community page]: + https://www.docsy.dev/docs/adding-content/content/#adding-a-community-page ## 0.10.0 diff --git a/layouts/partials/community_links.html b/layouts/partials/community_links.html index 4f0505ebc..7a033fc39 100644 --- a/layouts/partials/community_links.html +++ b/layouts/partials/community_links.html @@ -1,4 +1,5 @@ {{ $links := .Site.Params.links -}} +{{ $contribUrl := .Params.contributingUrl | default "docs/contribution-guidelines" -}} diff --git a/userguide/content/en/docs/adding-content/content.md b/userguide/content/en/docs/adding-content/content.md index 9c5d60505..c9f458c52 100644 --- a/userguide/content/en/docs/adding-content/content.md +++ b/userguide/content/en/docs/adding-content/content.md @@ -599,6 +599,16 @@ params: If you're creating your own site and want to add a page using this template, add a `/community/_index.md` file in your content root directory. If you've copied the example site and *don't* want a community page, just delete the `/content/en/community/` directory in your project repo. +By default, Docsy layouts assume that your project's contributing page is found +at `/docs/contribution-guidelines`. To specify another URL, add it to +the front matter of `/community/_index.md` as illustrated next. The URL can be +an external URL or a local path: + +```yaml +params: + contributingUrl: docs/contributing/ +``` + ## Adding static content You may want to serve some non-Hugo-built content along with your site: for example, if you have generated reference docs using Doxygen, Javadoc, or other doc generation tools.