Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 17, 2023. It is now read-only.

An example site built around wit-cms.

NotificationsYou must be signed in to change notification settings

chrisallenlane/wit-cms-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Usage

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.

Layout

wit-cms-bootstrap contains the following files and directories:

File/DirectoryPurpose
app.jsThe Express application entry-point.
binContains executable scripts.
mediaIntended to serve static post/page content. (Not intended to serve "code", like stylesheets.)
pagesContains "page" content markdown files.
postContains "post" content markdown files.
publicIntended to serve static application assets, like stylesheets and JavaScript.
viewsContains Express views.

Configuring

This repository will require minor configuration changes before production use.

app.js

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

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)

bin/www

Change the logging application name in the following line ofbin/www:

vardebug=require('debug')('wit-cms-bootstrap:server');

Static File Serving

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.

Building

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.

Extending

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

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp