... | ... |
@@ -77,7 +77,11 @@ repository. |
77 | 77 |
|
78 | 78 |
### Some information regarding working with minified CSS and JS sources |
79 | 79 |
|
80 |
-If you want to edit any of the CSS or JS sources, please bear in mind that the HTML uses the minified versions. We keep in the repository both versions side-to-side. Once you edit the original source make sure you generate the minified version again. Most editors have plugins to minify CSS and JS files. |
|
80 |
+If you want to edit any of the CSS or JS sources, please bear in mind that the HTML uses the minified versions. We keep in the repository both versions side-to-side. Once you edit the original source make sure you generate the minified version again. Most editors have plugins to minify CSS and JS files. On Debian it is possible to install the yui-compressor package and use it as follows: |
|
81 |
+ |
|
82 |
+ |
|
83 |
+ yui-compressor myfile.js -o myfile-min.js |
|
84 |
+ |
|
81 | 85 |
|
82 | 86 |
If you are wondering why is it "cool" to minify sources even though compression is used on the server, please consider that Minification can be well be used in combination with gzipping sources. Minification does a lot of additional things that compression doesn't do. During minification comments are removed, long variables are renamed to shorter variable names, etc. Transferred data can be significantly smaller after minification, than by simply compressing the original. Although this depends a lot on the original source, minifying helps with mobile browsers and slower connections. |
83 | 87 |
|
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
# How to contribute |
2 | 2 |
|
3 |
-Thanks for being interested to work on the website, I tried to make a simple |
|
3 |
+Thanks for being interested to work on the website, I tried to make a simple |
|
4 | 4 |
how-to for you to quickly get you setup: |
5 | 5 |
|
6 | 6 |
__Step 1:__ Clone the git repo. |
... | ... |
@@ -8,7 +8,7 @@ __Step 1:__ Clone the git repo. |
8 | 8 |
git clone https://git.torproject.org/project/web/webwml.git |
9 | 9 |
cd webwml |
10 | 10 |
|
11 |
-__Step 1b:__ Create a bare public repository (i.e on Github), where you'd push |
|
11 |
+__Step 1b:__ Create a bare public repository (i.e on Github), where you'd push |
|
12 | 12 |
your commits to. Make sure you're in `webwml` directory, and run: |
13 | 13 |
|
14 | 14 |
git remote add pick-a-name your-git-url |
... | ... |
@@ -18,19 +18,19 @@ _Example:_ |
18 | 18 |
|
19 | 19 |
__Step 2:__ Create and switch to a new branch. |
20 | 20 |
|
21 |
-_In the following example, I've named my branch "docs" as I'm planning to work |
|
21 |
+_In the following example, I've named my branch "docs" as I'm planning to work |
|
22 | 22 |
on the documentations._ |
23 | 23 |
|
24 | 24 |
git checkout -b docs |
25 | 25 |
|
26 |
-__Step 3:__ Now you can start working on website and make changes. Once you're |
|
26 |
+__Step 3:__ Now you can start working on website and make changes. Once you're |
|
27 | 27 |
done, commit and push it to your public repo. |
28 | 28 |
|
29 | 29 |
_Example:_ |
30 | 30 |
|
31 | 31 |
git push tpo-gh docs |
32 | 32 |
|
33 |
-__Step 4:__ Open a new ticket on [trac](https://trac.torproject.org) with a |
|
33 |
+__Step 4:__ Open a new ticket on [trac](https://trac.torproject.org) with a |
|
34 | 34 |
link to your shiny new repo/branch. |
35 | 35 |
|
36 | 36 |
# Building website |
... | ... |
@@ -41,14 +41,14 @@ To quickly get set up and build website locally, simply follow these steps: |
41 | 41 |
|
42 | 42 |
sudo apt-get install wml asciidoc |
43 | 43 |
|
44 |
- __Step 2:__ Configure where to find your tor git repository. It needs this |
|
44 |
+ __Step 2:__ Configure where to find your tor git repository. It needs this |
|
45 | 45 |
to make the |
46 | 46 |
manual page. |
47 | 47 |
|
48 | 48 |
git clone https://git.torproject.org/project/web/webwml.git |
49 | 49 |
cd webwml |
50 | 50 |
cp Makefile.local.sample Makefile.local |
51 |
- |
|
51 |
+ |
|
52 | 52 |
Note: Change the `TORGIT` in Makefile.local to point to your tor git repo. |
53 | 53 |
|
54 | 54 |
__Step 3:__ Make the website. |
... | ... |
@@ -69,16 +69,21 @@ The build fails with "Invalid object name". |
69 | 69 |
---- Contents of STDERR channel: --------- |
70 | 70 |
fatal: Invalid object name 'tor-0.2.6.1-alpha'. |
71 | 71 |
asciidoc: FAILED: manpage document title is mandatory |
72 |
- No manpage because of asciidoc error or file not available from git at |
|
72 |
+ No manpage because of asciidoc error or file not available from git at |
|
73 | 73 |
/tmp/wml.zwcq0q/wml.30867.tmp1.wml line 415. |
74 | 74 |
|
75 |
- This means your tor repository is out of date. Update your tor git |
|
75 |
+ This means your tor repository is out of date. Update your tor git |
|
76 | 76 |
repository. |
77 | 77 |
|
78 |
+### Some information regarding working with minified CSS and JS sources |
|
79 |
+ |
|
80 |
+If you want to edit any of the CSS or JS sources, please bear in mind that the HTML uses the minified versions. We keep in the repository both versions side-to-side. Once you edit the original source make sure you generate the minified version again. Most editors have plugins to minify CSS and JS files. |
|
81 |
+ |
|
82 |
+If you are wondering why is it "cool" to minify sources even though compression is used on the server, please consider that Minification can be well be used in combination with gzipping sources. Minification does a lot of additional things that compression doesn't do. During minification comments are removed, long variables are renamed to shorter variable names, etc. Transferred data can be significantly smaller after minification, than by simply compressing the original. Although this depends a lot on the original source, minifying helps with mobile browsers and slower connections. |
|
78 | 83 |
|
79 | 84 |
### More detailed instructions from Roger |
80 | 85 |
|
81 |
-_Note: This section was written when website repo was still on svn, and it |
|
86 |
+_Note: This section was written when website repo was still on svn, and it |
|
82 | 87 |
wasn't built automatically._ |
83 | 88 |
|
84 | 89 |
Here are the instructions I sent David Fifield when he asked about |
... | ... |
@@ -14,7 +14,7 @@ your commits to. Make sure you're in `webwml` directory, and run: |
14 | 14 |
git remote add pick-a-name your-git-url |
15 | 15 |
|
16 | 16 |
_Example:_ |
17 |
- `git remote tpo-gh git@github.com:mrphs/tpo.git` |
|
17 |
+ `git remote add tpo-gh git@github.com:mrphs/tpo.git` |
|
18 | 18 |
|
19 | 19 |
__Step 2:__ Create and switch to a new branch. |
20 | 20 |
|
wrapping the text at 79 chars per line
... | ... |
@@ -1,13 +1,15 @@ |
1 | 1 |
# How to contribute |
2 | 2 |
|
3 |
-Thanks for being interested to work on the website, I tried to make a simple how-to for you to quickly get you setup: |
|
3 |
+Thanks for being interested to work on the website, I tried to make a simple |
|
4 |
+how-to for you to quickly get you setup: |
|
4 | 5 |
|
5 | 6 |
__Step 1:__ Clone the git repo. |
6 | 7 |
|
7 | 8 |
git clone https://git.torproject.org/project/web/webwml.git |
8 | 9 |
cd webwml |
9 | 10 |
|
10 |
-__Step 1b:__ Create a bare public repository (i.e on Github), where you'd push your commits to. Make sure you're in `webwml` directory, and run: |
|
11 |
+__Step 1b:__ Create a bare public repository (i.e on Github), where you'd push |
|
12 |
+your commits to. Make sure you're in `webwml` directory, and run: |
|
11 | 13 |
|
12 | 14 |
git remote add pick-a-name your-git-url |
13 | 15 |
|
... | ... |
@@ -16,17 +18,20 @@ _Example:_ |
16 | 18 |
|
17 | 19 |
__Step 2:__ Create and switch to a new branch. |
18 | 20 |
|
19 |
-_In the following example, I've named my branch "docs" as I'm planning to work on the documentations._ |
|
21 |
+_In the following example, I've named my branch "docs" as I'm planning to work |
|
22 |
+on the documentations._ |
|
20 | 23 |
|
21 | 24 |
git checkout -b docs |
22 | 25 |
|
23 |
-__Step 3:__ Now you can start working on website and make changes. Once you're done, commit and push it to your public repo. |
|
26 |
+__Step 3:__ Now you can start working on website and make changes. Once you're |
|
27 |
+done, commit and push it to your public repo. |
|
24 | 28 |
|
25 | 29 |
_Example:_ |
26 | 30 |
|
27 | 31 |
git push tpo-gh docs |
28 | 32 |
|
29 |
-__Step 4:__ Open a new ticket on [trac](https://trac.torproject.org) with a link to your shiny new repo/branch. |
|
33 |
+__Step 4:__ Open a new ticket on [trac](https://trac.torproject.org) with a |
|
34 |
+link to your shiny new repo/branch. |
|
30 | 35 |
|
31 | 36 |
# Building website |
32 | 37 |
Torproject website is being built and published automatically. |
... | ... |
@@ -36,7 +41,8 @@ To quickly get set up and build website locally, simply follow these steps: |
36 | 41 |
|
37 | 42 |
sudo apt-get install wml asciidoc |
38 | 43 |
|
39 |
- __Step 2:__ Configure where to find your tor git repository. It needs this to make the |
|
44 |
+ __Step 2:__ Configure where to find your tor git repository. It needs this |
|
45 |
+to make the |
|
40 | 46 |
manual page. |
41 | 47 |
|
42 | 48 |
git clone https://git.torproject.org/project/web/webwml.git |
... | ... |
@@ -63,14 +69,17 @@ The build fails with "Invalid object name". |
63 | 69 |
---- Contents of STDERR channel: --------- |
64 | 70 |
fatal: Invalid object name 'tor-0.2.6.1-alpha'. |
65 | 71 |
asciidoc: FAILED: manpage document title is mandatory |
66 |
- No manpage because of asciidoc error or file not available from git at /tmp/wml.zwcq0q/wml.30867.tmp1.wml line 415. |
|
72 |
+ No manpage because of asciidoc error or file not available from git at |
|
73 |
+ /tmp/wml.zwcq0q/wml.30867.tmp1.wml line 415. |
|
67 | 74 |
|
68 |
- This means your tor repository is out of date. Update your tor git repository. |
|
75 |
+ This means your tor repository is out of date. Update your tor git |
|
76 |
+repository. |
|
69 | 77 |
|
70 | 78 |
|
71 | 79 |
### More detailed instructions from Roger |
72 | 80 |
|
73 |
-_Note: This section was written when website repo was still on svn, and it wasn't built automatically._ |
|
81 |
+_Note: This section was written when website repo was still on svn, and it |
|
82 |
+wasn't built automatically._ |
|
74 | 83 |
|
75 | 84 |
Here are the instructions I sent David Fifield when he asked about |
76 | 85 |
editing the website. I hope they are useful for you too! --Roger |
... | ... |
@@ -109,4 +118,3 @@ packages in dist/ less awful -- automatically check that they have |
109 | 118 |
signatures and that the sigs match, that the items on the website are in |
110 | 119 |
fact in dist, only allow certain people to put files in certain places, |
111 | 120 |
etc. One day! :) |
112 |
- |
... | ... |
@@ -1,3 +1,33 @@ |
1 |
+# How to contribute |
|
2 |
+ |
|
3 |
+Thanks for being interested to work on the website, I tried to make a simple how-to for you to quickly get you setup: |
|
4 |
+ |
|
5 |
+__Step 1:__ Clone the git repo. |
|
6 |
+ |
|
7 |
+ git clone https://git.torproject.org/project/web/webwml.git |
|
8 |
+ cd webwml |
|
9 |
+ |
|
10 |
+__Step 1b:__ Create a bare public repository (i.e on Github), where you'd push your commits to. Make sure you're in `webwml` directory, and run: |
|
11 |
+ |
|
12 |
+ git remote add pick-a-name your-git-url |
|
13 |
+ |
|
14 |
+_Example:_ |
|
15 |
+ `git remote tpo-gh git@github.com:mrphs/tpo.git` |
|
16 |
+ |
|
17 |
+__Step 2:__ Create and switch to a new branch. |
|
18 |
+ |
|
19 |
+_In the following example, I've named my branch "docs" as I'm planning to work on the documentations._ |
|
20 |
+ |
|
21 |
+ git checkout -b docs |
|
22 |
+ |
|
23 |
+__Step 3:__ Now you can start working on website and make changes. Once you're done, commit and push it to your public repo. |
|
24 |
+ |
|
25 |
+_Example:_ |
|
26 |
+ |
|
27 |
+ git push tpo-gh docs |
|
28 |
+ |
|
29 |
+__Step 4:__ Open a new ticket on [trac](https://trac.torproject.org) with a link to your shiny new repo/branch. |
|
30 |
+ |
|
1 | 31 |
# Building website |
2 | 32 |
Torproject website is being built and published automatically. |
3 | 33 |
To quickly get set up and build website locally, simply follow these steps: |
... | ... |
@@ -1,6 +1,6 @@ |
1 |
-# Building website locally |
|
2 |
- |
|
3 |
-To quickly get set up simply do the following |
|
1 |
+# Building website |
|
2 |
+Torproject website is being built and published automatically. |
|
3 |
+To quickly get set up and build website locally, simply follow these steps: |
|
4 | 4 |
|
5 | 5 |
__Step 1:__ Get the website's build dependencies. |
6 | 6 |
|
- Applying markdown format and some prettifying.
- Adding a note to arma's instruction.
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,82 @@ |
1 |
+# Building website locally |
|
2 |
+ |
|
3 |
+To quickly get set up simply do the following |
|
4 |
+ |
|
5 |
+ __Step 1:__ Get the website's build dependencies. |
|
6 |
+ |
|
7 |
+ sudo apt-get install wml asciidoc |
|
8 |
+ |
|
9 |
+ __Step 2:__ Configure where to find your tor git repository. It needs this to make the |
|
10 |
+ manual page. |
|
11 |
+ |
|
12 |
+ git clone https://git.torproject.org/project/web/webwml.git |
|
13 |
+ cd webwml |
|
14 |
+ cp Makefile.local.sample Makefile.local |
|
15 |
+ |
|
16 |
+Note: Change the `TORGIT` in Makefile.local to point to your tor git repo. |
|
17 |
+ |
|
18 |
+ __Step 3:__ Make the website. |
|
19 |
+ |
|
20 |
+ make |
|
21 |
+ |
|
22 |
+You should now be able to point your browser at the locally generated site... |
|
23 |
+ |
|
24 |
+ file:///home/atagar/Desktop/tor/webwml/getinvolved/volunteer.html.en |
|
25 |
+ |
|
26 |
+ |
|
27 |
+### Troubleshooting the build |
|
28 |
+ |
|
29 |
+The build fails with "Invalid object name". |
|
30 |
+ |
|
31 |
+ If you get an error like... |
|
32 |
+ |
|
33 |
+ ---- Contents of STDERR channel: --------- |
|
34 |
+ fatal: Invalid object name 'tor-0.2.6.1-alpha'. |
|
35 |
+ asciidoc: FAILED: manpage document title is mandatory |
|
36 |
+ No manpage because of asciidoc error or file not available from git at /tmp/wml.zwcq0q/wml.30867.tmp1.wml line 415. |
|
37 |
+ |
|
38 |
+ This means your tor repository is out of date. Update your tor git repository. |
|
39 |
+ |
|
40 |
+ |
|
41 |
+### More detailed instructions from Roger |
|
42 |
+ |
|
43 |
+_Note: This section was written when website repo was still on svn, and it wasn't built automatically._ |
|
44 |
+ |
|
45 |
+Here are the instructions I sent David Fifield when he asked about |
|
46 |
+editing the website. I hope they are useful for you too! --Roger |
|
47 |
+ |
|
48 |
+Copy Makefile.local.sample to Makefile.local in your webwml/ directory. |
|
49 |
+Point TORGIT to a tor git. |
|
50 |
+ |
|
51 |
+Then apt-get install wml and (alas) probably a shocking number of other |
|
52 |
+debs. Then you can type 'make' and it will build the website for you |
|
53 |
+locally. It's probably a smart move to see whether 'make' works before |
|
54 |
+you git commit any changes to the wml files. |
|
55 |
+ |
|
56 |
+You can edit docs/en/pluggable-transports.wml (and that is |
|
57 |
+the right source file to edit, not the html). But go take a |
|
58 |
+look at that file. You'll notice it has a bunch of tags like |
|
59 |
+<version-torbrowserbundle>. If you're just bumping version |
|
60 |
+numbers, you probably just want to change the definition of those tags. |
|
61 |
+They're in include/versions.wmi |
|
62 |
+ |
|
63 |
+(Every once in a while you may need to edit pluggable-transports.wml |
|
64 |
+too -- generally when you change the file name so drastically that just |
|
65 |
+changing the versions.wmi tags isn't enough.) |
|
66 |
+ |
|
67 |
+Pushes to the master branch of the git repository will cause the |
|
68 |
+website to get re-built and published. Pushing to the staging branch |
|
69 |
+will update www-staging.torproject.org. |
|
70 |
+ |
|
71 |
+Alas, https://www.torproject.org/dist/ isn't in version control. You |
|
72 |
+write to it by ssh'ing to dist-master.torproject.org and going to |
|
73 |
+/srv/dist-master.torproject.org/htdocs/ and then sticking your stuff |
|
74 |
+there. When you want it to go live, you run |
|
75 |
+"static-update-component dist.torproject.org" on dist-master. |
|
76 |
+ |
|
77 |
+Weasel has hopes that somebody will write some scripts to make maintaining |
|
78 |
+packages in dist/ less awful -- automatically check that they have |
|
79 |
+signatures and that the sigs match, that the items on the website are in |
|
80 |
+fact in dist, only allow certain people to put files in certain places, |
|
81 |
+etc. One day! :) |
|
82 |
+ |