Skip to content

Commit f99da10

Browse files
authored
Merge pull request creativecommons#639 from creativecommons/readme-and-projects
Readme and projects
2 parents 14b1440 + e8ca57a commit f99da10

File tree

6 files changed

+80
-33
lines changed

6 files changed

+80
-33
lines changed

README.md

+67-32
Original file line numberDiff line numberDiff line change
@@ -45,75 +45,110 @@ via lektor (see [Deployment](#deployment), below).
4545

4646
## Installation
4747

48-
### Pre-Requisites
48+
### Prerequisites
4949

5050
Make sure you have:
51-
52-
* [pipenv][pipenvdocs]
53-
54-
* [Node.js][nodejswebsite] **v12+** and [npm][npmdocs] installed.
51+
- [pipenv][pipenvdocs]
52+
- [Node.js][nodejswebsite] **v12+** and [npm][npmdocs] installed.
5553

5654
To install these, execute the following commands:
57-
58-
> For macOS:
59-
60-
1. `brew install pipenv node`
61-
62-
> For GNU/Linux:
63-
64-
1. [Installing Pipenv][pipenvinstall]
65-
2. [Install Node.js][nodeinstall]
66-
3. `sudo apt update`
67-
4. `sudo apt install npm `
55+
- macOS:
56+
1. Install [Homebrew][homebrew]
57+
1. Install pipenv and node:
58+
```
59+
brew install pipenv node
60+
```
61+
- GNU/Linux:
62+
1. [Installing Pipenv][pipenvinstall]
63+
2. [Install Node.js][nodeinstall] (or see the
64+
[detailed instructions][nodedetailed])
65+
3. Upate packges:
66+
```
67+
sudo apt update
68+
```
69+
4. Install npm:
70+
```
71+
sudo apt install npm
72+
```
6873
6974
[pipenvdocs]: https://pipenv.pypa.io/en/latest/
7075
[nodejswebsite]: https://nodejs.org/en/
71-
[npmdocs]: https://docs.npmjs.com/
76+
[npmdocs]: https://docs.npmjs.com/
77+
[homebrew]: https://brew.sh/
7278
[pipenvinstall]: https://pipenv.pypa.io/en/latest/install/#installing-pipenv
7379
[nodeinstall]: https://github.com/nodesource/distributions/blob/master/README.md#table-of-contents
80+
[nodedetailed]: https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions
7481
7582
7683
### Installing Project Requirements
7784
7885
1. Clone this repository.
79-
2. Open your command line interface and `cd` to the repository root directory.
80-
3. Run `pipenv install --dev` to create a Python virtual environment and install the requirements for this project.
86+
2. Open your command line interface change directories to the repository root
87+
directory.
88+
3. Create a Python virtual environment and install the requirements for this
89+
project:
90+
```
91+
pipenv install --dev
92+
```
8193
8294
8395
### pipenv Troubleshooting
8496
8597
`pipenv` doesn't always provide the best error messages ([Provide better error
8698
message if the project’s virtual environment is broken][pipenverror]). If all
8799
else fails, try removing the virtual environment and reinstalling:
88-
1. `pipenv --rm`
89-
2. `pipenv install --dev`
100+
1. Remove virtual environment:
101+
```
102+
pipenv --rm
103+
```
104+
2. Install virtual environment (including dev packages):
105+
```
106+
pipenv install --dev
107+
```
90108
91109
[pipenverror]:https://github.com/pypa/pipenv/issues/1918
92110
93111
94112
## Development
95113
96-
- Run `pipenv run lektor server -f webpack` to start the Lektor development
97-
server.
114+
- Start the Lektor development server:
115+
```
116+
pipenv run lektor server -f webpack
117+
```
98118
- You will be able to see the website at [`http://localhost:5000/`][local5000].
99119
- The Lektor server will rebuild the site every time you change any content.
100120
101121
[local5000]:http://localhost:5000/
102122
123+
103124
### Troubleshooting Possible Errors
104125
105-
* Should you get series of type errors that looks something like `npm ERR! typeerror Error: Missing required argument #1`, after running `pipenv run lektor server -f webpack`, this is most likely due to running an older version of Node.js.
126+
- Should you get series of type errors that looks something like `npm ERR!
127+
typeerror Error: Missing required argument #1`, after running `pipenv run
128+
lektor server -f webpack`, this is most likely due to running an older
129+
version of Node.js.
106130
107-
As stated earlier in the prerequisites, you should be running Node.js version 12+.
108-
Follow [this](https://github.com/nodesource/distributions/blob/master/README.md#table-of-contents) tutorial to upgrade your node version (for GNU/Unix systems).
131+
As stated above in [Prerequisites](#prerequisites), you should be running
132+
Node.js version 12+.
109133
110-
* Should you get an `OSError: [Errno 28] inotify watch limit reached` after running any command, this means that your system file watcher is running out of alloted handles, usually because the workspace is large and contains many files.
134+
- Should you get an `OSError: [Errno 28] inotify watch limit reached` after
135+
running any command, this means that your system file watcher is running out
136+
of allotted handles, usually because the workspace is large and contains many
137+
files.
111138
112139
The solution is to run:
113-
`sudo sysctl fs.inotify.max_user_watches=524288`
140+
```
141+
sudo sysctl fs.inotify.max_user_watches=524288
142+
```
143+
144+
This increases your `inotify` watch limit (for the session) to 524288, which
145+
is the maximum value and is also enough to allow the setup go through. You
146+
can learn more about file watchers [from this blog post][inotifyblog]
147+
or [from the VS Code documentation][watchchanges].
148+
149+
[inotifyblog]: https://unixia.wordpress.com/2018/04/28/inotify-watch-limit-reached-wait-what/
150+
[watchchanges]: https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
114151
115-
This increases your `inotify` watch limit (for the session) to 524288, which is the maximum value and is also enough to allow the setup go through.
116-
You can learn more about file watchers [from this blog post](https://unixia.wordpress.com/2018/04/28/inotify-watch-limit-reached-wait-what/) or [from the VS Code documentation](https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc).
117152
118153
## Deployment
119154
@@ -175,7 +210,7 @@ Here's how the code is structured in the top level of the repository:
175210
excerpt
176211
- [lektor/lektor-markdown-header-anchors][md-header]: Adds support for
177212
anchors and table of contents to Markdown
178-
- [lektor/lektor-markdown-highlighter][md-highlighter]: Adds support for
213+
- [lektor/lektor-markdown-highlighter][md-highlighter]: Adds support for
179214
syntax highlighting in Markdown and templates
180215
- [terminal-labs/lektor-strip-html-tags][striphtml]: Strip HTML tags,
181216
effectively turning HTML into plain text
@@ -220,7 +255,7 @@ Here's how the code is structured in the top level of the repository:
220255
221256
![CC BY 4.0 license button][cc-by-png]
222257
223-
All the content within this repository is licensed under a [Creative Commons
258+
All the content within this repository is licensed under a [Creative Commons
224259
Attribution 4.0 International License][cc-by] unless otherwise
225260
specified.
226261

content/internships/project-ideas-collection/add-cc-chooser-wordpress/contents.lr

+2
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@ primary_mentor:
5050
---
5151
difficulty: Medium
5252
---
53+
size: Large (~350 hours)
54+
---
5355
filter_value: difficulty-medium skill-javascript skill-php skill-wordpress

content/internships/project-ideas-collection/chooser-stewardship/contents.lr

+2
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,6 @@ primary_mentor:
4949
---
5050
difficulty: Medium
5151
---
52+
size: Large (~350 hours)
53+
---
5254
filter_value: difficulty-medium skill-css skill-javascript

content/internships/project-ideas-collection/legal-tools-machine-layer/contents.lr

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ skills_recommended:
6262
primary_mentor:
6363
- Timid Robot
6464
---
65-
difficulty: High
65+
difficulty: Hard
66+
---
67+
size: Large (~350 hours)
6668
---
6769
filter_value: difficulty-high skill-python

models/project-idea.ini

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ type = markdown
3939
label = Difficulty
4040
type = string
4141

42+
[fields.size]
43+
label = Size
44+
type = string
45+
4246
[fields.filter_value]
4347
label = Filter Value
4448
type = string

themes/vocabulary_theme/templates/project-ideas.html

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ <h2><a class="has-color-dark-slate-gray" name="{{ idea._slug }}">{{ idea.title }
7575
<div class="column is-one-quarter">
7676
<h5 class="b-header padding-bottom-small">Difficulty</h5>
7777
<p class="padding-bottom-big">{{ idea.difficulty }}</p>
78+
<h5 class="b-header padding-bottom-small">Size</h5>
79+
<p class="padding-bottom-big">{{ idea.size }}</p>
7880
<h5 class="b-header padding-bottom-small">Skills recommended</h5>
7981
{{ idea.skills_recommended }}
8082
<h5 class="b-header padding-bottom-small padding-top-big">Primary Mentor</h5>

0 commit comments

Comments
 (0)