commit deb20ef5dcb01d7b2f39a6ec0b099cd5af73e8a5 Author: hiromipaw hiro@torproject.org Date: Mon Jul 3 09:56:57 2017 +0200
Updates the README regarding minifying sources --- .htaccess | 2 -- README.md | 25 +++++++++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/.htaccess b/.htaccess index ced8f1f..2e47ae7 100644 --- a/.htaccess +++ b/.htaccess @@ -1,7 +1,5 @@ RewriteEngine On
-#ErrorDocument 404 /404 - # moved to /docs/ RewriteRule ^faq(.*) /docs/faq$1 [R=301,L] RewriteRule ^bridges(.*) /docs/bridges$1 [R=301,L] diff --git a/README.md b/README.md index fda3cb4..029b1b2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # How to contribute
-Thanks for being interested to work on the website, I tried to make a simple +Thanks for being interested to work on the website, I tried to make a simple how-to for you to quickly get you setup:
__Step 1:__ Clone the git repo. @@ -8,7 +8,7 @@ __Step 1:__ Clone the git repo. git clone https://git.torproject.org/project/web/webwml.git cd webwml
-__Step 1b:__ Create a bare public repository (i.e on Github), where you'd push +__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:
git remote add pick-a-name your-git-url @@ -18,19 +18,19 @@ _Example:_
__Step 2:__ Create and switch to a new branch.
-_In the following example, I've named my branch "docs" as I'm planning to work +_In the following example, I've named my branch "docs" as I'm planning to work on the documentations._
git checkout -b docs
-__Step 3:__ Now you can start working on website and make changes. Once you're +__Step 3:__ Now you can start working on website and make changes. Once you're done, commit and push it to your public repo.
_Example:_
git push tpo-gh docs
-__Step 4:__ Open a new ticket on [trac](https://trac.torproject.org) with a +__Step 4:__ Open a new ticket on [trac](https://trac.torproject.org) with a link to your shiny new repo/branch.
# Building website @@ -41,14 +41,14 @@ To quickly get set up and build website locally, simply follow these steps:
sudo apt-get install wml asciidoc
- __Step 2:__ Configure where to find your tor git repository. It needs this + __Step 2:__ Configure where to find your tor git repository. It needs this to make the manual page.
git clone https://git.torproject.org/project/web/webwml.git cd webwml cp Makefile.local.sample Makefile.local - + Note: Change the `TORGIT` in Makefile.local to point to your tor git repo.
__Step 3:__ Make the website. @@ -69,16 +69,21 @@ The build fails with "Invalid object name". ---- Contents of STDERR channel: --------- fatal: Invalid object name 'tor-0.2.6.1-alpha'. asciidoc: FAILED: manpage document title is mandatory - No manpage because of asciidoc error or file not available from git at + No manpage because of asciidoc error or file not available from git at /tmp/wml.zwcq0q/wml.30867.tmp1.wml line 415.
- This means your tor repository is out of date. Update your tor git + This means your tor repository is out of date. Update your tor git repository.
+### Some information regarding working with minified CSS and JS sources + +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. + +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.
### More detailed instructions from Roger
-_Note: This section was written when website repo was still on svn, and it +_Note: This section was written when website repo was still on svn, and it wasn't built automatically._
Here are the instructions I sent David Fifield when he asked about
tor-commits@lists.torproject.org