forked from langchain-ai/langchainjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add initial documentation with typedoc (langchain-ai#16)
* fix: add initial documentation with typedoc * feat: add docusaurus (langchain-ai#17) * feat: add docusaurus * fix: update docs * Cleanup docs (langchain-ai#19) * Create Guides category, sort out sidebars * remove generated files * Set up ghpages deployment * Change deployment method * Temporarily make it run on any push * Fix api docs broken links, clean up the api docs output a bit * Revert "Temporarily make it run on any push" This reverts commit 423c156. --------- Co-authored-by: Nuno Campos <[email protected]> * Harrison/add getting started (langchain-ai#20) * fix: add initial documentation with typedoc * feat: add docusaurus * fix: update docs * Create Guides category, sort out sidebars * remove generated files * Set up ghpages deployment * Change deployment method * Temporarily make it run on any push * feat: add docusaurus (langchain-ai#17) * feat: add docusaurus * fix: update docs * Cleanup docs (langchain-ai#19) * Create Guides category, sort out sidebars * remove generated files * Set up ghpages deployment * Change deployment method * Temporarily make it run on any push * Fix api docs broken links, clean up the api docs output a bit * Revert "Temporarily make it run on any push" This reverts commit 423c156. --------- Co-authored-by: Nuno Campos <[email protected]> * cr * cr * cr * cr * cr * fix: remove max-len lint rule * cr --------- Co-authored-by: Sean Sullivan <[email protected]> Co-authored-by: Nuno Campos <[email protected]> Co-authored-by: Sean Sullivan <[email protected]> * cr --------- Co-authored-by: Nuno Campos <[email protected]> Co-authored-by: Harrison Chase <[email protected]>
- Loading branch information
1 parent
a716f90
commit f02042d
Showing
97 changed files
with
13,604 additions
and
2,481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# Review gh actions docs if you want to further define triggers, paths, etc | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Build website | ||
run: yarn workspace docs build | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: "./docs/build" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,7 @@ yarn-error.log | |
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
langchain/docs/ | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
*/ | ||
|
||
const OFF = 0; | ||
const WARNING = 1; | ||
const ERROR = 2; | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
jest: true, | ||
node: true, | ||
}, | ||
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
allowImportExportEverywhere: true, | ||
}, | ||
extends: ['airbnb', 'prettier'], | ||
plugins: ['react-hooks', 'header'], | ||
rules: { | ||
// Ignore certain webpack alias because it can't be resolved | ||
'import/no-unresolved': [ | ||
ERROR, | ||
{ignore: ['^@theme', '^@docusaurus', '^@generated']}, | ||
], | ||
'import/extensions': OFF, | ||
'header/header': [ | ||
ERROR, | ||
'block', | ||
|
||
[ | ||
'*', | ||
' * Copyright (c) Meta Platforms, Inc. and affiliates.', | ||
' *', | ||
' * This source code is licensed under the MIT license found in the', | ||
' * LICENSE file in the root directory of this source tree.', | ||
' *', | ||
// Unfortunately eslint-plugin-header doesn't support optional lines. | ||
// If you want to enforce your website JS files to have @flow or @format, | ||
// modify these lines accordingly. | ||
{ | ||
pattern: '.* @format', | ||
}, | ||
' ', | ||
], | ||
], | ||
'react/jsx-filename-extension': OFF, | ||
'react-hooks/rules-of-hooks': ERROR, | ||
'react/prop-types': OFF, // PropTypes aren't used much these days. | ||
'react/function-component-definition': [ | ||
WARNING, | ||
{ | ||
namedComponents: 'function-declaration', | ||
unnamedComponents: 'arrow-function', | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
docs/api | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# ESLint | ||
.eslintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
build | ||
.docusaurus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSameLine": true, | ||
"bracketSpacing": false, | ||
"printWidth": 80, | ||
"proseWrap": "never", | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
module.exports = { | ||
plugins: ['stylelint-copyright'], | ||
rules: { | ||
'docusaurus/copyright-header': true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](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. | ||
|
||
### Continuous Integration | ||
|
||
Some common defaults for linting/formatting have been set for you. If you integrate your project with an open source Continuous Integration system (e.g. Travis CI, CircleCI), you may check for issues using the following command. | ||
|
||
``` | ||
$ yarn ci | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
*/ | ||
|
||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
Oops, something went wrong.