This is the git repository of moztw.org web sites, including static pages. Feel free to fork, modify, and send pull request to us.
moztw.org website contains sections from the following different sub-domain-based repos, each repo is hosted as different virtualhosts and not relying on others. please fork and checkout as you need.
base - Server configurations and automatic scripts
www.moztw.org - Main MozTW website
forum.moztw.org - MozTW Forum
irclog.moztw.org - Log Archive for #mozilla-taiwan on irc.mozilla.org and #moztw on Telegram.
translate.moztw.org - Localization system related stuff
planet.moztw.org - A Planetplanet installation for MozTW Planet http://planet.moztw.org/
Demos:
browser-pairs - Foxmosa pairs game at moztw.org/foxmosa/game/pairs
star-pusher - Foxmosa Sokuban game at moztw.org/foxmosa/game/stars
moztw.org-demo - HTML5 demos located at moztw.org/demo
Deprecated:
wiki.moztw.org - Wiki which is not actively used
photos.moztw.org - Picture Gallery of MozTW prior to Firefox 1.5 times.
gfx.tw - Repo for http://gfx.tw, personal Firefox promotion and product page platform (readonly, will retire on August 2017)
git checkout -b issue123-fix-something
production
branch will be rejected.You can do shallow clone to get this repo more quickly.
git clone https://github.com/moztw/www.moztw.org.git --depth 1
Microsoft Visual C++ Redistributable Package
.nodejs-legacy
package.npm install
in repo directory.npm start
in repo directory, the output will stay at Watching files
.localhost:3000
, modify html and browsersync will reload the preview page.docker-ce
and docker-compose-plugin
instead by running sudo apt install docker-ce docker-compose-plugin
../docker-compose.yml
if you need to change listen port. Default: 8080
./docker-apache.conf
if you need to change configurations for httpd
.docker compose up -d
in repo directory to build and run the container.docker compose down
in repo directory to remove the container.It's easy to set up static pages including home page, event pages, contribution pages, etc.
Only one requirement:
To enable SSI on Apache is very easy. Take Ubuntu for example, just execute a2enmod include
then you have a SSI-ready Apache.
The second step is adding virtual host configs to your Apache configuration:
<VirtualHost *:80>
ServerName moztw.yourdomain.name
ServerAdmin admin@yourdomain.name
DocumentRoot /path/to/this/repo/
<Directory /path/to/this/repo>
Options FollowSymLinks Includes
SSILegacyExprParser on
AllowOverride All
Order allow,deny
Require all granted
</Directory>
</VirtualHost>
Enable the new virtual host with a2ensite moztw
, restart Apache, and open http://moztw.yourdomain.name. You should now see MozTW homepage.
Example of site configuration with SSI module enabled:
server {
listen 80;
server_name moztw.yourdomain.name;
root /path/to/this/repo/;
location / {
ssi on;
ssi_types text/shtml;
index index.html index.htm index.shtml index.php;
}
# Rewrite *.html to *.shtml (for example, the download link)
location ~ \.html$ {
if (!-f $request_filename) {
rewrite ^(.*)\.html$ $1.shtml;
}
}
}
Note that we're not running Nginx server on the hosting site, you might encounter some problems, e.g., .htaccess is not supported.
PHP is only required for GitHub Webhook and Online Update mechanisms to work. Only tested with PHP 7.1, with cURL extension required to call GitHub API for hook source range verification.