diff --git a/.devcontainer.json b/.devcontainer.json new file mode 100644 index 0000000000..943a069ffe --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1,33 @@ +// Codespaces environment for docs.github.com +// For format details, see https://aka.ms/vscode-remote/devcontainer.json +{ + "name": "docs.github.com", + "service": "container-doc", +<<<<<<< HEAD +<<<<<<< HEAD +======= +======= + "dockerFile": "Dockerfile", +>>>>>>> f1a1374d... Use project's Dockerfile for codespaces + // Use 'settings' to set *default* container specific settings.json values on container create. + // You can edit these settings after create using File > Preferences > Settings > Remote. +>>>>>>> 4954e202... Add codespaces environment + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "cSpell.language": ",en" + }, +<<<<<<< HEAD + // Install pre-requisites, and start to serve docs.github.com locally + "postCreateCommand": "npm install && npm start", + "forwardPorts": [4000], + // Visual Studio Code extensions which help authoring for docs.github.com. +======= + "postCreateCommand": "npm install && npm start", + "appPort": 4000, + // Add the IDs of extensions you want installed when the container is created in the array below. +>>>>>>> 4954e202... Add codespaces environment + "extensions": [ + "yzhang.markdown-all-in-one", + "streetsidesoftware.code-spell-checker" + ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eca9d11723..6d42a27390 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,8 +27,15 @@ Fork using GitHub Desktop: - Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)! Fork using the command line: + - [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them. +Fork, edit and preview using [GitHub Codespaces](https://github.com/features/codespaces): + +- With one click of a button, simply fork, start to edit and preview the documentation, without having to install anything. + + ![](./assets/images/codespaces.gif) + ### Make your update: Make your changes to the file(s) you'd like to update. Here are some tips and tricks for [using the docs codebase](#working-in-the-githubdocs-repository). - Are you making changes to the application code? You'll need **Node.js v14** to run the site locally. See [contributing/development.md](contributing/development.md). diff --git a/assets/images/codespaces-with-preview.jpg b/assets/images/codespaces-with-preview.jpg new file mode 100644 index 0000000000..d5a874ef49 Binary files /dev/null and b/assets/images/codespaces-with-preview.jpg differ diff --git a/assets/images/codespaces.gif b/assets/images/codespaces.gif new file mode 100644 index 0000000000..5515d044ea Binary files /dev/null and b/assets/images/codespaces.gif differ diff --git a/contributing/development.md b/contributing/development.md index 5fa66a72a5..d646d81dc4 100644 --- a/contributing/development.md +++ b/contributing/development.md @@ -23,6 +23,16 @@ You should now have a running server! Visit [localhost:4000](http://localhost:40 When you're ready to stop your local server, type CTRLc in your terminal window. +### Using GitHub Codespaces + +As an alternative, you can simply use [GitHub Codespaces](https://github.com/features/codespaces): + +![](../assets/images/codespaces.gif) + +In a matter of minutes, you will be ready to edit, preview and test your changes directly from the comfort of your browser. + +![](../assets/images/codespaces-with-preview.jpg) + ## Site structure This site was originally a Ruby on Rails web application. Some time later it was converted into a static site powered by [Jekyll](https://jekyllrb.com/). A few years after that it was migrated to [Nanoc](https://nanoc.ws/), another Ruby static site generator.