Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "ROS 2 Documentation",
"build": {
"dockerfile": "../docker/image/Dockerfile"
},
"workspaceMount": "source=${localWorkspaceFolder},target=/tmp/doc_repository,type=bind",
"workspaceFolder": "/tmp/doc_repository",
"postCreateCommand": "pip3 install --no-warn-script-location --user -r requirements.txt -c constraints.txt",
"features": {
"ghcr.io/devcontainers/features/git:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"ritwickdey.LiveServer"
]
}
}
}
1 change: 1 addition & 0 deletions docker/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARG user=rosindex
ARG uid=1000

ENV DEBIAN_FRONTEND noninteractive
ENV SHELL /bin/bash

RUN apt-get update && \
apt-get install --no-install-recommends -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,29 @@ To check for broken links on the site, run:

This will check the entire site for broken links, and output the results to the screen and ``build/linkcheck``.

Building the Site with GitHub Codespaces
----------------------------------------
First, you need to have a GitHub account (If you don't have one, you can create one for free). Then, you need to go to the `ROS 2 Documentation GitHub repository <https://github.com/ros2/ros2_documentation>`_. After that, you can open the repository in Codespaces, it can be done just by clicking on the "Code" button on the repository page, then choose "Open with Codespaces" from the dropdown menu.

.. image:: images/codespaces.png
:width: 100%
:alt: Codespaces creation

After that, you will be redirected to your Codespaces page, where you can see the progress of the Codespaces creation. Once it is done, a Visual Studio Code tab will be opened in your browser. You can open the terminal by clicking on the "Terminal" tab in the top panel or by pressing :kbd:`Ctrl-J`.

In this terminal, you can run any command you want, for example, you can run the following command to build the site for just this branch:

.. code-block:: console

make html

Finally, to view the site, you can click on the "Go Live" button in the right bottom panel and then, it will open the site in a new tab in your browser (you will need to browse to the ``build/html`` folder).

.. image:: images/live_server.png
:width: 100%
:alt: Live Server


Writing pages
-------------

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.