Skip to content

Commit 540f108

Browse files
authored
Merge pull request #8 from dynamsoft-docs/preview
Preview
2 parents d1c6fd4 + 81085f5 commit 540f108

32 files changed

+1749
-227
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -8,92 +8,27 @@ on:
88
push:
99
branches:
1010
- main
11-
- preview
11+
#- preview
1212

1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
1515

1616
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1717
jobs:
1818
# This workflow contains jobs called "Build-main" and "Build-Preview"
19-
Build-main:
19+
Build-Main:
2020
if: ${{ github.ref == 'refs/heads/main' }}
21-
# The type of runner that the job will run on
22-
runs-on: self-hosted
23-
24-
# Steps represent a sequence of tasks that will be executed as part of the job
25-
steps:
26-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27-
#- uses: actions/checkout@v2
28-
29-
# Runs a set of commands using the runners shell
30-
- name: clear space
31-
run: |
32-
cd /home/ubuntu
33-
[ -d DCPDocJS ] && rm -rf DCPDocJS
34-
[ -d code-parser-docs-js ] && rm -rf code-parser-docs-js
35-
[ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview
36-
cd /home/ubuntu
37-
38-
- name: Build the site
39-
run: |
40-
cd /home/ubuntu
41-
mkdir -p DCPDocJS
42-
git clone --depth 1 https://github.com/dynamsoft-docs/code-parser-docs-js.git code-parser-docs-js
43-
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
44-
cp -rfp ./code-parser-docs-js/* ./DCPDocJS/
45-
cp -rfp ./Docs-Template-Repo-Preview/* ./DCPDocJS/
46-
cd DCPDocJS && bundle install && bundle exec jekyll build
47-
48-
- name: Sync files
49-
uses: SamKirkland/FTP-Deploy-Action@4.3.0
50-
with:
51-
server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }}
52-
username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }}
53-
password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }}
54-
port: 21
55-
local-dir: /home/ubuntu/DCPDocJS/_site/
56-
server-dir: /www.dynamsoft.com/code-parser/docs/web/
57-
58-
- name: Trigger Webhook
59-
run: |
60-
curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/code-parser/docs/web/*\"]" ${{ secrets.WEBHOOK_URL }}
61-
21+
uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-production.yml@main
22+
with:
23+
doc-repo: code-parser-docs-js
24+
doc-url: code-parser/docs/web
25+
secrets: inherit
6226

6327
Build-Preview:
6428
if: ${{ github.ref == 'refs/heads/preview' }}
65-
# The type of runner that the job will run on
66-
runs-on: self-hosted
67-
68-
# Steps represent a sequence of tasks that will be executed as part of the job
69-
steps:
70-
# Runs a set of commands using the runners shell
71-
- name: clear space
72-
run: |
73-
cd /home/ubuntu
74-
[ -d DCPDocJSPreview ] && rm -rf DCPDocJSPreview
75-
[ -d code-parser-docs-js-preview ] && rm -rf code-parser-docs-js-preview
76-
[ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview
77-
cd /home/ubuntu
78-
79-
- name: Build the site
80-
run: |
81-
cd /home/ubuntu
82-
mkdir -p DCPDocJSPreview
83-
git clone --depth 1 --branch preview https://${{ secrets.GIT_USER }}:${{ secrets.GIT_PAT }}@github.com/dynamsoft-docs/code-parser-docs-js.git code-parser-docs-js-preview
84-
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
85-
cp -rfp ./code-parser-docs-js-preview/* ./DCPDocJSPreview/
86-
cp -rfp ./Docs-Template-Repo-Preview/* ./DCPDocJSPreview/
87-
sed -i -e "1,3s/blob\/master$/blob\/preview/" \
88-
-e "1,3s/blob\/main$/blob\/preview/" /home/ubuntu/DCPDocJSPreview/_config.yml
89-
cd DCPDocJSPreview && bundle install && bundle exec jekyll build
29+
uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-testing.yml@preview
30+
with:
31+
doc-repo: code-parser-docs-js
32+
doc-url: code-parser/docs/web
33+
secrets: inherit
9034

91-
- name: Sync files
92-
uses: SamKirkland/FTP-Deploy-Action@4.3.0
93-
with:
94-
server: ${{ secrets.FTP_TEST_SITE_SERVER }}
95-
username: ${{ secrets.FTP_TEST_SITE_USER }}
96-
password: ${{ secrets.FTP_TEST_SITE_PASSWORD }}
97-
port: 7500
98-
local-dir: /home/ubuntu/DCPDocJSPreview/_site/
99-
server-dir: /www.dynamsoft.com/code-parser/docs/web/

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
.DS_Store
3+
/.vs

_config.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@ repositoryUrl: https://github.com/dynamsoft-docs/code-parser-docs-js/blob/main
22
repository: dynamsoft-docs/code-parser-docs-js
33
docFullPath: https://www.dynamsoft.com/code-parser/docs/web
44
firstLevelUrl: /code-parser/docs/web/
5+
docRootName: "Code Parser JS Edition"
56
docHomePage: /code-parser/docs/core/introduction/
67

7-
javascript: /code-parser/docs/web/programming/javascript/
8-
javascript-api: /code-parser/docs/web/programming/javascript/api-reference/
9-
javascript-api-enum: /code-parser/docs/web/programming/javascript/api-reference/enum/
10-
javascript-api-interface: /code-parser/docs/web/programming/javascript/api-reference/interface/
11-
javascript-release-notes: /code-parser/docs/web/programming/javascript/release-notes/
8+
js: /code-parser/docs/web/programming/javascript/
9+
dcp_js_api: /code-parser/docs/web/programming/javascript/api-reference/
10+
dcp_enum: /code-parser/docs/web/programming/javascript/api-reference/enum/
11+
js_release_notes: /code-parser/docs/web/programming/javascript/release-notes/
12+
enums: /capture-vision/docs/core/enums/
13+
14+
dcv_enumerations: /capture-vision/docs/core/enums/
15+
16+
dcv_js_api: /capture-vision/docs/web/programming/javascript/api-reference/
17+
dcv_introduction: /capture-vision/docs/core/introduction/
1218

1319
assets: /code-parser/docs/web/assets/
1420
edit_icon: /code-parser/docs/web/assets/img-icon/edit-icon.png
@@ -18,7 +24,8 @@ dbr_icon: /code-parser/docs/web/assets/img-icon/icon-dbr.svg
1824
dwt_icon: /code-parser/docs/web/assets/img-icon/icon-dwt.svg
1925
dnt_icon: /code-parser/docs/web/assets/img-icon/icon-dnt.svg
2026

21-
release-notes: /code-parser/docs/core/release-notes/
27+
release_notes: /code-parser/docs/core/release-notes/
28+
code_types: /code-parser/docs/core/code-types/
2229

2330
useVersionTree: true
2431

@@ -51,5 +58,7 @@ defaults:
5158
values:
5259
sitemap: false
5360

61+
edition: js
62+
5463
url: "https://www.dynamsoft.com" # sitemap root
5564

_data/full_tree.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
tree_file_list:
22
- sidelist-full-tree.html
33
- sidelist-programming-javascript.html
4+
- sidelist-programming-javascript-v1.1.0.html

_data/product_version.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
version_info_list:
2-
- latest version
1+
useGroupedVersion: true
2+
3+
version_info_list_js:
4+
- value: latest version
5+
- value: 2.x
6+
child:
7+
- 2.0.20
8+
- value: 1.x
9+
child:
10+
- 1.1.0
11+
- 1.0.2

_includes/dcpNav.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<li class="title"><a class="orangeLink" href="{{site.docHomePage}}">Dynamsoft Code Parser</a></li>
2323
<li class="item overview">
2424
<!---->
25-
<a class="textUpperCase" href="{{site.release-notes}}">Release Notes</a>
25+
<a class="textUpperCase" href="{{site.release_notes}}">Release Notes</a>
2626
</li>
2727
<li class="item overview">
2828
<!---->
@@ -45,7 +45,7 @@
4545
<div class="row">
4646
<div class="col-xs-12">
4747
<ul class="menuList">
48-
<li class="item"><a href="{{site.release-notes}}">Release Notes</a></li>
48+
<li class="item"><a href="{{site.release_notes}}">Release Notes</a></li>
4949
<li class="item"><a href="{{site.firstLevelUrl}}">Documentation</a></li>
5050
</ul>
5151
</div>
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<li>
2+
<a href="{{ site.js }}" class="otherLinkColour">Introduction</a>
3+
</li>
4+
<li class="category">DEVELOPMENT</li>
5+
<li>
6+
<a
7+
style="cursor: pointer; color: #3c3c3c"
8+
href="{{ site.js }}user-guide/index.html"
9+
class="otherLinkColour"
10+
>User Guide</a
11+
>
12+
</li>
13+
<li>
14+
<a
15+
style="cursor: pointer; color: #3c3c3c"
16+
href="{{ site.dcp_js_api }}"
17+
class="otherLinkColour"
18+
>API Reference</a
19+
>
20+
<ul>
21+
<li>
22+
<a href="{{ site.dcp_js_api }}CodeParser.html" class="otherLinkColour"
23+
>CodeParser for code parsing</a
24+
>
25+
</li>
26+
<li>
27+
<a
28+
href="{{ site.dcp_js_api }}LicenseControl.html"
29+
class="otherLinkColour"
30+
>License Control</a
31+
>
32+
</li>
33+
<li>
34+
<a
35+
href="{{ site.dcp_js_api }}InitializeEngine.html"
36+
class="otherLinkColour"
37+
>Initialization Control</a
38+
>
39+
</li>
40+
<li>
41+
<a
42+
href="{{ site.dcp_js_api }}interfacesindex.html"
43+
class="otherLinkColour"
44+
>Interfaces</a
45+
>
46+
<ul>
47+
<li>
48+
<a
49+
href="{{ site.dcp_js_api }}interfacesBasicPersonalInfo.html"
50+
class="otherLinkColour"
51+
>BasicPersonalInfo</a
52+
>
53+
</li>
54+
<li>
55+
<a
56+
href="{{ site.dcp_js_api }}interfacesCodeParserException.html"
57+
class="otherLinkColour"
58+
>CodeParserException</a
59+
>
60+
</li>
61+
<li>
62+
<a
63+
href="{{ site.dcp_js_api }}interfacesParseResult.html"
64+
class="otherLinkColour"
65+
>ParseResult</a
66+
>
67+
</li>
68+
</ul>
69+
</li>
70+
<li>
71+
<a href="{{ site.dcp_enum }}index.html" class="otherLinkColour"
72+
>Enums</a
73+
>
74+
<ul>
75+
<li>
76+
<a
77+
href="{{ site.dcp_enum }}EnumCodeFormat.html"
78+
class="otherLinkColour"
79+
>EnumCodeFormat</a
80+
>
81+
</li>
82+
<li>
83+
<a
84+
href="{{ site.dcp_enum }}EnumErrorCode.html"
85+
class="otherLinkColour"
86+
>EnumErrorCode</a
87+
>
88+
</li>
89+
<li>
90+
<a
91+
href="{{ site.dcp_enum }}EnumResultInfoType.html"
92+
class="otherLinkColour"
93+
>EnumResultInfoType</a
94+
>
95+
</li>
96+
</ul>
97+
</li>
98+
</ul>
99+
</li>
100+
<li>
101+
<a href="{{ site.js_release_notes }}" class="otherLinkColour"
102+
>Release Notes</a
103+
>
104+
<ul>
105+
<li>
106+
<a
107+
href="{{ site.js_release_notes }}js-2.html"
108+
class="otherLinkColour"
109+
>Version 1.x</a
110+
>
111+
</li>
112+
</ul>
113+
</li>

0 commit comments

Comments
 (0)