Repository of moztw.org
Clone or download
Permalink
Failed to load latest commit information.
about Add OSSPlanet description, fix #377 (#479) Nov 3, 2016
beta * 檔案整理 Jul 23, 2015
camino 修正漏掉的end.html Jul 18, 2015
community add common voice to telegram Aug 11, 2018
contribute Revert "Revert "Merge pull request #572 from cliff75426/ref-534"" Nov 14, 2017
css refactor code for new code guideline in php7 Nov 26, 2017
demo/css-grid css grid demo 用字修正 (Fix #557 ) Aug 5, 2017
dl 更換新版 Firefox Logo (#584) Mar 18, 2018
docs Update system requirements for fx & fennec. Oct 11, 2018
donate Optimize png images losslessly via zopflipng Dec 23, 2016
events migrate videos from cdn.mozilla to youtube, fix #570 Oct 12, 2017
firefox Firefox 62.0.3 news, download and release notes Oct 3, 2018
fonts Move fonts file location Mar 22, 2015
foxmosa fix broken link May 24, 2018
images home: adjust mobile feature to add Firefox wordmark Nov 15, 2017
inc Firefox 62.0.3 news, download and release notes Oct 3, 2018
js js/download.js: beautified Nov 15, 2017
link Update link pages Jun 26, 2014
m Optimize png images losslessly via zopflipng Dec 23, 2016
mobile 更換新版 Firefox Logo (#584) Mar 18, 2018
mozilla Update links and https friendly Apr 24, 2015
netscape Change links to https neutral for forum May 2, 2015
news Firefox 62.0.3 news, download and release notes Oct 3, 2018
nvu Change links to https neutral for forum May 2, 2015
outgo Upgrade to Universal Analytics Jun 15, 2014
press Remove all UTF-8 BOMs Jun 19, 2009
sandstone quantum logo: adjust size on release notes & download button Mar 18, 2018
space Update the hyperlink to fix #588 Apr 20, 2018
thunderbird Merge pull request #507 from PeterDaveHelloKitchen/images-optimize Feb 15, 2017
tools hardcode latest update date for /tools/mozlcdb/archive/mozlcdb_latest… Jun 27, 2018
twoffice fix twoffice layout broken on mobile viewpoert May 6, 2017
.editorconfig Update .editorconfig to fix section fallback issue Mar 20, 2015
.gitignore add sensor web widget Jun 3, 2016
.gitmodules change submodule path for star-pusher Dec 26, 2015
.htaccess Modify htaccess Mar 20, 2016
404.shtml Use https for missingkids iframe Aug 18, 2017
Gruntfile.js unify browserSync configuration Sep 19, 2015
README.md Update README.md May 7, 2017
Vagrantfile use browser-sync directly Sep 19, 2015
auto_update.php +end.html Jul 23, 2015
bs-config.js upgrade ssi Jan 2, 2016
data.n3 Add othree as a member Aug 19, 2010
dls Add symbolic link to var/dls Sep 8, 2013
favicon.ico favicons Sep 8, 2004
git-received.php Enable new check logic in auto-deploy mech Apr 12, 2015
google955345b65bfc90e0.html Add ga verify file Oct 29, 2015
gulpfile.js unify browserSync configuration Sep 19, 2015
index.shtml home: adjust mobile feature position again Nov 15, 2017
index2.shtml change Webmaker url in Quick links Oct 9, 2016
mlinks-img add link of mozlink-img Sep 13, 2013
narrow.shtml dlff.html > dlff.shtml - add info for dev Jul 23, 2017
package.json upgrade ssi Jan 2, 2016
robots.txt Update robots.txt Jul 25, 2015
sitemap.txt add sitemap manually Mar 26, 2015
sitemap.xml Remove no longer used downloadurl.txt Mar 7, 2017
template.shtml moving towards new layout Jun 19, 2005

README.md

Repository of moztw.org

This is the git repository of moztw.org web sites, including static pages. Feel free to fork, modify, and send pull request to us.

Repo structure

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)

How do I contribute?

  1. Report issues at Issue tracker
  2. Make a fork of this repo and clone to your working space (See steps in next section)
  3. Go to your cloned repository, create a new branch with meaningful name, e.g. git checkout -b issue123-fix-something
  4. Make changes, test, and commit. Be sure to mention the issue id in the commit message.
  5. File a pull request to master branch (or create a new branch if you need to collaborate with someone else). direct PRs to production branch will be rejected.
  6. Someone will review the request, you may ping moztw-general@googlegroups.com if there's no progress after a while.
  7. The content will go live at www-stage once the PR is accepted, and will go live at production site when ready.

Development

You can do shallow clone to get this repo more quickly.

git clone https://github.com/moztw/www.moztw.org.git --depth 1

Using Vagrant

  1. Make sure you have git available in your computer. If you are not sure, you can go to Git website to download.
  2. Install VirtualBox and Vagrant onto your system.
  3. Open Terminal. On Windows, open Git Bash instead.
  4. Execute cd [desired directory] to get to the folder you want to keep the file.
  5. Run git clone https://github.com/moztw/www.moztw.org.git to clone the repository.
  6. Run cd www.moztw.org.
  7. Run vagrant up. This may take a while (approx. 15-20 minutes) as it needs to download a virtual machine image and all the other required packages to run.
  8. Run vagrant exec npm start. You will see the output will stay at Watching files.
  9. Open a web browser, go to localhost:3000 and you can see the current website. You can modify the website contents and the changes will be reflected in seconds.
  10. To stop the script, go back to the terminal and hit Ctrl-C. Also if you want to stop the virtual machine running, run vagrant halt.

Using Node.js directly

  1. Install nodejs and npm in your system.
    • On Windows, you also need Microsoft Visual C++ Redistributable Package.
    • On Ubuntu/Debian, you also need nodejs-legacy package.
  2. Run npm install in repo directory.
  3. Run npm start in repo directory, the output will stay at Watching files.
  4. Open localhost:3000, modify and see the browswersync result.

Static Pages Local Installation

It's easy to set up static pages including home page, event pages, contribution pages, etc.

Only one requirement:

  • SSI (Server Side Include)-supported web server with Virtual Hosts enabled

Apache 2.4

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
    SSILegacyExprParse 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.

Nginx

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.

Coding Style

  • Please always use LF on line ending, and set 2/4 space characters as indent according to the original style of each files.
  • Please take Mozilla Coding Style as reference.
  • If your editor supports EditorConfig, install the plugin and it will take care the style config.