From 80d72f919c8a1d13da025cabbbab3511d8724cf2 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 7 Dec 2017 21:43:55 +0000 Subject: [PATCH 1/2] Specify version of python --- content/api/_index.md | 2 ++ content/tutorials/python-whirlwind-tour.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/content/api/_index.md b/content/api/_index.md index 37dc8100..0ea47c01 100644 --- a/content/api/_index.md +++ b/content/api/_index.md @@ -2,6 +2,8 @@ title: Python API --- +Programming your robot is done in [Python](https://www.python.org/), specifically version 3.5. You can learn more about Python from their [docs](https://docs.python.org/3.5/), and our [whirlwind tour](/tutorials/python-whirlwind-tour). + ## Setup The following two lines are required to setup the robot. diff --git a/content/tutorials/python-whirlwind-tour.md b/content/tutorials/python-whirlwind-tour.md index 8f393139..e66e584e 100644 --- a/content/tutorials/python-whirlwind-tour.md +++ b/content/tutorials/python-whirlwind-tour.md @@ -1,7 +1,7 @@ --- title: "Python: A Whirlwind Tour" --- -In this tutorial, we'll introduce the basic concepts of programming, which will be central to the programs that you will run on your robot. There are many different languages in which computers can be programmed, all with their advantages and disadvantages, but we use [Python](https://www.python.org/), specifically version 3. We chose Python because it's easy to learn, but also elegant and powerful. +In this tutorial, we'll introduce the basic concepts of programming, which will be central to the programs that you will run on your robot. There are many different languages in which computers can be programmed, all with their advantages and disadvantages, but we use [Python](https://www.python.org/). We chose Python because it's easy to learn, but also elegant and powerful. At the end of the tutorial are exercises. The first ones for each section should be quite easy, while the higher-numbered exercises will be harder. Some will be very hard; try these if you're up for a challenge. From 3a5643b8d7b787eaf79aac256e1e17f6bfe46513 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 12 Dec 2017 09:02:03 +0000 Subject: [PATCH 2/2] Use a variable to specify python version --- config.yml | 2 ++ content/api/_index.md | 2 +- content/tutorials/python-whirlwind-tour.md | 2 +- layouts/shortcodes/python_version.html | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 layouts/shortcodes/python_version.html diff --git a/config.yml b/config.yml index 5da75e9a..25713cd6 100644 --- a/config.yml +++ b/config.yml @@ -13,6 +13,8 @@ params: editURL: "https://github.com/sourcebots/docs/tree/master/content/" ordersectionsby: "title" + pythonVersion: 3.5 + menu: shortcuts: - name: " Github Repo" diff --git a/content/api/_index.md b/content/api/_index.md index 0ea47c01..385a9524 100644 --- a/content/api/_index.md +++ b/content/api/_index.md @@ -2,7 +2,7 @@ title: Python API --- -Programming your robot is done in [Python](https://www.python.org/), specifically version 3.5. You can learn more about Python from their [docs](https://docs.python.org/3.5/), and our [whirlwind tour](/tutorials/python-whirlwind-tour). +Programming your robot is done in [Python](https://www.python.org/), specifically version {{% python_version %}}. You can learn more about Python from their [docs](https://docs.python.org/{{% python_version %}}/), and our [whirlwind tour](/tutorials/python-whirlwind-tour). ## Setup The following two lines are required to setup the robot. diff --git a/content/tutorials/python-whirlwind-tour.md b/content/tutorials/python-whirlwind-tour.md index e66e584e..6ed2e89b 100644 --- a/content/tutorials/python-whirlwind-tour.md +++ b/content/tutorials/python-whirlwind-tour.md @@ -1,7 +1,7 @@ --- title: "Python: A Whirlwind Tour" --- -In this tutorial, we'll introduce the basic concepts of programming, which will be central to the programs that you will run on your robot. There are many different languages in which computers can be programmed, all with their advantages and disadvantages, but we use [Python](https://www.python.org/). We chose Python because it's easy to learn, but also elegant and powerful. +In this tutorial, we'll introduce the basic concepts of programming, which will be central to the programs that you will run on your robot. There are many different languages in which computers can be programmed, all with their advantages and disadvantages, but we use [Python](https://www.python.org/), Specifically {{% python_version %}}. We chose Python because it's easy to learn, but also elegant and powerful. At the end of the tutorial are exercises. The first ones for each section should be quite easy, while the higher-numbered exercises will be harder. Some will be very hard; try these if you're up for a challenge. diff --git a/layouts/shortcodes/python_version.html b/layouts/shortcodes/python_version.html new file mode 100644 index 00000000..4b59ca35 --- /dev/null +++ b/layouts/shortcodes/python_version.html @@ -0,0 +1 @@ +{{ .Site.Params.pythonVersion }} \ No newline at end of file