Skip to content

Commit

Permalink
[feat] Support contributingUrl param
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Aug 5, 2024
1 parent 03221fd commit 9d82cf9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layouts/partials/community_links.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ $links := .Site.Params.links -}}
{{ $contribUrl := .Params.contributingUrl | default "docs/contribution-guidelinesx" -}}

<section class="row td-box td-box--white td-box--height-auto linkbox">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
Expand All @@ -16,7 +17,7 @@ <h2>{{ T "community_develop" }}</h2>
{{ end }}
<p>
{{ T "community_how_to" . }}
<a href="{{ "docs/contribution-guidelines" | relURL }}">{{ T "community_guideline" }}</a>.
<a href="{{ $contribUrl | relURL }}">{{ T "community_guideline" }}</a>.
</p>
</div>
</section>
Expand Down
10 changes: 10 additions & 0 deletions userguide/content/en/docs/adding-content/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<baseURL>/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.
Expand Down

0 comments on commit 9d82cf9

Please sign in to comment.