Skip to content

Commit

Permalink
Use Kramdown to generate HTML document from Markdown file; include ge…
Browse files Browse the repository at this point in the history
…nerated document in distribution package
  • Loading branch information
kwkbtr committed Jan 15, 2016
1 parent 6425e68 commit ad78d26
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules

doc/anchors.json
doc/supported-features.html
lib/vivliostyle.min.js
test/wpt/sauce-credentials.ini
6 changes: 6 additions & 0 deletions build/deploy-viewer-to-gh-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ echo -e "Host github.com\n\tStrictHostKeyChecking no\nIdentityFile ~/.ssh/deploy
echo -e "$GITHUB_DEPLOY_KEY" | base64 -d > ~/.ssh/deploy.key
chmod 600 ~/.ssh/deploy.key

# build documents
gem install kramdown
kramdown -i GFM --template doc/supported-features.erb doc/supported-features.md > doc/supported-features.html

cd ../

# fetch and build vivliostyle-ui
Expand All @@ -18,6 +22,7 @@ npm run build
npm run test-sauce

# make distribution package
cp ../vivliostyle.js/doc/supported-features.{md,html} dist/docs/en/
version=$(grep '^ *"version":' ../vivliostyle.js/package.json | sed -e 's/^.*"\([^"]*\)",$/\1/')
scripts/make-dist-package.sh ${version}

Expand All @@ -33,6 +38,7 @@ git config user.name "kwkbtr (Travis CI)"

# update gh-pages branch
cp -R ../vivliostyle.js/samples/* samples/
cp ../vivliostyle.js/doc/supported-features.{md,html} docs/
cp -R ../vivliostyle-ui/build/* viewer/

zip="../vivliostyle-ui/vivliostyle-js-latest.zip"
Expand Down
21 changes: 21 additions & 0 deletions doc/supported-features.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=yes" />
<!-- Always force latest IE rendering engine or request Chrome Frame -->
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<style>
html {
font-family: "Optima nova W01", "Optima", "游ゴシック", "Yu Gothic", "YuGothic", "ヒラギノ角ゴ ProN W3", "HiraKakuProN-W3", "ヒラギノ角ゴ Pro W3", "HiraKakuPro-W3", "メイリオ", "Meiryo", "MS ゴシック", "MS Gothic", sans-serif;
}
quote {
font-style: italic;
}
</style>
<title>Features supported by Vivliostyle</title>
</head>
<body>
<%= @body %>
</body>
</html>
4 changes: 2 additions & 2 deletions doc/supported-features.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Features supported by Vivliostyle

The Vivliostyle uses a two-layer architecture, with some of its functionality implemented purely in javascript, and some being delegated all or in part to the browser engine on top of which Vivliostyle is running. In the following list <quote>*Depends on browser's capability: No*</quote> indicates that features implemented in Javascript that will work regardless of the browser engine. Other features' availability and behavior do vary based on what is supported by the underlying browser engine. Vivliostyle Formatter uses Chromium 47.0.2526.80's engine.
The Vivliostyle uses a two-layer architecture, with some of its functionality implemented purely in javascript, and some being delegated all or in part to the browser engine on top of which Vivliostyle is running. In the following list <quote>Depends on browser's capability: No</quote> indicates that features implemented in Javascript that will work regardless of the browser engine. Other features' availability and behavior do vary based on what is supported by the underlying browser engine. Vivliostyle Formatter uses Chromium 47.0.2526.80's engine.

Properties where <quote>*Allowed prefixes*</quote> is indicated may be used with any of the listed prefixes, or preferably without a prefix, regardless of the underlying browser engine. If Vivliostyle needs to invoke the browser engine, it will internally convert to the appropriate syntax.
Properties where <quote>Allowed prefixes</quote> is indicated may be used with any of the listed prefixes, or preferably without a prefix, regardless of the underlying browser engine. If Vivliostyle needs to invoke the browser engine, it will internally convert to the appropriate syntax.

## Values

Expand Down

0 comments on commit ad78d26

Please sign in to comment.