@@ -4,12 +4,12 @@ We'd love to accept your patches and contributions to this project.
4
4
5
5
## Development Environment
6
6
7
- If you are contributing documentation (rather than samples ) and want to be able
8
- to view it in your browser, the easiest way to do so is to run the provided
7
+ If you are contributing AIP content (rather than code ) and want to be able to
8
+ view it in your browser, the easiest way to do so is to run the provided
9
9
development server.
10
10
11
- We use [ GitHub Pages] [ 1 ] to make this documentation available, which uses
12
- [ Jekyll ] [ 2 ] under the hood .
11
+ We use [ GitHub Pages] [ 1 ] to make this documentation available, and a specific
12
+ [ site generator ] [ 2 ] to build the site .
13
13
14
14
If you have [ Docker] [ 3 ] installed, clone this repository and run the ` serve.sh `
15
15
file at the root of the repository. This script does two things:
@@ -18,45 +18,35 @@ file at the root of the repository. This script does two things:
18
18
as ` aip-site ` .
19
19
- It runs the ` aip-site ` image.
20
20
21
- The Jekyll development server uses port 4000 by default ; point your web browser
22
- to ` http://localhost:4000 ` , and you should see the site.
21
+ The development server uses port 4000; point your web browser to
22
+ ` http://localhost:4000 ` , and you should see the site.
23
23
24
24
** Note:** After building the Docker image for the first time, you may
25
- experience issues if Ruby dependencies change underneath you. If this happens,
26
- remove your Docker image (` docker rmi aip-site ` ) and run ` serve.sh ` again.
25
+ experience issues if Python dependencies change underneath you. If this
26
+ happens, remove your Docker image (` docker rmi aip-site ` ) and run ` serve.sh `
27
+ again.
27
28
28
29
### Arguments
29
30
30
- Any arguments provided to ` serve.sh ` (or ` docker run ` ) are forwarded to Jekyll.
31
- Note that the Docker entrypoint automatically provides ` --destination ` and
32
- ` --host ` arguments, and you should not change these. Additionally, changing
33
- ports is not advised (call ` docker run ` yourself with a customized ` -p ` switch
34
- if you need to use custom ports).
31
+ Any arguments provided to ` serve.sh ` (or ` docker run ` ) are forwarded (however,
32
+ the current site generator does not honor any; this may change in the future).
35
33
36
34
### Hot reloading
37
35
38
- The Jekyll development server supports "hot reloading" (where local changes
39
- will be automatically reflected in your browser without having to manually
40
- reload). You can activate this by sending the ` --livereload ` flag (` -l ` for
41
- short) to ` serve.sh ` .
36
+ The development server recognizes when files change (including static files)
37
+ and local changes will be automatically reflected in your browser upon reload.
42
38
43
39
### Local Installation
44
40
45
41
It is possible to run the development server locally also. The general gist of
46
42
how to do so correctly is:
47
43
48
- - Install [ rbenv] ( https://github.com/rbenv/rbenv ) .
49
- - Use rbenv to install an appropriate version of Ruby.
50
- - ` gem install bundler `
51
- - ` bundle install `
52
-
53
- Once this is done, you can run ` bundle exec jekyll serve ` to run the
54
- development server (as above, include ` --livereload ` to get automatic
55
- reloading).
56
-
57
- ** Note:** The Jekyll default setup will write the static site in-place to the
58
- ` _site ` subdirectory. (The Docker image redirects this to an arbitrary spot in
59
- the image so as not to pollute the local disk.)
44
+ - Install Python 3.8 if you do not already have it (direct install is fine, but
45
+ [ pyenv] [ 5 ] is probably the best way if you have other Python projects).
46
+ - Create a Python 3.8 [ venv] [ 6 ] . Once it is created, activate it in your shell
47
+ (` source path/to/venv/bin/activate ` ).
48
+ - ` pip install git+https://github.com/aip-dev/site-generator.git `
49
+ - ` aip-site-serve . `
60
50
61
51
## Contributor License Agreement
62
52
@@ -84,6 +74,8 @@ to ensure a consistent style throughout our source. You can add prettier as a
84
74
plugin in most development environments.
85
75
86
76
[ 1 ] : https://pages.github.com/
87
- [ 2 ] : https://jekyllrb .com/
77
+ [ 2 ] : https://github .com/aip-dev/site-generator
88
78
[ 3 ] : https://docker.com/
89
79
[ 4 ] : https://prettier.io/
80
+ [ 5 ] : https://github.com/pyenv/pyenv
81
+ [ 6 ] : https://docs.python.org/3/library/venv.html
0 commit comments