Skip to content

Commit b7f372e

Browse files
Merge pull request #1 from dynamsoft-docs/preview
for v2.0
2 parents 9ad6946 + fcba81e commit b7f372e

28 files changed

+1556
-6
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: CI
55
# Controls when the workflow will run
66
on:
77
# Triggers the workflow on push events but only for the main branch
8-
push:
9-
branches:
10-
# - main
8+
push:
9+
branches:
10+
- main
1111
- preview
1212

1313
# Allows you to run this workflow manually from the Actions tab
@@ -52,8 +52,8 @@ jobs:
5252
username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }}
5353
password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }}
5454
port: 21
55-
local-dir: /home/ubuntu/DDNDocServer/_site/
56-
server-dir: /www.dynamsoft.com/code-parser/docs/js/
55+
local-dir: /home/ubuntu/DCPDocJS/_site/
56+
server-dir: /www.dynamsoft.com/code-parser/docs/web/
5757

5858
Build-Preview:
5959
if: ${{ github.ref == 'refs/heads/preview' }}
@@ -91,4 +91,4 @@ jobs:
9191
password: ${{ secrets.FTP_TEST_SITE_PASSWORD }}
9292
port: 7500
9393
local-dir: /home/ubuntu/DCPDocJSPreview/_site/
94-
server-dir: /www.dynamsoft.com/code-parser/docs/js/
94+
server-dir: /www.dynamsoft.com/code-parser/docs/web/

_config.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
repositoryUrl: https://github.com/dynamsoft-docs/code-parser-docs-js/blob/main
2+
repository: dynamsoft-docs/code-parser-docs-js
3+
docFullPath: https://www.dynamsoft.com/code-parser/docs/web
4+
firstLevelUrl: /code-parser/docs/web/
5+
docHomePage: /code-parser/docs/core/introduction/
6+
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/
12+
13+
assets: /code-parser/docs/web/assets/
14+
edit_icon: /code-parser/docs/web/assets/img-icon/edit-icon.png
15+
smile_icon: /code-parser/docs/web/assets/img-icon/icon-smile.png
16+
sad_icon: /code-parser/docs/web/assets/img-icon/icon-sad.png
17+
dbr_icon: /code-parser/docs/web/assets/img-icon/icon-dbr.svg
18+
dwt_icon: /code-parser/docs/web/assets/img-icon/icon-dwt.svg
19+
dnt_icon: /code-parser/docs/web/assets/img-icon/icon-dnt.svg
20+
21+
release-notes: /code-parser/docs/core/release-notes/
22+
23+
useVersionTree: true
24+
25+
baseurl: "/code-parser/docs/web"
26+
plugins:
27+
- jemoji
28+
29+
defaults:
30+
- scope:
31+
path: ""
32+
values:
33+
layout: "default-layout"
34+
noTitleIndex: true
35+
needAutoGenerateSidebar: true
36+
needGenerateH3Content: true
37+
- scope:
38+
path: "programming/javascript"
39+
values:
40+
docRootName: "Code Parser JS Edition"
41+
docHomePage: "/code-parser/docs/web/programming/javascript/"
42+
- scope:
43+
path: "Hide_Tree_Page.html"
44+
values:
45+
sitemap: false
46+
47+
url: "https://www.dynamsoft.com" # sitemap root
48+

_data/full_tree.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tree_file_list:
2+
- sidelist-full-tree.html
3+
- sidelist-programming-javascript.html

_data/product_version.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
version_info_list:
2+
- latest version

_includes/dcpNav.html

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<style>
2+
#cp-header .action-buttons {
3+
display: none;
4+
}
5+
6+
#mdHeader {
7+
border-bottom: 0!important;
8+
}
9+
10+
#sideBarCnt.sidebar-fixed {
11+
position: fixed;
12+
top: 88px;
13+
max-height: unset;
14+
}
15+
16+
.rightSideMenu.rsm-fixed {
17+
position: fixed;
18+
top: 100px;
19+
}
20+
21+
#docHead {
22+
top: 186px;
23+
}
24+
25+
.productMenu .downloadBtn:hover {
26+
color: #ffffff!important;
27+
}
28+
29+
@media (max-width: 1679px) {
30+
#docHead {
31+
top: 145px;
32+
}
33+
}
34+
</style>
35+
36+
<div id="CodeParser" class="main">
37+
<div id="CodeParserMenu" class="productMenu">
38+
<div class="container pcProductMenu">
39+
<div class="row">
40+
<div class="col-xs-12">
41+
<ul class="menuList">
42+
<!---->
43+
<li class="title"><a class="orangeLink" href="{{site.docHomePage}}">Dynamsoft Code Parser</a></li>
44+
<li class="item overview">
45+
<!---->
46+
<a class="textUpperCase" href="{{site.release-notes}}">Release Notes</a>
47+
</li>
48+
<li class="item overview">
49+
<!---->
50+
<a class="textUpperCase" href="{{site.docHomePage}}">Documentation</a>
51+
</li>
52+
</ul>
53+
</div>
54+
</div>
55+
</div>
56+
<div class="container mobileProductMenu">
57+
<div class="row">
58+
<div class="col-xs-12">
59+
<div class="productLogo" style="color:#fe8e14!important;font:10px">Dynamsoft Code Parser <i class="icon-orange-angle"></i></div>
60+
<div id="dcpCurrentPage" class="fontOswald fr currentPage">Resource Base</div>
61+
</div>
62+
</div>
63+
</div>
64+
<div class="mobileProductDetailMenu">
65+
<div class="container">
66+
<div class="row">
67+
<div class="col-xs-12">
68+
<ul class="menuList">
69+
<li class="item"><a href="{{site.release-notes}}">Release Notes</a></li>
70+
<li class="item"><a href="{{site.firstLevelUrl}}">Documentation</a></li>
71+
</ul>
72+
</div>
73+
</div>
74+
</div>
75+
</div>
76+
</div>
77+
</div>

