- Notifications
You must be signed in to change notification settings - Fork2
chrisallenlane/wit-cms-bootstrap
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
wit-cms-bootstrap is an example blog built withExpress andwit-cms. Itis to be used a starting point when building a website withwit-cms.
Clone this repository and start the local webserver to become acquainted withwit-cms:
npm run start
The webserver will bind to port3000 by default, and will be available athttp://localhost:3000.
The example blog posts contain tips regarding usingwit-cms. You may want toread them.
After you've become acqainted with this example website, you may freely modifyit to suit your needs.
wit-cms-bootstrap contains the following files and directories:
| File/Directory | Purpose |
|---|---|
app.js | The Express application entry-point. |
bin | Contains executable scripts. |
media | Intended to serve static post/page content. (Not intended to serve "code", like stylesheets.) |
pages | Contains "page" content markdown files. |
post | Contains "post" content markdown files. |
public | Intended to serve static application assets, like stylesheets and JavaScript. |
views | Contains Express views. |
This repository will require minor configuration changes before production use.
Aconfig object is defined inapp.js. You'll likely want to update some ofits values:
// wit configsconstconfig={// website metadata, a la Wordpressparams:{author :'John Doe',fqdn :'https://example.com',name :'example.com',tagLine :'Built with wit-cms-bootstrap',},};
You may likewise freely attach any additional values toconfig.params to makethem available to thewit object.
bin/minify-css contains an array of stylesheets that are to be concatenatedand minified:
// stylesheets to concatenate (ordered)constfiles=['normalize.css','main.css','desktop.css','mobile.css','solarized-dark.css',// highlighting styles for highlight.js];
Modify those as necessary. Note that array order is important - stylesheetswill be concatenated in the order in which they are specified. (See:Building)
Change the logging application name in the following line ofbin/www:
vardebug=require('debug')('wit-cms-bootstrap:server');
By default, the local webserver is configured only to serve static files in thedevelopment environment:
// only use the static-file middleware on the dev environmentif('development'==app.get('env')){app.use(express.static(path.join(__dirname,'public')));app.use('/media',express.static('media'));}
In production, it is recommended to use a webserver likeApache,Nginx,orCaddy for serving static files.
By default,wit-cms-bootstrap defines a single build task, which concatenates andminifies all stylesheets specified inbin/minify-css:
npm run build
By default, the combined stylesheets will be saved topublic/stylesheets/app.css.
wit-cms is for programmers, andwit-cms-bootstrap is ultimately just an Expressapplication. You may freely modify it as you would any other application.
About
An example site built around wit-cms.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.