You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _learn/01-sphinx-python-rtd.md
+15-37Lines changed: 15 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,58 +6,36 @@ image:
6
6
caption: "Python and Sphinx"
7
7
---
8
8
9
-
Sphinx works with either major versions of Python active today, Python 2 and Python 3. Python 3 is the current and recommended version. Sphinx is a documentation tool that creates HTML, CSS, and JavaScript files from [ReStructured](http://docutils.sourceforge.net/rst.html) text files.
9
+
Sphinx works with either major versions of Python active today, Python 2 and Python 3. Python 3 is the current and recommended version, and Python 2 is an unsupported Python version. Sphinx is a documentation tool that creates HTML, CSS, and JavaScript files from [ReStructured](http://docutils.sourceforge.net/rst.html) text files.
10
10
11
-
In case you need both versions, this tutorial walks through both on a Mac. Refer to the [Downloads on the Python site](https://www.python.org/downloads/windows/) for Windows.
11
+
In case you need both versions, refer to the [Downloads on the Python site](https://www.python.org/downloads/).
12
12
13
-
#### Installing Python 2.7.x on Mac
13
+
##Prerequisites
14
14
15
-
1. Open a terminal and use `brew` to install Python 2.7.x.
15
+
* MacOS or a Linux-based environment in which to install Python.
16
+
* Homebrew installed on MacOS. Get installation instructions from https://brew.sh/.
16
17
17
-
```
18
-
brew install python@2
19
-
```
18
+
## Installing Python 3.x
20
19
21
-
#### Installing Python 3.x
20
+
You want the latest version of Python 3 available.
22
21
23
-
You also want the latest version of Python 3 available.
24
-
25
-
1. Open a terminal and use brew to install the latest Python 3.x (currently 3.7).
22
+
1. Open a terminal and use `brew` to install the latest Python 3.x (currently 3.7).
26
23
27
24
```
28
25
brew install python
29
26
```
30
27
31
-
#### Verifying Python 2 and Python 3
28
+
### Verifying the Python installation
32
29
33
30
1. Open a terminal.
34
-
1. Verify that Python 2 is correctly installed.
35
-
36
-
```
37
-
python2.7 -V
38
-
```
39
-
Expected output for August 2018:
40
-
```
41
-
Python 2.7.15
42
-
```
43
31
1. Verify that Python 3 is correctly installed.
44
32
45
-
```
46
-
python3.7 -V
47
-
```
48
-
Expected output for August 2018:
49
-
```
50
-
Python 3.7.0
51
-
```
52
-
53
-
1. Check the version set as the default version, the version of Python that is executed when you simply enter `python`. The default version of Python remains a Python 2.7 version.
54
-
55
33
```
56
34
python -V
57
35
```
58
-
Expected output for August 2018:
36
+
Expected output for February 2020:
59
37
```
60
-
Python 2.7.15
38
+
Python 3.7.6
61
39
```
62
40
63
41
## Set Up Virtual Environment
@@ -68,10 +46,10 @@ Most people use Virtual Environments because it's a recommended practice when wo
68
46
69
47
**Python 3**
70
48
71
-
1. First create a Python 3 virtual environment using the `venv` module included with Python 3. Notice the example uses `python3.7` to be clear which version of Python you want.
49
+
1. First create a Python 3 virtual environment using the `venv` module included with Python 3.
72
50
73
51
```
74
-
python3.7 -m venv py3-sphinx
52
+
python -m venv py3-sphinx
75
53
```
76
54
77
55
1. Now "activate" the environment. Look for the name of the virtual environment enclosed in parenthesis after activation.
@@ -88,11 +66,11 @@ Most people use Virtual Environments because it's a recommended practice when wo
88
66
1. Now verify that `python` is now linked to Python 3.
Copy file name to clipboardExpand all lines: _learn/02-jekyll-ruby-gh-pages.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,12 @@ image:
9
9
10
10
Jekyll is a Static Site Generator that typically accepts [Markdown](https://commonmark.org/help/) for authoring. [Jekyll](https://jekyllrb.com/) has its own documentation site and a [Quickstart](https://jekyllrb.com/docs/). To prepare your environment to build Jekyll sites locally, follow the instructions for either Windows or MacOS.
11
11
12
+
## Prerequisites
13
+
* Windows, MacOS, or a Linux-based environment.
14
+
* On MacOS, you will install [Homebrew](https://brew.sh).
15
+
* On Windows, you must install Docker.
16
+
* On Windows, you must install [Git for Windows](https://gitforwindows.org/) which includes Git Bash.
17
+
12
18
## Set up Ruby and Jekyll on Windows with Docker
13
19
14
20
On Windows, first install [Docker](https://docs.docker.com/docker-for-windows/) and [Git Bash](https://gitforwindows.org/), so that you are able to use Linux-based Docker images and commands. Then follow these steps to set up Jekyll and Ruby.
Copy file name to clipboardExpand all lines: _learn/03-hugo-go-netlify.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,12 @@ To build Hugo sites locally, install Homebrew and Hugo. You do not need to insta
11
11
12
12
Since Hugo is built on Go, you can use the binary for your operating system. No need to maintain a development environment. Upgrades are easy too, get a new binary and install it and you're upgraded.
13
13
14
+
## Prerequisites
15
+
* Windows, MacOS, or a Linux-based environment.
16
+
* On MacOS, you will install [Homebrew](https://brew.sh).
17
+
* On Windows, you must install Docker.
18
+
* On Windows, you must install [Git for Windows](https://gitforwindows.org/) which includes Git Bash.
19
+
14
20
## Set up Hugo on Windows with Git Bash and Docker
15
21
16
22
You can also set up Docker and then use this [Docker image](https://hub.docker.com/r/jguyomard/hugo-builder/), and set up alias commands for `hugo` running in Docker, but using the same `hugo` commands in Git Bash on Windows.
0 commit comments