_includes/sidelist-full-tree.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-programming-javascript.html" -%}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<li class="category">DEVELOPMENT</li>
2+
<li><a style="cursor:pointer;color:#3c3c3c" href="{{ site.javascript }}user-guide.html" class="otherLinkColour">User Guide</a>
3+
</li>
4+
<li><a style="cursor:pointer;color:#3c3c3c" class="otherLinkColour">API Reference</a>
5+
<ul>
6+
<li><a href="{{ site.javascript-api }}CodeParser.html" class="otherLinkColour">CodeParser for code parsing</a></li>
7+
<li><a href="{{ site.javascript-api }}LicenseControl.html" class="otherLinkColour">License Control</a></li>
8+
<li><a href="{{ site.javascript-api }}InitializeEngine.html" class="otherLinkColour">Initialization Control</a></li>
9+
<li><a href="{{ site.javascript-api-interface }}index.html" class="otherLinkColour">Interfaces</a>
10+
<ul>
11+
<li><a href="{{ site.javascript-api-interface }}BasicPersonalInfo.html" class="otherLinkColour">BasicPersonalInfo</a></li>
12+
<li><a href="{{ site.javascript-api-interface }}CodeParserException.html" class="otherLinkColour">CodeParserException</a></li>
13+
<li><a href="{{ site.javascript-api-interface }}ParseResult.html" class="otherLinkColour">ParseResult</a></li>
14+
</ul>
15+
</li>
16+
<li><a href="{{ site.javascript-api-enum }}index.html" class="otherLinkColour">Enums</a>
17+
<ul>
18+
<li><a href="{{ site.javascript-api-enum }}EnumCodeFormat.html" class="otherLinkColour">EnumCodeFormat</a></li>
19+
<li><a href="{{ site.javascript-api-enum }}EnumErrorCode.html" class="otherLinkColour">EnumErrorCode</a></li>
20+
<li><a href="{{ site.javascript-api-enum }}EnumResultInfoType.html" class="otherLinkColour">EnumResultInfoType</a></li>
21+
</ul>
22+
</li>
23+
</ul>
24+
</li>
25+
<li ><a href="{{ site.javascript-release-notes }}" class="otherLinkColour">Release Notes</a>
26+
<ul >
27+
<li ><a href="{{ site.javascript-release-notes }}js-2.html" class="otherLinkColour">Version 1.x</a></li>
28+
</ul>
29+
</li>
30+

