commit | 5c18f09dbe72e2bcede3372ece332c84381b75c9 | [log] [tgz] |
---|---|---|
author | Nicolas Lacasse <nlacasse@google.com> | Thu May 19 14:29:37 2016 -0700 |
committer | Nicolas Lacasse <nlacasse@google.com> | Thu May 19 14:29:37 2016 -0700 |
tree | 8038e9412872c878ca3a3c17393250df0fd4b6fe | |
parent | 9e2bdd9d66f4438a1c5de10b26ef9a04658cfd01 [diff] |
Tell users to install dependent os packages, and cleanup old JS refs. The "jiri profile install foo" command used to automatically install (with sudo) any required os packages. This functionality changed a few weeks ago, since some users complained about jiri running unknown commands with sudo. In the new world, you must run "jiri os-packages foo", which will inspect the system for installed packages, and if any new ones need to be installed, it prints a command (using either "brew" or "apt-get" depending on the system) that will install the packages for you. For example: $ jiri profile os-packages v23:base apt-get install -y automake This CL also removes some old references to Nodejs, WSPR, and JavaScript. Change-Id: Ifa410e738d71367649f1d89c1aa2085a4e077426
This repository contains the source code for generating the static assets for the Vanadium website.
browser
- Client-side JS that executes when users visit the websitebuild
- Output location for make build
content
- Markdown content; gets converted to HTML by haiku
helpers.js
- JS used by haiku
when rendering Markdown filesnode_modules
- Disposable directory created by npm install
package.json
- Tells npm install
what to installpublic
- Static assets, copied directly into the build
directorystylesheets
- LESS stylesheets, compiled into CSS for the websitetemplates
- Mustache templates used by haiku
for layouts and partialstools
- Tools involved in generating the site's static assetsInstall Vanadium per the installation instructions on the website. Also, install the Node.js profile using jiri profile install v23:nodejs
.
You can make and view changes locally by running a development server:
make serve
This command will print out a URL to visit in your browser. It will take a few minutes to run the first time around, but subsequent invocations will be fast.
By default, the running server will not reflect subsequent changes to the website content, since it's just serving the assets in the build
directory. Running make build
will cause the server to see the new content. Better yet, use the following command to automatically rebuild the assets whenever something changes:
make watch
This command requires the entr
program, which can be installed on Debian/Ubuntu using apt-get install entr
, and on OS X using brew install entr
.
Add or modify Markdown-formatted files in the content
directory.
The haiku
tool provides some extra flexibility on top of standard Markdown by processing Mustache template variables. For example:
= yaml = title: My Creative Title author: Alice = yaml = # {{ page.title }} Author: {{ page.author }}
A common editing workflow is to run make watch
, edit Markdown files in a text editor, and refresh the browser to see changes. If you prefer a WYSIWYG editing experience, there are a number of options, e.g.:
For new content, it's common to do initial drafting and editing in Google Docs, and to switch to Markdown at publication time.
The make build
task generates public/css/bundle.css
and public/js/bundle.js
from the files in stylesheets
and browser
respectively. To modify the website CSS or JS, edit those files, then rebuild the site (or use make watch
to have your changes trigger rebuild).
Jenkins automatically deploys to production on every successful build of vanadium-website-site target.