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

Commit8075e99

Browse files
committed
wip
1 parent96fd941 commit8075e99

23 files changed

+269
-108
lines changed

‎build/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const moment = require('moment');
1515

1616
// custom plugins
1717
constlink_index=require('./plugins/link_index');
18+
constcategories=require('./plugins/categories');
1819
constchangeExt=require('./plugins/change-ext');
1920
constmarkdown=require('./plugins/markdown');
2021
constlayouts=require('./plugins/layouts');
@@ -49,6 +50,7 @@ Metalsmith(cwd)
4950
"layouts/**/*":'**/*.md',
5051
}
5152
})))
53+
.use(categories())
5254
// group certain files into collections
5355
.use(collections({
5456
blog:{
@@ -66,7 +68,7 @@ Metalsmith(cwd)
6668
// use multiple languages
6769
.use(multiLanguage({
6870
default:'en',
69-
locales:['en','hu']
71+
locales:['en']
7072
}))
7173
// render markdown using our own plugin around marked
7274
.use(markdown())

‎build/plugins/categories.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
constpath=require('path');
2+
constfs=require('fs');
3+
4+
5+
functionplugin(opts){
6+
7+
8+
returnfunction(files,metalsmith,done){
9+
constmeta=metalsmith.metadata();
10+
constmap={};
11+
12+
Object.keys(files).forEach((file)=>{
13+
constdata=files[file];
14+
constinfo=path.parse(file);
15+
16+
if(info.dir.includes('docs')){
17+
data.categories=data.categories||info.dir.split(path.sep).splice(2);
18+
constp=data.categories.join(':');
19+
map[p]=map[p]||[];
20+
map[p].push(data);
21+
22+
data.layout=data.layout||'docs.ejs';
23+
}
24+
});
25+
26+
console.log(map);
27+
meta.docs_categories=Object.keys(map).reduce((acc,curr)=>{
28+
acc.push({
29+
title:curr||'introduction',
30+
children:map[curr],
31+
level:curr.split(':').length
32+
});
33+
returnacc;
34+
},[]);
35+
done();
36+
}
37+
}
38+
39+
module.exports=plugin;

‎build/plugins/link_index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function plugin(opts) {
1010
}
1111
});
1212

13-
console.log(links);
13+
//console.log(links);
1414
done();
1515
}
1616
}

‎build/plugins/toc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function plugin(opts) {
1313
if(data.toc===true){
1414
try{
1515
data.toc=newtocJSON().generateJSON(data.contents.toString());
16-
console.log(data.contents.toString())
16+
//console.log(data.contents.toString())
1717
}catch(err){
1818
returndone(err);
1919
}
@@ -27,7 +27,7 @@ function plugin(opts) {
2727
}
2828
}else{
2929
data.toc=false;
30-
data.layout=data.layout||'no_sidebar.ejs'
30+
data.layout=data.layout||'no_sidebar.ejs';
3131
}
3232
});
3333
done();

‎content/docs/en/elements/Label.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎content/docs/en/troubleshooting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
title:Troubleshooting
23
original:https://raw.githubusercontent.com/NativeScript/docs/master/docs/start/troubleshooting.md
34
---
45

‎content/docs/en/using-nativescript-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Using NativeScript Plugins
44

55
Plugins work as in any other NativeScript app, but you may wonder how UI plugins would work with Vue.
66

7-
UI plugins work almost identically to how you'd use a NativeScript UI plugin in an Angular app. For instance consider this example usage of[nativescript-gradient](https://github.com/EddyVerbruggen/nativescript-gradient) which is used in the[listview sample](samples/app/app-with-list-view.js):
7+
UI plugins work almost identically to how you'd use a NativeScript UI plugin in an Angular app. For instance consider this example usage of[nativescript-gradient](https://github.com/EddyVerbruggen/nativescript-gradient) which is used in the[listview sample](https://github.com/rigor789/nativescript-vue/tree/master/samples/app/app-with-list-view.js):
88

99
Install the plugin by running this command in the samples folder:
1010

‎content/docs/en/using-vue-modules.mdrenamed to ‎content/docs/en/using-vue-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title:UsingNativeScript Plugins
2+
title:UsingVue Plugins
33
---
44

55
##vue-router

‎content/index_en.ejs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: landing.ejs
33
---
44

55
<divclass="bg-blue-light">
6-
<divclass="container mx-autopx-4py-8">
6+
<divclass="container mx-auto py-8">
77

88
<divclass="w-1/2 my-8">
99
<h1class="text-5xl leading-tight text-white">Truly native apps using Vue.js and NativeScript</h1>
@@ -15,7 +15,8 @@ layout: landing.ejs
1515
NativeScript-Vue is the right choice for you!
1616
</p>
1717

18-
<ahref="#"class="px-8 py-4 inline-block bg-green text-white font-bold text-lg no-underline mt-8">
18+
<!-- TODO set the correct link for getting started-->
19+
<ahref="/"class="px-8 py-4 inline-block bg-green text-white font-bold text-lg no-underline mt-8">
1920
Get Started
2021
</a>
2122
</div>

‎content/index_hu.ejs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp