Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
Juho Vepsäläinen edited this page May 13, 2015 · 22 revisions

The whole system operates using a simple JavaScript based configuration as below. Normally this file is named as antwar.config.js. The cli tool will pick that up.

module.exports = {
  // where to serve static/development server, defaults to 3000
  port: 3000,

  // override default console for different logging here if you want
  console: console,

  // where to output build, defaults to `build`
  output: 'build',

 // which npm package to use as a project boilerplate on `antwar -i`, defaults to 'antwar-boilerplate'    
  boilerplate: 'antwar-boilerplate',

  // The name of the site. Will be used for example in the page title.
  name: 'Antwar',

  // The base route for blog posts. 
  blogRoot: 'blog',

  // The author of the site. Can be used by themes and plugins.
  author: {
    name: 'Antwar',
    email: 'antwar@antwar.com'
  },

  // Functions called by antwar core.
  functions: {
    // See theme docs for documentation on which functions are available
  },

  plugins: [
    // Plugins that antwar should use
  ],
  

  // deployment options, see https://www.npmjs.com/package/gh-pages for more
  deploy: {
    // defaults to gh-pages
    branch: 'gh-pages',
  },
  theme: {
    // which theme to load, matches to NPM name
    name: 'antwar-default-theme',

    // site navigation
    navigation: [
      {title: 'Home', path: '/'},
      {title: 'Blog', path: '/blog'},
      {title: 'Getting started', path: '/getting-started'}
    ],
    //Site specific styles, relative to the styles/ directory
    customStyles: 'specific.scss',
  }
};

All configuration is available at template level. There may be extra data generated by plugins.

In case you need to access some other data (say site level metadata) at your pages, consider setting up a separate module and importing that. antwar.config.js will likely get validated at some point so it's better to overload it.

Clone this wiki locally