Merge pull request #633 from lowdefy/docs

Update Docs
This commit is contained in:
Gervwyk 2021-06-14 14:22:32 +02:00 committed by GitHub
commit a09d7e44d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 70 additions and 3 deletions

20
packages/docs/body.html Normal file
View File

@ -0,0 +1,20 @@
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2.6.3/dist/cdn/docsearch.min.js"></script>
<script>
let time = 500;
function setDocsearh() {
try {
console.log('try', time);
docsearch({
apiKey: '4e88995ba28e39b8ed2bcfb6639379a1',
indexName: 'lowdefy',
inputSelector: '#docsearch_input',
debug: true,
});
} catch (err) {
console.log(err);
setTimeout(setDocsearh, time);
time = time * 2;
}
}
setDocsearh();
</script>

View File

@ -47,6 +47,8 @@ _ref:
# Set working directory and node user
WORKDIR /home/node/lowdefy
RUN chown node:node /home/node/lowdefy
USER node
# Copy app config, and change ownership of files to "node" user
@ -91,7 +93,7 @@ _ref:
### Step 3 - Create a serverless.yaml file
Create a file called `.serverless.yaml` in your project repository:
Create a file called `serverless.yaml` in your project repository:
```
service: lowdefy-example-aws-lambda

View File

@ -56,6 +56,8 @@ _ref:
# Set working directory and node user
WORKDIR /home/node/lowdefy
RUN chown node:node /home/node/lowdefy
USER node
# Copy app config, and change ownership of files to "node" user

View File

@ -1 +1,5 @@
<script type="module" src="/public/modules/index.js" ></script>
<script type="module" src="/public/modules/index.js"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/docsearch.js@2.6.3/dist/cdn/docsearch.min.css"
/>

View File

@ -28,6 +28,8 @@ app:
html:
appendHead:
_ref: head.html
appendBody:
_ref: body.html
connections:
- id: discord_channel

View File

@ -11,7 +11,32 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- id: search_box
type: Box
layout:
flex: 0 1 auto
align: middle
style:
marginRight: 8
blocks:
- id: docsearch
type: TextInput
layout:
flex: 0 1 auto
align: middle
properties:
label:
disabled: true
placeholder: Search
- id: docsearch_icon
type: Icon
layout:
flex: 0 1 auto
align: middle
style:
marginLeft: -22
properties:
name: SearchOutlined
- id: why_button
type: Button
visible:
@ -43,6 +68,9 @@
visible:
_not:
_or:
- _eq:
- _media: size
- md
- _eq:
- _media: size
- sm
@ -86,6 +114,15 @@
url: https://discord.gg/WmcJgXt
- id: github_button
type: Button
visible:
_not:
_or:
- _eq:
- _media: size
- sm
- _eq:
- _media: size
- xs
layout:
flex: 1 0 auto
properties: