Procházet zdrojové kódy

Moving navigation menu to gcs (loc enabled). Fixes in metadata in a few docs.

Mikael Säker před 8 roky
rodič
revize
231183b55d

+ 2 - 2
docs/en/manuals/2dgraphics.md

@@ -1,6 +1,6 @@
 ---
-title = Defold 2D graphics manual
-brief = This manual details Defold's support for 2D graphical elements like sprites and Spine models.
+title: Defold 2D graphics manual
+brief: This manual details Defold's support for 2D graphical elements like sprites and Spine models.
 ---
 
 # 2D Graphics

+ 2 - 2
docs/en/manuals/3dgraphics.md

@@ -1,6 +1,6 @@
 ---
-title = Defold 3D graphics manual
-brief = This manual outlines the 3D support in Defold.
+title: Defold 3D graphics manual
+brief: This manual outlines the 3D support in Defold.
 ---
 
 # 3D graphics

+ 1 - 1
docs/en/manuals/gui-pie.md

@@ -1,5 +1,5 @@
 ---
-titel: Defold GUI pie nodes
+title: Defold GUI pie nodes
 brief: This manual explains how to use pie nodes in Defold GUI scenes.
 ---
 

+ 1 - 1
docs/en/manuals/gui-spine.md

@@ -1,5 +1,5 @@
 ---
-titel: Defold GUI Spine nodes
+title: Defold GUI Spine nodes
 brief: This manual explains how to use bone animated Spine nodes in Defold GUI scenes.
 ---
 

+ 2 - 2
docs/en/manuals/introduction.md

@@ -1,6 +1,6 @@
 ---
-title = Introduction to Defold
-brief = A brief introduction that covers the core concepts of Defold and is intended to give an overview to the editor and the most important features.
+title: Introduction to Defold
+brief: A brief introduction that covers the core concepts of Defold and is intended to give an overview to the editor and the most important features.
 ---
 
 # Welcome to Defold

+ 1 - 2
docs/en/manuals/models.md

@@ -1,5 +1,4 @@
-Models
-======
+# Models
 
 This document has been replaced by the following manuals:
 

+ 242 - 0
docs/en/manuals_navigation.json

