Skip to content

Commit

Permalink
feat: add vuejs-nativescript mini site
Browse files Browse the repository at this point in the history
  • Loading branch information
etabakov committed Feb 21, 2018
1 parent 90a5769 commit 3d6be3a
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 0 deletions.
77 changes: 77 additions & 0 deletions build/_config_vuejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# The public documentation URL, used for sitemap.xml
url: "https://docs.nativescript.org"
destination: ./vuejs

## The application virtual path
baseurl: ""
# Exclude files which should not be in the output
exclude: [Gemfile,Gemfile.lock,README.md,node_modules,dist, code-samples]
## The highlighting in the header
nsselected: "selected"
ngselected: ""


flavour: "vuejs"

# The google services configuration
google_tag_manager: GTM-W58JDD
google_custom_search: '001595215763381649090:asl7kpbijam'

## The base url of the header links
headerbaseurl: //www.nativescript.org
nscookbookurl: "/vuejs/"
source: ./
# Release date in the format of: YYYY-MM-DD
release_date: "2016-11-16"

navigation:
## List your directory names and order here, like this:
start:
position: 10
title: "INTRODUCTION"
expanded: true

## The product name
productName: "NativeScript"

## Improve This Article button-related:
improveThis:
mapOfBaseUrls:
0:
matchPattern: '^/cookbook/.*'
1:
matchPattern: '^/code-samples/.*'
2:
matchPattern: '.*'
baseUrl: "https://github.com/NativeScript/docs/blob/master/docs/"

## Assign layout and category per different paths
defaults:
-
scope:
path: ""
values:
layout: "page"
category: "default"

# Aliases available in the markdown template. The below will expand {{site.foo}} to Bar in the output
# "foo": "Bar"
"current-version": "2.0.0"

# Assets pipeline configuration
assets:
cachebust: soft
js_compressor: uglifier

## Do not edit below this line
safe: false
markdown: MarkdownProcessor
kramdown:
toc_levels: 2..3
smart_quotes: ["quot", "quot", "quot", "quot"]
input: GFM

gems:
- jekyll-unsanitize
# Feedback Form Google Sheet ID
ff-sheet-id: 1Njk-CD9m_mKw_jSRBV2p6quwEOAKRZnUPJgeUrA1ZFA
1 change: 1 addition & 0 deletions build/_includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ <h1>Documentation</h1>
<div class="-separated -a-black -fs20 -fw4 SecNav">
<a href="/" class="-pr -dib -pt2 -pb2 -s-db -s-ml0 -s-pt1 -s-pb1 -s-no-pseudo {{ site.nsselected }}">NativeScript Core</a>
<a href="/angular/start/introduction" class="-pr -dib -pt2 -pb2 -s-db -s-ml0 -s-pt1 -s-pb1 -s-no-pseudo {{ site.ngselected }}">NativeScript with Angular</a>
<a href="/vuejs" class="-pr -dib -pt2 -pb2 -s-db -s-ml0 -s-pt1 -s-pb1 -s-no-pseudo">NativeScript with Vue.js</a>
<a href="/api-reference/globals" class="-pr -dib -pt2 -pb2 -s-db -s-ml0 -s-pt1 -s-pb1 -s-no-pseudo">API Reference</a>
<a href="/sidekick" class="-pr -dib -pt2 -pb2 -s-db -s-ml0 -s-pt1 -s-pb1 -s-no-pseudo">NativeScript Sidekick</a>
</div>
Expand Down
18 changes: 18 additions & 0 deletions build/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ MODULES_ROOT=$SCRIPT_PATH"/../../NativeScript"
NG_ROOT=$SCRIPT_PATH"/../../nativescript-angular"
SDK_ROOT=$SCRIPT_PATH"/../../nativescript-sdk-examples-ng"
SIDEKICK_ROOT=$SCRIPT_PATH"/../../sidekick-docs"
VUEJS_ROOT=$SCRIPT_PATH"/../../docs/vuejs-docs"

if [ -d "$ROOT" ]; then
rm -rf $ROOT
Expand All @@ -34,6 +35,13 @@ cd $SIDEKICK_ROOT
bundle install
jekyll build --config _config.yml

cd $SCRIPT_PATH
cp -r $SCRIPT_PATH"/_config_vuejs.yml" $SCRIPT_PATH"/_assets" $SCRIPT_PATH"/_layouts" $SCRIPT_PATH"/_plugins" $SCRIPT_PATH"/_includes" $VUEJS_ROOT
rm $VUEJS_ROOT"/_plugins/redirect_generator.rb" $VUEJS_ROOT"/_plugins/slug.rb" $VUEJS_ROOT"/_plugins/improvethis_generator.rb"
cd $VUEJS_ROOT
jekyll build --config _config_vuejs.yml --verbose
ls

cd $SDK_ROOT
./build-docs.sh

Expand Down Expand Up @@ -68,5 +76,15 @@ export JEKYLL_ENV="angular"
jekyll build --config _config_angular.yml,_config.yml

cp -R $MODULES_ROOT"/bin/dist/api-reference" $SIDEKICK_ROOT"/sidekick" $WWW_ROOT
echo "Copying vuejs: \n"

cp --verbose -R $VUEJS_ROOT"/vuejs" $WWW_ROOT

cp -R $NS_DIST_ROOT"/./" $WWW_ROOT
cp -R $NG_DIST_ROOT"/./" $WWW_ROOT"/angular"

cd $WWW_ROOT
ls
echo "Vuejs: folder"
cd vuejs
ls
1 change: 1 addition & 0 deletions build/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ http {
{% endfor %}

rewrite ^/sidekick$ $proto://$host_and_port/sidekick/intro/introduction permanent;
rewrite ^/vuejs$ $proto://$host_and_port/vuejs/introduction permanent;

# Redirect old api reference
rewrite ^/apireference/(.*)$ $proto://$host_and_port/api-reference permanent;
Expand Down
9 changes: 9 additions & 0 deletions vuejs-docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Welcome
description: Meet NativeScript - an open-source framework for the cross-platform development of truly native apps.
position: 10
publish: true
---

# Vue.js
asdasda

0 comments on commit 3d6be3a

Please sign in to comment.