Skip to content

Preview #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
89d35d7
Merge pull request #7 from dynamsoft-docs/jenny-branch
Jenny-Jiani Sep 15, 2023
99ad24b
update build to use reusable workflow
DMGithubPublisher Oct 20, 2023
544c7b0
try the preview docs draft
Tom-Dynamsoft Nov 21, 2023
fec3233
updated for dcp 2.x
Tom-Dynamsoft Dec 12, 2023
07ddbae
update small issues 001
Tom-Dynamsoft Dec 12, 2023
df57dd7
update small issues 002
Tom-Dynamsoft Dec 12, 2023
a07eb25
update small issues 003
Tom-Dynamsoft Dec 12, 2023
d783dd4
update small issues 004
Tom-Dynamsoft Dec 12, 2023
91dabcb
update small issues 005
Tom-Dynamsoft Dec 12, 2023
d936527
update small issues 006
Tom-Dynamsoft Dec 12, 2023
2cde9bd
update small issues 007
Tom-Dynamsoft Dec 12, 2023
9e7d927
update small issues 007
Tom-Dynamsoft Dec 12, 2023
0857cb9
update small issues 008
Tom-Dynamsoft Dec 12, 2023
43d74ef
update small issues 009
Tom-Dynamsoft Dec 12, 2023
1bab885
update small issues 010
Tom-Dynamsoft Dec 12, 2023
c28fe1c
update small issues 011
Tom-Dynamsoft Dec 12, 2023
19fbe93
update small issues 012
Tom-Dynamsoft Dec 12, 2023
65f5cf6
remove parsedFields in ParsedResultItem
Tom-Dynamsoft Dec 13, 2023
5aeb37c
update small issues 013
Tom-Dynamsoft Dec 13, 2023
784c2c8
update to internal commit 49b009f6
DMGithubPublisher Dec 15, 2023
e62019f
update to internal commit aad5466b
DMGithubPublisher Jan 17, 2024
95a1a43
update to internal commit c6aec4a1
DMGithubPublisher Jan 18, 2024
5b69265
update to internal commit 0db94b75
DMGithubPublisher Jan 18, 2024
81085f5
update to internal commit b2b075f6
DMGithubPublisher Jan 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 12 additions & 77 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,92 +8,27 @@ on:
push:
branches:
- main
- preview
#- preview

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

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains jobs called "Build-main" and "Build-Preview"
Build-main:
Build-Main:
if: ${{ github.ref == 'refs/heads/main' }}
# The type of runner that the job will run on
runs-on: self-hosted

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
#- uses: actions/checkout@v2

