Skip to content
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

feat: docurusaus改造 #1053

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .github/workflows/docusaurus-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
# container: pandoc/latex jj
steps:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 18.20.3
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- uses: darrenjennings/algolia-docsearch-action@master
with:
algolia_application_id: 'B0I4Q5CLN8'
algolia_api_key: '478d2fe7bdad5ff46b87f1e8e4662e81'
file: 'algolia-config.json'
- name: creates output
run: npm install && npm run build --config docs
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
with:
source-directory: 'docs/build'
destination-github-username: '15669072513'
destination-repository-name: 'mosn.github.io'
target-branch: master
target-directory: 'layotto'
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ None of these is essential for a pull request, but they will all help.
9. Make sure checks have been correctly passed, you can simply run `make check`
10. Contribute a Pull Request as the rule of Github Workflow, and you should follow the pull request's rules.

> Layotto provides many useful commands to help you contribute easier, please check it [here](docs/en/development/commands.md)
> Layotto provides many useful commands to help you contribute easier, please check it [here](docs/i18n/en-US/docusaurus-plugin-content-docs/current/development/commands.md)

## Version naming convention

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ Layotto enriches the <a href="https://landscape.cncf.io/serverless">CNCF CLOUD N
As a programming enthusiast , have you ever felt that you want to participate in the development of an open source project, but don't know where to start?
In order to help everyone better participate in open source projects, our community will regularly publish community tasks to help everyone learn by doing!

[Document Contribution Guide](docs/en/development/contributing-doc.md)
[Document Contribution Guide](docs/i18n/en-US/docusaurus-plugin-content-docs/current/development/contributing-doc.md)

[Component Development Guide](docs/en/development/developing-component.md)
[Component Development Guide](docs/i18n/en-US/docusaurus-plugin-content-docs/current/development/developing-component.md)

[Layotto Github Workflows](docs/en/development/github-workflows.md)
[Layotto Github Workflows](docs/i18n/en-US/docusaurus-plugin-content-docs/current/development/github-workflows.md)

[Layotto Commands Guide](docs/en/development/commands.md)
[Layotto Commands Guide](docs/i18n/en-US/docusaurus-plugin-content-docs/current/development/commands.md)

[Layotto Contributor Guide](docs/en/development/CONTRIBUTING.md)
[Layotto Contributor Guide](docs/i18n/en-US/docusaurus-plugin-content-docs/current/development/CONTRIBUTING.md)

## Contributors

Expand All @@ -157,17 +157,17 @@ Thank y'all!

## Design Documents

[Actuator Design Doc](docs/en/design/actuator/actuator-design-doc.md)
[Actuator Design Doc](docs/i18n/en-US/docusaurus-plugin-content-docs/current/design/actuator/actuator-design-doc.md)

[Configuration API with Apollo](docs/en/design/configuration/configuration-api-with-apollo.md)
[Configuration API with Apollo](docs/i18n/en-US/docusaurus-plugin-content-docs/current/design/configuration/configuration-api-with-apollo.md)

[Pubsub API and Compability with Dapr Component](docs/en/design/pubsub/pubsub-api-and-compability-with-dapr-component.md)
[Pubsub API and Compability with Dapr Component](docs/i18n/en-US/docusaurus-plugin-content-docs/current/design/pubsub/pubsub-api-and-compability-with-dapr-component.md)

[RPC Design Doc](docs/en/design/rpc/rpc-design-doc.md)
[RPC Design Doc](docs/i18n/en-US/docusaurus-plugin-content-docs/current/design/rpc/rpc-design-doc.md)

[Distributed Lock API Design](docs/en/design/lock/lock-api-design.md)
[Distributed Lock API Design](docs/i18n/en-US/docusaurus-plugin-content-docs/current/design/lock/lock-api-design.md)

[FaaS Design](docs/en/design/faas/faas-poc-design.md)
[FaaS Design](docs/i18n/en-US/docusaurus-plugin-content-docs/current/design/faas/faas-poc-design.md)

## FAQ

Expand Down
49 changes: 49 additions & 0 deletions algolia-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"index_name": "layotto",
"start_urls": [
"https://15669072513.github.io/layotto-docusaurus/-docusaurus//docs",
"https://15669072513.github.io/layotto-docusaurus/blog",
"https://15669072513.github.io/layotto-docusaurus/en-US/docs",
"https://15669072513.github.io/layotto-docusaurus/en-US/blog"
],
"stop_urls": [
"/tests"
],
"selectors": {
"lvl0": {
"selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]",
"type": "xpath",
"global": true,
"default_value": "Documentation"
},
"lvl1": "header h1",
"lvl2": "article h2",
"lvl3": "article h3",
"lvl4": "article h4",
"lvl5": "article h5, article td:first-child",
"lvl6": "article h6",
"text": "article p, article li, article td:last-child"
},
"strip_chars": " .,;:#",
"custom_settings": {
"separatorsToIndex": "_",
"attributesForFaceting": [
"language",
"version",
"type",
"docusaurus_tag"
],
"attributesToRetrieve": [
"hierarchy",
"content",
"anchor",
"url",
"url_without_anchor",
"type"
]
},
"conversation_id": [
"833762294"
],
"nb_hits": 46250
}
12 changes: 12 additions & 0 deletions crowdin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
project_id: 688617
# token local testing layotto token
api_token: 7305dcca805d8750a5d0983438bdc4bca9adff6bf35eff5a86dfdca9d85a1c273dd55e8b5362fe8d
#api_token_env: CROWDIN_VERDACCIO_API_KEY

preserve_hierarchy: true

files:
- source: /blog/**/*
translation: '/i18n/%locale%/docusaurus-plugin-content-blog/current/**/%original_file_name%'
- source: /docs/**/*
translation: '/i18n/%locale%/docusaurus-plugin-content-docs/current/**/%original_file_name%'
41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
146 changes: 0 additions & 146 deletions docs/SUMMARY.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/_navbar.md

This file was deleted.

Loading
Loading