Skip to content

Commit 3b588c8

Browse files
Merge pull request #171 from dynamsoft-docs/JennyBranch
Jenny branch
2 parents e318f5c + 9e7b510 commit 3b588c8

File tree

7 files changed

+166
-53
lines changed

7 files changed

+166
-53
lines changed

.github/workflows/main.yml

Lines changed: 71 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,77 @@ jobs:
1818
# This workflow contains jobs called "Build-Master" and "Build-Preview"
1919
Build-Main:
2020
if: ${{ github.ref == 'refs/heads/master' }}
21-
uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-production.yml@main
22-
with:
23-
doc-repo: label-recognition-docs
24-
doc-url: label-recognition/docs/core
25-
secrets: inherit
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: Run a multi-line script
31+
run: |
32+
cd /home/ubuntu
33+
[ -d DLRDocCore ] && rm -rf DLRDocCore
34+
[ -d label-recognition-docs ] && rm -rf label-recognition-docs
35+
[ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview
36+
[ ! -d DLRDocCore ] && mkdir -p DLRDocCore
37+
git clone --depth 1 https://github.com/dynamsoft-docs/label-recognition-docs.git label-recognition-docs
38+
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
39+
cp -rfp ./label-recognition-docs/* ./DLRDocCore/
40+
cp -rfp ./Docs-Template-Repo-Preview/* ./DLRDocCore/
41+
cd DLRDocCore && bundle install && bundle exec jekyll build
42+
43+
- name: Sync files - Main Site
44+
uses: SamKirkland/FTP-Deploy-Action@4.3.0
45+
with:
46+
server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }}
47+
username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }}
48+
password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }}
49+
port: 21
50+
local-dir: /home/ubuntu/DLRDocCore/_site/
51+
server-dir: /www.dynamsoft.com/label-recognition/docs/core/
52+
53+
- name: Trigger Webhook
54+
run: |
55+
curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/label-recognition/docs/core/*\"]" ${{ secrets.WEBHOOK_URL }}
56+
2657
2758
Build-Preview:
2859
if: ${{ github.ref == 'refs/heads/preview' }}
29-
uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-testing.yml@preview
30-
with:
31-
doc-repo: label-recognition-docs
32-
doc-url: label-recognition/docs/core
33-
secrets: inherit
60+
# The type of runner that the job will run on
61+
runs-on: self-hosted
62+
63+
# Steps represent a sequence of tasks that will be executed as part of the job
64+
steps:
65+
# Runs a set of commands using the runners shell
66+
- name: clear space
67+
run: |
68+
cd /home/ubuntu
69+
[ -d DLRDocCorePreview ] && rm -rf DLRDocCorePreview
70+
[ -d label-recognition-docs-core-preview ] && rm -rf label-recognition-docs-core-preview
71+
[ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview
72+
cd /home/ubuntu
73+
74+
- name: Build the site
75+
run: |
76+
cd /home/ubuntu
77+
[ ! -d DLRDocCorePreview ] && mkdir -p DLRDocCorePreview
78+
git clone --depth 1 --branch preview https://github.com/Dynamsoft-Docs/label-recognition-docs.git label-recognition-docs-core-preview
79+
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
80+
cp -rfp ./label-recognition-docs-core-preview/* ./DLRDocCorePreview/
81+
cp -rfp ./Docs-Template-Repo-Preview/* ./DLRDocCorePreview/
82+
sed -i -e "1,3s/blob\/master$/blob\/preview/" \
83+
-e "1,3s/blob\/main$/blob\/preview/" /home/ubuntu/DLRDocCorePreview/_config.yml
84+
cd DLRDocCorePreview && bundle install && bundle exec jekyll build
85+
86+
- name: Sync files
87+
uses: SamKirkland/FTP-Deploy-Action@4.3.0
88+
with:
89+
server: ${{ secrets.FTP_TEST_SITE_SERVER }}
90+
username: ${{ secrets.FTP_TEST_SITE_USER }}
91+
password: ${{ secrets.FTP_TEST_SITE_PASSWORD }}
92+
port: 7500
93+
local-dir: /home/ubuntu/DLRDocCorePreview/_site/
94+
server-dir: /www.dynamsoft.com/label-recognition/docs/core/

_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ baseurl: "/label-recognition/docs/core"
6767
plugins:
6868
- jemoji
6969
- jekyll-sitemap
70+
- jekyll-webp
71+
- jekyll-relative-links
72+
- jekyll-redirect-from
73+
- jekyll-readme-index
74+
- jekyll-seo-tag
7075

7176

7277
defaults:

_includes/dlrNav.html

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
<style>
2-
3-
#cp-header .action-buttons { display: none; }
4-
#mdHeader { border-bottom: 0!important; }
5-
#sideBarCnt.sidebar-fixed { position: fixed; top: 88px; max-height: unset; }
6-
.rightSideMenu.rsm-fixed { position: fixed; top: 100px; }
7-
#docHead { top: 186px; }
8-
.productMenu .downloadBtn:hover { color: #ffffff!important; }
9-
.sideBar { padding-top: 77px; }
10-
@media (max-width: 1679px){
2+
#cp-header .action-buttons { display: none; }
3+
#mdHeader { border-bottom: 0!important; }
4+
#sideBarCnt.sidebar-fixed { position: fixed; top: 88px; max-height: unset; }
5+
.rightSideMenu.rsm-fixed { position: fixed; top: 100px; }
6+
#docHead { top: 151px; }
7+
.productMenu .downloadBtn:hover { color: #ffffff!important; }
8+
@media (max-width: 1679px){
119
#docHead {
12-
top: 145px;
10+
top: 145px;
1311
}
14-
}
12+
}
1513
</style>
1614

1715
<div id="LabelRecognizer" class="main">

_layouts/default-layout.html

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,14 @@
77
{%- assign noTitleIndex = "noTitleIndex" -%}
88
{%- endif -%}
99
<body>
10-
<div class="headWrapper">
11-
{%- include page_header.html -%}
12-
</div>
10+
{% assign url = 'https://www.dynamsoft.com/shared/head/' %}
11+
{% remote_include {{ url }} %}
12+
1313
{%- include dlrNav.html -%}
1414
<div class="sideBarIcon"><i class="fa fa-list" style="margin-right: 5px;"></i> Table of contents</div>
1515
<div class="container" id="categoryMenuTree">
1616
<div class="row">
17-
<div class="sideBar col-xs-12 col-md-3 hide-xs hide-sm">
18-
<div id="sideBarCnt">
19-
<div class="docSearchPart" style="margin-top: 30px;">
20-
<input id="txtSearch" class="search" type="text">
21-
</div>
22-
<div class="mainPage">
23-
<ul id="fullTreeMenuListContainer" name="listLevel1">
24-
</ul>
25-
</div>
26-
</div>
27-
</div>
28-
<div class="docContainer col-xs-12 col-md-9">
17+
<main class="docContainer col-xs-12 col-md-9">
2918
<div id="docHead" class="head row hide-xs hide-sm">
3019
{%- include main-page-head.html -%}
3120
</div>
@@ -59,7 +48,18 @@
5948
<div class="lds-ring"><div></div><div></div><div></div><div></div></div>
6049
</div>
6150
</div>
62-
</div>
51+
</main>
52+
<aside class="sideBar col-xs-12 col-md-3 hide-xs hide-sm">
53+
<div id="sideBarCnt">
54+
<div class="docSearchPart" style="margin-top: 30px;">
55+
<input id="txtSearch" class="search" type="text">
56+
</div>
57+
<nav class="mainPage">
58+
<ul id="fullTreeMenuListContainer" name="listLevel1">
59+
</ul>
60+
</nav>
61+
</div>
62+
</aside>
6363
</div>
6464
</div>
6565
<div class="history list" id="categoryMenuTree_history">
@@ -69,21 +69,14 @@
6969
</div>
7070
</div>
7171
</div>
72-
<div id="footerWrapper">
72+
<footer id="footerWrapper">
7373
{%- include page_footer.html -%}
74-
</div>
74+
</footer>
7575

7676
<iframe id="sideBarIframe" src="{{site.firstLevelUrl}}/Hide_Tree_Page.html" allow="" height="0" frameborder="0"></iframe>
7777
<script type="text/javascript">
7878
anchors.add();
79-
</script>
80-
81-
82-
<script type="text/javascript">
8379
UrlReplace();
84-
</script>
85-
86-
<script type="text/javascript">
8780
FullTreeMenuList('{{page.needAutoGenerateSidebar}}', '{{page.needGenerateH3Content}}', '{{page.pageStartVer}}', '{{site.useVersionTree}}');
8881
</script>
8982

_layouts/home-page.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
</style>
1818

1919
<body>
20-
<div class="headWrapper">
21-
{%- include page_header.html -%}
22-
</div>
20+
{% assign url = 'https://www.dynamsoft.com/shared/head/' %}
21+
{% remote_include {{ url }} %}
22+
2323
<div class="markdown-body homepageContainer container">
2424
<div class="row">
2525
<div class="col-xs-12 col-md-10 col-md-offset-1 col-xl-8 col-xl-offset-2">

_layouts/search-page.html

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@
108108
}
109109
</style>
110110
<body>
111-
<div class="headWrapper">
112-
{%- include page_header.html -%}
113-
</div>
111+
{% assign url = 'https://www.dynamsoft.com/shared/head/' %}
112+
{% remote_include {{ url }} %}
113+
114114
<div class="subHeadWrapper">
115115
<div id="DLRMenu" class="productMenu">
116116
<div class="container pcProductMenu">
@@ -306,6 +306,57 @@ <h1>Search</h1>
306306
}
307307
})
308308

309+
$("body").delegate("#searchResult .gsc-resultsRoot a.gs-title", "click", function(e) {
310+
e.preventDefault();
311+
312+
var link = $(this).eq(0).data("ctorig")
313+
if (link.indexOf("capture-vision/docs") > 0) {
314+
var repoType = getRepoType("core", link);
315+
if (link.indexOf("?") > 0) {
316+
var arr = link.split("?")
317+
if(arr[1].indexOf("#") > 0) {
318+
var subArr = arr[1].split("#")
319+
link = link +"?product=dlr&repoType="+ repoType +"&" + arr[1]
320+
} else {
321+
link = link + "&product=dlr&repoType=" + repoType
322+
}
323+
} else {
324+
link = link + "?product=dlr&repoType=" + repoType
325+
}
326+
}
327+
window.location.href = link
328+
});
329+
330+
function getRepoType(defaultValue, link) {
331+
var lang = getCurrentUrlLang(link, true)
332+
var repoType = defaultValue
333+
if (lang) {
334+
if (lang == 'android' || lang == 'objectivec-swift') {
335+
repoType = "mobile"
336+
} else if (lang == 'javascript') {
337+
repoType = "web"
338+
} else if (lang == 'cplusplus' || lang == 'c' || lang == 'java' || lang == 'dotnet') {
339+
repoType = "server"
340+
} else {
341+
repoType = "core"
342+
}
343+
} else {
344+
if(link.indexOf("/docs/server/") > 0) {
345+
repoType = "server"
346+
}
347+
if (link.indexOf("/docs/core/") > 0) {
348+
repoType = "core"
349+
}
350+
if (link.indexOf("/docs/mobile") > 0) {
351+
repoType = "mobile"
352+
}
353+
if (link.indexOf("/docs/web/") > 0) {
354+
repoType = "web"
355+
}
356+
}
357+
return repoType
358+
}
359+
309360
</script>
310361

311362
{%- include livehelp.html -%}

introduction/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ noTitleIndex: true
99

1010
# Overview of Dynamsoft Label Recognizer
1111

12-
Dynamsoft Label Recognizer (DLR) is an SDK designed to recognize meaningful zonal text or symbols in an image (or a 'Label' in this context). Some common scenarios where a component like DLR can prove handy include price tags in supermarkets, inventory labels in warehouses, VIN codes on car windshields, driver licenses, ID cards, and more.
12+
Dynamsoft Label Recognizer (DLR) is a data capture SDK designed to recognize meaningful zonal text or symbols in an image (or a 'Label' in this context). Some common scenarios where a component like DLR can prove handy include passport MRZ, ID cards, price tags in supermarkets, inventory labels in warehouses, VIN codes on car windshields, driver licenses, and more.
1313

1414
DLR powers your software development through the following aspects:
1515

@@ -21,6 +21,11 @@ DLR powers your software development through the following aspects:
2121

2222
With DLR, you can create customizable text detection and recognition software with enterprise-grade performance to meet your business needs.
2323

24+
Getting started with Dynamsoft Label Recognizer:
25+
- [JavaScript](https://www.dynamsoft.com/label-recognition/docs/web/programming/javascript/)
26+
- [Android](https://www.dynamsoft.com/label-recognition/docs/mobile/programming/android/) | [iOS](https://www.dynamsoft.com/label-recognition/docs/mobile/programming/objectivec-swift/)
27+
- [Java](https://www.dynamsoft.com/label-recognition/docs/server/programming/java/) | [.NET](https://www.dynamsoft.com/label-recognition/docs/server/programming/dotnet/) | [C++](https://www.dynamsoft.com/label-recognition/docs/server/programming/cplusplus/)
28+
2429
## Key Features
2530

2631
### Reference Region

0 commit comments

Comments
 (0)