TXP Magazine website
TXP Magazine is a publication of the Textpattern project; serving the greater community of open source content management enthusiasts. Currently under development.
Minimum browser support
- Apple Safari 5+
- Google Chrome 30+
- Microsoft Internet Explorer 8+
- Mozilla Firefox 24+
- Opera Browser 12+
Building this repository requires:
Environment must consist of:
- Apache 2
- PHP >=5.3
- MySQL >=5
- Textpattern CMS 4.6.0-dev
- Unix-like OS, e.g. Linux or Mac OS
Installing required tools
The project uses Grunt to run tasks and Sass for CSS pre-processing. This creates few dependencies in addition to your normal PHP required by Textpattern. First make sure you have base dependencies installed: Ruby, Node.js, Bundler, Grunt and Bower. You can install Node, Ruby and Composer using their installers, Bundler with gem and the rest with npm:
$ gem install bundler $ npm install -g grunt-cli $ npm install -g bower
Consult the tools’ documentation for more instructions. Outside from these, the project will also require the normal git, svn, Apache, MySQL and PHP. All requirements must be added to your path variable.
Setting up Apache virtual host
public/ directory is intended to be set as the server’s document root. You can do this by adding a new virtual host to your httpd.conf. Along the lines of:
<VirtualHost *:80> VirtualHost "/absolute/path/to/txpmag-website/public" ServerName www.txpmag.test ServerAlias txpmag.test </VirtualHost>
# Serve static client-side assets from a different domain.
<VirtualHost *:80> VirtualHost "/absolute/path/to/txpmag-website/public/assets" ServerName assets.txpmag.test </VirtualHost>
On a local development server, after this you can use your hosts file to point the development domain to correct location (e.g. back to home), run a local DNS server that resolves .test TLDs, or use a xip.io domain.
After you have the base dependencies taken care of, you can install the project’s dependencies. Navigate to the project’s directory, and run the dependency managers:
$ cd txpmag-website $ npm install $ bundle install $ bower install
npm installs Node modules for Grunt, bundle takes care of Ruby gems, and bower manages client-side scripts.
Once you have Grunt installed, installing and updating Textpattern is easy. To setup or update Textpattern run:
$ grunt setup
This will download the latest development version of Textpattern CMS and place it in the
public/ directory. Complete the installation as usual by visiting the
/textpattern/setup interface, and use this as your config.php template. Further updates can be run with the same command, and are automatic.
After you have installed Textpattern, you can install plugins the Textpattern installation will be using. Plugins can be installed using Composer:
$ composer install
A ‘cache’ directory is installed to the root by the ‘rah_cache’ plugin, make sure that directory is 755 writable.
This repository hosts sources and needs to be built before it can be used. After you have installed all dependencies, you will be able to run tasks using Grunt, including building:
$ grunt [task]
[task] is either
buildtask builds the project.
setuptask installs the latest build of Textpattern master branch from GitHub.
updatedevtask checks that development dependencies (Grunt plugins) are the latest versions, and if not, updates them.
watchtask will launch a task that watches for file changes; the project is then automatically built if a source file is modified.