@@ -0,0 +1,242 @@
+{
+    "name": "Manuals",
+    "menu":
+    [
+        {
+            "name": "GETTING STARTED",
+            "items": [
+                {
+                    "path": "introduction",
+                    "name": "Introduction"
+                },
+                {
+                    "path": "scene-editing",
+                    "name": "Scene editing"
+                },
+                {
+                    "path": "workflow",
+                    "name": "Workflow"
+                },
+                {
+                    "path": "lua",
+                    "name": "Lua in Defold"
+                }
+            ]
+        },
+        {
+            "name": "CORE CONCEPTS",
+            "items": [
+                {
+                    "path": "building-blocks",
+                    "name": "Building blocks"
+                },
+                {
+                    "path": "message-passing",
+                    "name": "Message passing"
+                },
+                {
+                    "path": "application-lifecycle",
+                    "name": "Application lifecycle"
+                }
+            ]
+        },
+        {
+            "name": "RESOURCES & COMPONENTS",
+            "items": [
+                {
+                    "path": "2dgraphics",
+                    "name": "2D graphics"
+                },
+                {
+                    "path": "3dgraphics",
+                    "name": "3D graphics"
+                },
+                {
+                    "path": "animation",
+                    "name": "Animation"
+                },
+                {
+                    "path": "spine",
+                    "name": "Spine animation"
+                },
+                {
+                    "path": "spinemodel",
+                    "name": "Spine model"
+                },
+                {
+                    "path": "model",
+                    "name": "Model (3D)"
+                },
+                {
+                    "path": "particlefx",
+                    "name": "Particle FX"
+                },
+                {
+                    "path": "physics",
+                    "name": "Physics"
+                },
+                {
+                    "path": "sound",
+                    "name": "Sound"
+                },
+                {
+                    "path": "font",
+                    "name": "Font"
+                },
+                {
+                    "path": "label",
+                    "name": "Label"
+                },
+                {
+                    "path": "material",
+                    "name": "Material"
+                },
+                {
+                    "path": "rendering",
+                    "name": "Rendering"
+                },
+                {
+                    "path": "shader",
+                    "name": "Shader"
+                },
+                {
+                    "path": "factory",
+                    "name": "Factory"
+                },
+                {
+                    "path": "collection-factory",
+                    "name": "Collection factory"
+                },
+                {
+                    "path": "collection-proxy",
+                    "name": "Collection proxy"
+                },
+                {
+                    "path": "live-update",
+                    "name": "Live update"
+                },
+                {
+                    "path": "camera",
+                    "name": "Camera"
+                }
+            ]
+        },
+        {
+            "name": "GUI",
+            "items": [
+                {
+                    "path": "gui",
+                    "name": "GUI overview"
+                },
+                {
+                    "path": "gui-text",
+                    "name": "Text nodes"
+                },
+                {
+                    "path": "gui-pie",
+                    "name": "Pie nodes"
+                },
+                {
+                    "path": "gui-spine",
+                    "name": "Spine nodes"
+                },
+                {
+                    "path": "gui-templates",
+                    "name": "Template nodes"
+                },
+                {
+                    "path": "clipping",
+                    "name": "Clipping"
+                },
+                {
+                    "path": "layouts",
+                    "name": "Layouts"
+                }
+            ]
+        },
+        {
+            "name": "GAME LOGIC",
+            "items": [
+                {
+                    "path": "properties",
+                    "name": "Properties"
+                },
+                {
+                    "path": "script-properties",
+                    "name": "Script properties"
+                },
+                {
+                    "path": "input",
+                    "name": "Input"
+                },
+                {
+                    "path": "debugging",
+                    "name": "Debugging"
+                },
+                {
+                    "path": "modules",
+                    "name": "Modules"
+                }
+            ]
+        },
+        {
+            "name": "PROJECT SETUP",
+            "items": [
+                {
+                    "path": "project-settings",
+                    "name": "Project settings"
+                },
+                {
+                    "path": "libraries",
+                    "name": "Libraries"
+                },
+                {
+                    "path": "texture-profiles",
+                    "name": "Texture profiles"
+                },
+                {
+                    "path": "bob",
+                    "name": "Bob the builder"
+                }
+            ]
+        },
+        {
+            "name": "PLATFORMS",
+            "items": [
+                {
+                    "path": "ios",
+                    "name": "iOS"
+                },
+                {
+                    "path": "android",
+                    "name": "Android"
+                },
+                {
+                    "path": "html5",
+                    "name": "HTML5"
+                }
+            ]
+        },
+        {
+            "name": "EXTENSIONS",
+            "items": [
+                {
+                    "path": "extensions",
+                    "name": "Native extensions"
+                },
+                {
+                    "path": "facebook",
+                    "name": "Facebook"
+                },
+                {
+                    "path": "iap",
+                    "name": "In-app purchases"
+                },
+                {
+                    "path": "push",
+                    "name": "Push notifications"
+                }
+            ]
+        }
+    ]
+}

+ 0 - 1
docs/sass/defold-md.sass

@@ -18,7 +18,6 @@ $gray-light-background: #f7f8fa
 $blue-dark-faded: #6a7480
 $orange-primary: #fd6623
 
-
 body
   font-family: Source Sans Pro, sans-serif
   color: $text-black

+ 20 - 3
gulpfile.js

@@ -23,6 +23,8 @@ var md_sub = require('markdown-it-sub');
 var md_sup = require('markdown-it-sup');
 var md_katex = require('markdown-it-katex');
 
+var exec = require('child_process').exec;
+
 // hljs lua highlight patched
 var lua = require('./lib/lua');
 hljs.registerLanguage('lua', lua.lua);
@@ -125,8 +127,8 @@ function markdownToPreviewHtml(file) {
     return;
 }
 
-//var img_url = 'https://storage.googleapis.com/defold-doc';
-var img_url = '/_ah/gcs/defold-doc';
+var img_url = 'https://storage.googleapis.com/defold-doc';
+//var img_url = '/_ah/gcs/defold-doc'; // local dev-server
 
 // Build document json for storage
 function markdownToJson(file) {
@@ -153,10 +155,25 @@ gulp.task('build', ['assets'], function () {
 });
 
 gulp.task('assets', ['clean'], function() {
-    return gulp.src(['docs/**/*.{png,jpg,svg,gif}'])
+    return gulp.src(['docs/**/*.{png,jpg,svg,gif,json}'])
         .pipe(gulp.dest("build"));
 });
 
+// Install GCS SDK
+//https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-148.0.1-darwin-x86_64.tar.gz
+
+// Publish
+gulp.task('publish', ['build'], function () {
+    exec('ls -al', (error, stdout, stderr) => {
+        if (error) {
+            console.error(`exec error: ${error}`);
+            return;
+        }
+        console.log(`stdout: ${stdout}`);
+        console.log(`stderr: ${stderr}`);
+    });
+});
+
 // Watch for changes in md files and compile new html
 gulp.task('watch', function () {
     mkdirp('build/preview');