Main repository for Devuan's www.devuan.org.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

4.0 KiB

Devuan Web Source

This is the source code for beta.devuan.org.

Version 0.9.0. We're using Semantic Versioning.

License

The source code is free software distributed under the GNU Affero General Public License, version 3, or, at your option, any later version. (See COPYING.)

The website contents are creative commons released under CC-BY-ND-4.0-International.

Contents

This is a static Web made with Middleman.

| Directory | File | Description | |---------------------+------------------------+---------------------------| | ./ | config.rb | Middleman configuration |
| etc/ | | Extra configuration files | | | nginx-development.conf | To run the site locally | | | nginx-production.conf | To deploy publicly | | | crontab | To automate site updates | | locales/ | :lang.yml | Localized strings | | source/ | | Web contents | | source/layouts | *.erb | Layout templates | | source/pages | *.:lang.html.md.erb | Localized pages | | source/partials | | Partial files (includes) | | source/ui | | User interface files | | source/ui/css | | Stylesheets | | source/ui/css/fonts | | Embedded Web fonts |
| source/ui/img | | Image files | | source/ui/js | | Javascript files |

Most pages go under source/pages/os/. This is to enable local mirrors to add their own custom contents for their local community.

Development

To deploy the site locally:

0. Pre-requisites

You need Ruby (and ruby-dev) and a couple of ruby packages (gems):

~$ sudo gem install middleman bundler

1. Clone the source code

~$ mkdir -p ~/src/devuan/www && cd $_
www$ git clone https://git.devuan.org/devuan-editors/devuan-www.git beta.devuan.org
www$ cd beta.devuan.org
beta.devuan.org$ export DIR=$PWD

The source code now lives at ~/src/devuan/www/beta.devuan.org. We keep track of this path using the variable DIR.

2. Install the server configuration

beta.devuan.org$ echo '127.0.0.1 beta.devuan.org' | sudo tee -a /etc/hosts
beta.devuan.org$ cd /etc/nginx/sites-available
sites-available$ sudo ln -s $DIR/etc/nginx-development.conf beta.devuan.org
sites-available$ cd ../sites-enabled
sites-enabled$ sudo ln -s ../sites-available/beta.devuan.org
sites-enabled$ sudo /etc/init.d/nginx reload
  1. Add a fake host to be able to use the domain Warning: you may want to use a different fake domain, e.g., beta.devuan instead.
  2. to the end: enable nginx configuration

3. Build the site

sites-enabled$ cd $DIR
beta.devuan.org$ bundle exec middleman build

This generates the static files in $DIR/webroot.

4. Browse it

You can fallback to the backend for non-built files if you run the local middleman server:

beta.devuan.org$ bundle exec middleman server -p 4569

Open your browser to http://beta.devuan.org (or beta.devuan, YMMV)

Production Deployment

The main site (beta.devuan.org) is in English by default.

Mirrors

Mirrors should change the default language to set theirs in config.rb. Do commit the change, so that it will be kept during updates, but DO NOT PUSH it! If you need to push, you should use another working directory than the deployed one.

Once your mirror is deployed, please send its URL, language, location, and person responsible to the relevant topic on Devuan Discourse, so it can be added to the list. E.g., a mirror in France can be accessed via fr.devuan.org.