aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_layouts/default.html11
-rw-r--r--assets/css/alaveteli-org.css19
-rw-r--r--assets/sass/alaveteli-org.scss15
-rw-r--r--docs/developers/index.md4
-rw-r--r--docs/installing/macos.md32
-rw-r--r--docs/installing/manual_install.md41
-rw-r--r--docs/running/server.md4
7 files changed, 92 insertions, 34 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index 8b65d334f..3c4a9db0f 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -157,6 +157,17 @@
});
$('.reveal-all').trigger('click');
});
+ // Anchor links for the headings
+ $(function() {
+ return $("h1, h2, h3, h4, h5, h6").each(function(i, el) {
+ var $el, icon, id;
+ $el = $(el);
+ id = $el.attr('id');
+ if (id) {
+ return $el.append($("<a />").addClass("header-link").attr("href", "#" + id).html('#'));
+ }
+ });
+ });
</script>
<script src="{{ site.baseurl }}assets/scripts/how-it-works-slides.js"></script>
</body>
diff --git a/assets/css/alaveteli-org.css b/assets/css/alaveteli-org.css
index 8cbae7021..47f870b20 100644
--- a/assets/css/alaveteli-org.css
+++ b/assets/css/alaveteli-org.css
@@ -703,3 +703,22 @@ h3 {
clear: both; }
.clearfix {
*zoom: 1; }
+
+.header-link {
+ padding-left: 0.2em;
+ opacity: 0;
+
+ -webkit-transition: opacity 0.2s ease-in-out 0.1s;
+ -moz-transition: opacity 0.2s ease-in-out 0.1s;
+ -ms-transition: opacity 0.2s ease-in-out 0.1s;
+}
+
+h1:hover .header-link,
+h2:hover .header-link,
+h3:hover .header-link,
+h4:hover .header-link,
+h5:hover .header-link,
+h6:hover .header-link {
+ opacity: 1;
+}
+
diff --git a/assets/sass/alaveteli-org.scss b/assets/sass/alaveteli-org.scss
index ae591a2b7..e7aa6a2a9 100644
--- a/assets/sass/alaveteli-org.scss
+++ b/assets/sass/alaveteli-org.scss
@@ -867,4 +867,19 @@ h3 {
.clearfix {
@include clearfix;
+.header-link {
+ padding-left: 0.2em;
+ opacity: 0;
+
+ -webkit-transition: opacity 0.2s ease-in-out 0.1s;
+ -moz-transition: opacity 0.2s ease-in-out 0.1s;
+ -ms-transition: opacity 0.2s ease-in-out 0.1s;
+}
+
+h2:hover .header-link,
+h3:hover .header-link,
+h4:hover .header-link,
+h5:hover .header-link,
+h6:hover .header-link {
+ opacity: 1;
}
diff --git a/docs/developers/index.md b/docs/developers/index.md
index 9d1869246..22390f236 100644
--- a/docs/developers/index.md
+++ b/docs/developers/index.md
@@ -53,10 +53,10 @@ title: For developers
it should be this!**
* Like many Ruby on Rails sites, the software is not hugely performant (see
- some notes about [[performance issues]] gathered over time with
+ [these notes about performance issues](https://github.com/mysociety/alaveteli/wiki/Performance-issues) gathered over time with
WhatDoTheyKnow). The site will run on a server with 512MB RAM but at least
2GB is recommended. Deployment behind [Varnish](https://www.varnish-cache.org) is also fairly essential. See
- [[Production Server Best Practices]] for more.
+ [production server best practices]({{site.baseurl}}docs/running/server/) for more.
* There's a number of [proposals for enhancements](https://github.com/mysociety/alaveteli/wiki/Proposals-for-enhancements),
such as more user-focused features, but see also...
diff --git a/docs/installing/macos.md b/docs/installing/macos.md
index c46bdf4ba..e93ea452f 100644
--- a/docs/installing/macos.md
+++ b/docs/installing/macos.md
@@ -88,17 +88,27 @@ The following is mostly from [the manual installation process]({{ site.baseurl}}
### Configure database
-Creates Alaveteli databases and an `foi` user with password `foi`.
-
- echo "CREATE DATABASE foi_development encoding = 'UTF8';
- CREATE DATABASE foi_test encoding = 'UTF8';
- CREATE USER foi WITH CREATEUSER;
- ALTER USER foi WITH PASSWORD 'foi';
- ALTER USER foi WITH CREATEDB;
- GRANT ALL PRIVILEGES ON DATABASE foi_development TO foi;
- GRANT ALL PRIVILEGES ON DATABASE foi_test TO foi;
- ALTER DATABASE foi_development OWNER TO foi;
- ALTER DATABASE foi_test OWNER TO foi;" | psql -h localhost template1
+Create a database for your Mac user as homebrew doesn't create one by default:
+
+ createdb
+
+Create a `foi` user from the command line, like this:
+
+ createuser -s -P foi
+
+_Note:_ Leaving the password blank will cause great confusion if you're new to
+PostgreSQL.
+
+We'll create a template for our Alaveteli databases:
+
+ createdb -T template0 -E UTF-8 template_utf8
+ echo "update pg_database set datistemplate=true where datname='template_utf8';" | psql
+
+Then create the databases:
+
+ createdb -T template_utf8 -O foi alaveteli_production
+ createdb -T template_utf8 -O foi alaveteli_test
+ createdb -T template_utf8 -O foi alaveteli_development
### Clone Alaveteli
diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md
index 777d95139..bf2f9b7cd 100644
--- a/docs/installing/manual_install.md
+++ b/docs/installing/manual_install.md
@@ -25,6 +25,17 @@ have instructions for [installing on MacOS]({{ site.baseurl }}docs/installing/ma
Commands are intended to be run via the terminal or over ssh.
+## Set the locale
+
+**Debian Squeeze**
+
+Follow the [Debian guide](https://wiki.debian.org/Locale#Standard) for configuring the locale of the operating system.
+
+Generate the locales you wish to make available. When the interactive screen asks you to pick a default locale, choose "None", as the SSH session will provide the locale required.
+
+ # dpkg-reconfigure locales
+
+Start a new SSH session to use your SSH locale.
## Get Alaveteli
@@ -164,20 +175,20 @@ Create a `foi` user from the command line, like this:
_Note:_ Leaving the password blank will cause great confusion if you're new to
PostgreSQL.
-Then create the databases:
+We'll create a template for our Alaveteli databases:
- # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_production
- # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_test
- # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_development
+ # sudo -u postgres createdb -T template0 -E UTF-8 template_utf8
+ # echo "update pg_database set datistemplate=true where datname='template_utf8';" > /tmp/update-template.sql
+ # sudo -u postgres psql -f /tmp/update-template.sql
-We create using the ``SQL_ASCII`` encoding, because in postgres this is means
-"no encoding"; and because we handle and store all kinds of data that may not
-be valid UTF (for example, data originating from various broken email clients
-that's not 8-bit clean), it's safer to be able to store *anything*, than reject
-data at runtime.
+Then create the databases:
-Now you need to set up the database config file to contain the name, username
-and password of your postgres database.
+ # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_production
+ # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_test
+ # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_development
+
+Now you need to set up the database config file so that the application can
+connect to the postgres database.
* Copy `database.yml-example` to `database.yml` in `alaveteli/config`
* Edit it to point to your local postgresql database in the development
@@ -187,7 +198,8 @@ Example `development` section of `config/database.yml`:
development:
adapter: postgresql
- database: foi_development
+ template: template_utf8
+ database: alaveteli_development
username: foi
password: secure-password-here
host: localhost
@@ -402,11 +414,6 @@ by your deploy user (named `deploy` in this case):
deploy ALL = NOPASSWD: /etc/init.d/foi-alert-tracks, /etc/init.d/foi-purge-varnish
-The cron jobs refer to a program `run-with-lockfile`. See [this
-issue](https://github.com/mysociety/alaveteli/issues/112) for a discussion of
-where to find this program, and how you might replace it. This [one line
-script](https://gist.github.com/3741194) can install this program system-wide.
-
## Set up production web server
It is not recommended to run the website using the default Rails web server.
diff --git a/docs/running/server.md b/docs/running/server.md
index c10d4b4b4..1de0ce595 100644
--- a/docs/running/server.md
+++ b/docs/running/server.md
@@ -26,10 +26,6 @@ ask us about hosting.
Don't forget to set up the cron jobs as outlined in the
[installation instructions]({{ site.baseurl }}docs/installing/manual_install/).
-As of October 2011, they rely on a small program created by mySociety called
-`run-with-lockfile`. A discussion of where the source for this can be found,
-and possible alternatives, lives in
-[Alaveteli issue #112](https://github.com/mysociety/alaveteli/issues/112).
## Webserver configuration