# Runs a set of commands using the runners shell
- name: clear space
run: |
cd /home/ubuntu
[ -d DCPDocJS ] && rm -rf DCPDocJS
[ -d code-parser-docs-js ] && rm -rf code-parser-docs-js
[ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview
cd /home/ubuntu

- name: Build the site
run: |
cd /home/ubuntu
mkdir -p DCPDocJS
git clone --depth 1 https://github.com/dynamsoft-docs/code-parser-docs-js.git code-parser-docs-js
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
cp -rfp ./code-parser-docs-js/* ./DCPDocJS/
cp -rfp ./Docs-Template-Repo-Preview/* ./DCPDocJS/
cd DCPDocJS && bundle install && bundle exec jekyll build

- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }}
username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }}
password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }}
port: 21
local-dir: /home/ubuntu/DCPDocJS/_site/
server-dir: /www.dynamsoft.com/code-parser/docs/web/

- name: Trigger Webhook
run: |
curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/code-parser/docs/web/*\"]" ${{ secrets.WEBHOOK_URL }}

uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-production.yml@main
with:
doc-repo: code-parser-docs-js
doc-url: code-parser/docs/web
secrets: inherit

Build-Preview:
if: ${{ github.ref == 'refs/heads/preview' }}
# The type of runner that the job will run on
runs-on: self-hosted

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a set of commands using the runners shell
- name: clear space
run: |
cd /home/ubuntu
[ -d DCPDocJSPreview ] && rm -rf DCPDocJSPreview
[ -d code-parser-docs-js-preview ] && rm -rf code-parser-docs-js-preview
[ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview
cd /home/ubuntu

- name: Build the site
run: |
cd /home/ubuntu
mkdir -p DCPDocJSPreview
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
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
cp -rfp ./code-parser-docs-js-preview/* ./DCPDocJSPreview/
cp -rfp ./Docs-Template-Repo-Preview/* ./DCPDocJSPreview/
sed -i -e "1,3s/blob\/master$/blob\/preview/" \
-e "1,3s/blob\/main$/blob\/preview/" /home/ubuntu/DCPDocJSPreview/_config.yml
cd DCPDocJSPreview && bundle install && bundle exec jekyll build
uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-testing.yml@preview
with:
doc-repo: code-parser-docs-js
doc-url: code-parser/docs/web
secrets: inherit

- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: ${{ secrets.FTP_TEST_SITE_SERVER }}
username: ${{ secrets.FTP_TEST_SITE_USER }}
password: ${{ secrets.FTP_TEST_SITE_PASSWORD }}
port: 7500
local-dir: /home/ubuntu/DCPDocJSPreview/_site/
server-dir: /www.dynamsoft.com/code-parser/docs/web/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

.DS_Store
/.vs
21 changes: 15 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ repositoryUrl: https://github.com/dynamsoft-docs/code-parser-docs-js/blob/main
repository: dynamsoft-docs/code-parser-docs-js
docFullPath: https://www.dynamsoft.com/code-parser/docs/web
firstLevelUrl: /code-parser/docs/web/
docRootName: "Code Parser JS Edition"
docHomePage: /code-parser/docs/core/introduction/

javascript: /code-parser/docs/web/programming/javascript/
javascript-api: /code-parser/docs/web/programming/javascript/api-reference/
javascript-api-enum: /code-parser/docs/web/programming/javascript/api-reference/enum/
javascript-api-interface: /code-parser/docs/web/programming/javascript/api-reference/interface/
javascript-release-notes: /code-parser/docs/web/programming/javascript/release-notes/
js: /code-parser/docs/web/programming/javascript/
dcp_js_api: /code-parser/docs/web/programming/javascript/api-reference/
dcp_enum: /code-parser/docs/web/programming/javascript/api-reference/enum/
js_release_notes: /code-parser/docs/web/programming/javascript/release-notes/
enums: /capture-vision/docs/core/enums/

dcv_enumerations: /capture-vision/docs/core/enums/

dcv_js_api: /capture-vision/docs/web/programming/javascript/api-reference/
dcv_introduction: /capture-vision/docs/core/introduction/

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

release-notes: /code-parser/docs/core/release-notes/
release_notes: /code-parser/docs/core/release-notes/
code_types: /code-parser/docs/core/code-types/

useVersionTree: true

Expand Down Expand Up @@ -51,5 +58,7 @@ defaults:
values:
sitemap: false

edition: js

url: "https://www.dynamsoft.com" # sitemap root

1 change: 1 addition & 0 deletions _data/full_tree.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tree_file_list:
- sidelist-full-tree.html
- sidelist-programming-javascript.html
- sidelist-programming-javascript-v1.1.0.html
13 changes: 11 additions & 2 deletions _data/product_version.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
version_info_list:
- latest version
useGroupedVersion: true

version_info_list_js:
- value: latest version
- value: 2.x
child:
- 2.0.20
- value: 1.x
child:
- 1.1.0
- 1.0.2
4 changes: 2 additions & 2 deletions _includes/dcpNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<li class="title"><a class="orangeLink" href="{{site.docHomePage}}">Dynamsoft Code Parser</a></li>
<li class="item overview">
<!---->
<a class="textUpperCase" href="{{site.release-notes}}">Release Notes</a>
<a class="textUpperCase" href="{{site.release_notes}}">Release Notes</a>
</li>
<li class="item overview">
<!---->
Expand All @@ -45,7 +45,7 @@
<div class="row">
<div class="col-xs-12">
<ul class="menuList">
<li class="item"><a href="{{site.release-notes}}">Release Notes</a></li>
<li class="item"><a href="{{site.release_notes}}">Release Notes</a></li>
<li class="item"><a href="{{site.firstLevelUrl}}">Documentation</a></li>
</ul>
</div>
Expand Down
113 changes: 113 additions & 0 deletions _includes/sidelist-programming-javascript-v1.1.0.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<li>
<a href="{{ site.js }}" class="otherLinkColour">Introduction</a>
</li>
<li class="category">DEVELOPMENT</li>
<li>
<a
style="cursor: pointer; color: #3c3c3c"
href="{{ site.js }}user-guide/index.html"
class="otherLinkColour"
>User Guide</a
>
</li>
<li>
<a
style="cursor: pointer; color: #3c3c3c"
href="{{ site.dcp_js_api }}"
class="otherLinkColour"
>API Reference</a
>
<ul>
<li>
<a href="{{ site.dcp_js_api }}CodeParser.html" class="otherLinkColour"
>CodeParser for code parsing</a
>
</li>
<li>
<a
href="{{ site.dcp_js_api }}LicenseControl.html"
class="otherLinkColour"
>License Control</a
>
</li>
<li>
<a
href="{{ site.dcp_js_api }}InitializeEngine.html"
class="otherLinkColour"
>Initialization Control</a
>
</li>
<li>
<a
href="{{ site.dcp_js_api }}interfacesindex.html"
class="otherLinkColour"
>Interfaces</a
>
<ul>
<li>
<a
href="{{ site.dcp_js_api }}interfacesBasicPersonalInfo.html"
class="otherLinkColour"
>BasicPersonalInfo</a
>
</li>
<li>
<a
href="{{ site.dcp_js_api }}interfacesCodeParserException.html"
class="otherLinkColour"
>CodeParserException</a
>
</li>
<li>
<a
href="{{ site.dcp_js_api }}interfacesParseResult.html"
class="otherLinkColour"
>ParseResult</a
>
</li>
</ul>
</li>
<li>
<a href="{{ site.dcp_enum }}index.html" class="otherLinkColour"
>Enums</a
>
<ul>
<li>
<a
href="{{ site.dcp_enum }}EnumCodeFormat.html"
class="otherLinkColour"
>EnumCodeFormat</a
>
</li>
<li>
<a
href="{{ site.dcp_enum }}EnumErrorCode.html"
class="otherLinkColour"
>EnumErrorCode</a
>
</li>
<li>
<a
href="{{ site.dcp_enum }}EnumResultInfoType.html"
class="otherLinkColour"
>EnumResultInfoType</a
>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="{{ site.js_release_notes }}" class="otherLinkColour"
>Release Notes</a
>
<ul>
<li>
<a
href="{{ site.js_release_notes }}js-2.html"
class="otherLinkColour"
>Version 1.x</a
>
</li>
</ul>
</li>
Loading