_layouts/default-layout.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
4+
{%- include head.html -%}
5+
6+
<body class="dlrDoc">
7+
<div class="headWrapper">
8+
{%- include page_header.html -%}
9+
</div>
10+
{%- include dcpNav.html -%}
11+
<div class="sideBarIcon"><i class="fa fa-list" style="margin-right: 5px;"></i> Table of contents</div>
12+
<div class="container" id="categoryMenuTree">
13+
<div class="row">
14+
<div class="sideBar col-xs-12 col-md-3 hide-xs hide-sm">
15+
<div id="sideBarCnt">
16+
<div class="docSearchPart" style="margin-top: 30px;">
17+
<input id="txtSearch" class="search" type="text">
18+
</div>
19+
<div class="mainPage">
20+
<ul id="fullTreeMenuListContainer" name="listLevel1">
21+
</ul>
22+
</div>
23+
</div>
24+
</div>
25+
<div class="docContainer col-xs-12 col-md-9">
26+
<div id="docHead" class = "head row hide-xs hide-sm">
27+
{%- include main-page-head.html -%}
28+
</div>
29+
<div class="main row showRightSideMenu" id="articleContent" data-needh3="{{page.needGenerateH3Content}}">
30+
<div class="content markdown-body headCounter {{noTitleIndex}} col-xs-12 col-md-12 col-lg-9 col-xl-10 showRightSideMenu" style="margin-bottom: 20px;">
31+
{{ content }}
32+
</div>
33+
<div class="rightSideMenu col-xs-12 col-md-12 col-lg-3 col-xl-2 hide-md hide-sm hide-xs showRightSideMenu">
34+
<div id="compatibleInfo">
35+
<p>This page is compatible for:</p>
36+
<p class="compatibleCurVersion">Version 1.0</p>
37+
</div>
38+
<div id="feedbackFooter" style="color: #306877;">
39+
<p class="fontOswald">Is this page helpful? </p>
40+
<a href="javascript:void(0)" style="color: #306877;" class="recordLink smileLink" onclick="UsefulRecord(true)"><img class="icon-smile" src="{{ site.smile_icon }}" alt="Yes" />Yes</a>
41+
<a href="javascript:void(0)" style="color: #306877;" class="recordLink sadLink" onclick="UsefulRecord(false)"><img class="icon-sad" src="{{ site.sad_icon }}" alt="No" />No</a>
42+
</div>
43+
<hr />
44+
{%- if page.needAutoGenerateSidebar -%}
45+
<p class="fontOswald" style="color: #306877;"> In this article: </p>
46+
<div id="AutoGenerateSidebar"></div>
47+
{%- endif -%}
48+
</div>
49+
</div>
50+
<div class="main row" style="display: none; background: #f5f5f5;" id="loadingContent">
51+
<div class="loading" id="loadingLogin">
52+
<div class="lds-ring"><div></div><div></div><div></div><div></div></div>
53+
</div>
54+
</div>
55+
</div>
56+
</div>
57+
</div>
58+
<div class="history list" id="categoryMenuTree_history">
59+
<div class="container">
60+
<div class="col-xs-12">
61+
{%- include liquid_autoGenerateHistoryList.html -%}
62+
{%- include auto-version-list.html -%}
63+
</div>
64+
</div>
65+
</div>
66+
<div id="footerWrapper">
67+
{%- include page_footer.html -%}
68+
</div>
69+
70+
<iframe id="sideBarIframe" src="{{ site.firstLevelUrl }}/Hide_Tree_Page.html" allow="" height="0" frameborder="0"></iframe>
71+
72+
<script type="text/javascript">
73+
anchors.add();
74+
</script>
75+
76+
<script type="text/javascript">
77+
UrlReplace();
78+
</script>
79+
80+
<script type="text/javascript">
81+
FullTreeMenuList('{{ page.needAutoGenerateSidebar }}', '{{ page.needGenerateH3Content }}', '{{ page.pageStartVer }}', '{{ site.useVersionTree }}');
82+
</script>
83+
84+
{%- include livehelp.html -%}
85+
86+
<script type="text/javascript">
87+
$('#txtSearch').keydown(function(e) {
88+
if (e.keyCode == 13) {
89+
window.location.href = '/code-parser/search.html?q=' + $('#txtSearch').val()
90+
}
91+
})
92+
</script>
93+
94+
<!-- Google Tag Manager -->
95+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-538F83"
96+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
97+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
98+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
99+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
100+
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
101+
})(window,document,'script','dataLayer','GTM-538F83');</script>
102+
<!-- End Google Tag Manager -->
103+
104+
</body>
105+
106+
</html>

_layouts/home-page.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
4+
{%- include head.html -%}
5+
6+
<style>
7+
.markdown-body .editLinkColour { color: #323234; vertical-align: middle; height: 24px; line-height: 24px; display: inline-block; }
8+
.markdown-body .editLinkColour:hover { color: #616167; }
9+
.homepageContainer {
10+
min-height: calc(100vh - 165px);
11+
}
12+
@media (max-width: 767px) {
13+
.homepageContainer {
14+
min-height: calc(100vh - 144px);
15+
}
16+
}
17+
</style>
18+
19+
<body>
20+
<div class="headWrapper">
21+
{%- include page_header.html -%}
22+
</div>
23+
<div class="markdown-body homepageContainer container">
24+
<div class="row">
25+
<div class="col-xs-12 col-md-10 col-md-offset-1 col-xl-8 col-xl-offset-2">
26+
<!-- <p class="pull-right">
27+
{% capture sourceCodeUrl %}
28+
{% if page.url contains '.html' %}
29+
{{ page.url | strip | replace: '.html', '.md'}}
30+
{% else %}
31+
{{ page.url | strip }}index.md
32+
{% endif %}
33+
{% endcapture %}
34+
<a href="{{ site.repositoryUrl }}{{ sourceCodeUrl | strip }}" class="editLinkColour">Edit<img src="{{ site.edit_icon }}" width="20px" height="15px" style="vertical-align: middle; margin-left: 5px; margin-top: -3px;" /></a>
35+
</p> -->
36+
{{ content }}
37+
</div>
38+
</div>
39+
</div>
40+
<div id="footerWrapper">
41+
{%- include page_footer.html -%}
42+
</div>
43+
44+
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js"
45+
integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
46+
<script>anchors.add();</script>
47+
48+
</body>
49+
50+
</html>

0 commit comments

Comments
 (0)