Skip to content

Commit

Permalink
Merge branch 'main' into tab-right
Browse files Browse the repository at this point in the history
  • Loading branch information
LisaFC committed Jun 13, 2022
2 parents f22ef63 + 436ae87 commit 23e7ddf
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM klakegg/hugo:0.95.0-ext-alpine as docsy-user-guide

RUN apk update
RUN apk add git
COPY package.json /app/docsy/userguide/
WORKDIR /app/docsy/userguide/
RUN npm install --production=false

CMD ["serve", "--cleanDestinationDir", "--themesDir ../..", "--baseURL http://localhost:1313/", "--buildDrafts", "--buildFuture", "--disableFastRender", "--ignoreCache", "--watch"]
14 changes: 14 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3.3"

services:

site:
image: docsy/user-guide
build:
context: .
ports:
- "1313:1313"
user: "${DOCSY_USER}"
volumes:
- /app/docsy/userguide/node_modules
- .:/app/docsy
2 changes: 1 addition & 1 deletion layouts/partials/page-meta-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<a href="{{ $viewURL }}" class="td-page-meta--view" target="_blank" rel="noopener"><i class="fa fa-file-alt fa-fw"></i> {{ T "post_view_this" }}</a>
<a href="{{ $editURL }}" class="td-page-meta--edit" target="_blank" rel="noopener"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
<a href="{{ $newPageURL }}" class="td-page-meta--child" target="_blank" rel="noopener"><i class="fa fa-edit fa-fw"></i> {{ T "post_create_child_page" }}</a>
<a href="{{ $issuesURL }}" class="td-page-meta--issue" target="_blank" rel="noopener"><i class="fab fa-github fa-fw"></i> {{ T "post_create_issue" }}</a>
<a href="{{ $issuesURL }}" class="td-page-meta--issue" target="_blank" rel="noopener"><i class="fas fa-tasks fa-fw"></i> {{ T "post_create_issue" }}</a>
{{ with $gh_project_repo -}}
{{ $project_issueURL := printf "%s/issues/new" . -}}
<a href="{{ $project_issueURL }}" class="td-page-meta--project-issue" target="_blank" rel="noopener"><i class="fas fa-tasks fa-fw"></i> {{ T "post_create_project_issue" }}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The Docsy [docs and blog layouts](/docs/adding-content/content/#adding-docs-and-

This page shows you how to configure these links.

Currently, Docsy supports only GitHub repository links "out of the box". If you are using another repository such as Bitbucket and would like generated repository links, feel free to [add a feature request or update our theme](/docs/contribution-guidelines/).
Currently, Docsy supports only GitHub repository links "out of the box". Since GitLab can handle the same link scheme, it should work as well. If you are using another repository such as Bitbucket and would like generated repository links, feel free to [add a feature request or update our theme](/docs/contribution-guidelines/).

## Link configuration

Expand Down
45 changes: 45 additions & 0 deletions userguide/content/en/docs/Contribution guidelines/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,51 @@ If you want to run your own local Hugo server to preview your changes as you wor
1. Continue with the usual GitHub workflow to edit files, commit them, push the
changes up to your fork, and create a pull request.

#### Preview your changes using a Docker container

Docsy comes with `Dockerfile` and `docker-compose` files to run the server
locally with Docker, without installing any additional dependencies.

- Using [Docker]:

1. Build the Docker container:

```bash
docker build -t docsy/user-guide
```

1. Run the container, mounting the repository as a shared volume:

```bash
docker run -it --user=$(id -u):$(id -g) -p 1313:1313 \
-v $(pwd):/app/docsy -v /app/docsy/userguide/node_modules \
docsy/user-guide
```

- Using [Docker Compose][docker-compose]:

1. Build the container:

```bash
docker-compose build
```

1. Run the container:

```bash
DOCSY_USER=$(id -u):$(id -g) docker-compose up
```

Open `http://localhost:1313` in your web browser to load the docsy user guide.
In most cases, docsy will automatically reload the site to reflect any changes
to the documentation or the code. Changes to some parts of the docsy code may
require manually reloading the page or re-starting the container.

Press **Ctrl + C** to stop the container.

[docker]: https://docs.docker.com/get-docker/
[docker-compose]: https://docs.docker.com/compose/install/

### Creating an issue

If there's something you'd like to see in the docs, but you're not sure how to fix it yourself, please create an issue in [this repository](https://github.com/google/docsy). You can also create an issue about a specific page by clicking the **Create Issue** button in the top right hand corner of the page.
Expand Down

0 comments on commit 23e7ddf

Please sign in to comment.