Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
feat(LAND-528-3): replaced search to anorther free search (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-Mancurov authored Nov 30, 2023
1 parent 2fdc8e5 commit 30452e0
Show file tree
Hide file tree
Showing 8 changed files with 4,796 additions and 6,800 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.17.0'
node-version: '16.17.1'

- name: Install yarn
run: npm install --global yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.17.0'
node-version: '16.17.1'

- name: Install yarn
run: npm install --global yarn
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ $ GIT_USER=<Your GitHub username> USE_SSH=true 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.

### Info about development
You can see `warning` in time `yarn install` - it's okey

File `docs\limit-order-protocol\smart-contract\_category_.json` changed after `yarn install`. Discard changes in this file before execute some other commands

Search doesn't work in `yarn start`.
For check working of the search you need:
- `yarn build`
- `yarn serve`

If you got some error check that you does all in accordiance with README.
After that remove `yarn.lock` (`package-lock.json`), `node_modules` and `build` (if there is one). And try again.
Also check node.js version. All correct worked with node version 16.17.1

## Domains
- Trading (Aggregation Protocol) (https://docs.1inch.io/api/)
Expand Down
2 changes: 1 addition & 1 deletion docs/limit-order-protocol/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import {SwaggerDoc} from '../../src/components/swagger-doc/SwaggerDoc';
<TabItem value="zksync" label="ZkSync">
<SwaggerDoc url="Https://limit-orders.1inch.io/swagger/zksync-json" />
</TabItem>
<TabItem value="zksync" label="ZkSync-era">
<TabItem value="zksync-era" label="ZkSync-era">
<SwaggerDoc url="Https://limit-orders.1inch.io/swagger/era-json" />
</TabItem>
<TabItem value="base" label="Base">
Expand Down
33 changes: 19 additions & 14 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: '1inch Network',
tagline: 'The 1inch Network unites decentralized protocols whose synergy enables the most lucrative, fastest and protected operations in the DeFi space.',
tagline:
'The 1inch Network unites decentralized protocols whose synergy enables the most lucrative, fastest and protected operations in the DeFi space.',
url: 'https://docs.1inch.io',
baseUrl: '/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon/favicon.ico',
organizationName: '1inch', // Usually your GitHub org/user name.
projectName: '1inch-docs', // Usually your repo name.
themes: ['docusaurus-theme-search-typesense'],
plugins: [
[
require.resolve('docusaurus-plugin-search-local'),
{ indexPages: true, highlightSearchTermsOnTargetPage: true, searchResultLimits: 10 },
],
],
presets: [
[
'@docusaurus/preset-classic',
Expand All @@ -29,8 +35,7 @@ const config = {
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/1inch/1inch-docs/edit/master/',
editUrl: 'https://github.com/1inch/1inch-docs/edit/master/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
Expand Down Expand Up @@ -59,26 +64,26 @@ const config = {
},
{
label: 'Fusion Swap',
href: '/docs/fusion-swap/introduction/'
href: '/docs/fusion-swap/introduction/',
},
{
label: 'Limit Order Protocol',
href: '/docs/limit-order-protocol/introduction/'
href: '/docs/limit-order-protocol/introduction/',
},
{
label: 'Spot Price Aggregator',
href: '/docs/spot-price-aggregator/introduction/'
href: '/docs/spot-price-aggregator/introduction/',
},
{
label: 'RabbitHole',
href: '/docs/rabbithole/summary/'
}
]
href: '/docs/rabbithole/summary/',
},
],
},
{
label: 'Fusion',
position: 'left',
href: '/docs/fusion-swap/introduction/'
href: '/docs/fusion-swap/introduction/',
},
{
label: 'Governance',
Expand Down Expand Up @@ -106,17 +111,17 @@ const config = {
label: 'Cumulative merkle drop',
href: 'https://github.com/1inch/merkle-distribution',
},
]
],
},
{
label: 'Grants Program',
position: 'right',
href: 'https://1inch.io/foundation-grant-program/'
href: 'https://1inch.io/foundation-grant-program/',
},
{
label: 'Bug bounty',
position: 'right',
href: 'https://airtable.com/shrddQOOkm3hOLuzd'
href: 'https://airtable.com/shrddQOOkm3hOLuzd',
},
{
href: 'https://www.npmjs.com/search?q=%401inch',
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
"copy:lo-smartcontract-docs": "git submodule update --remote --merge && rimraf docs/limit-order-protocol/smart-contract/* && cp -R git-submodules/limit-order-protocol/docgen/docs/* docs/limit-order-protocol/smart-contract/ && touch docs/limit-order-protocol/smart-contract/_category_.json && echo '{\"label\": \"Smart contracts\",\"position\": 4}' > docs/limit-order-protocol/smart-contract/_category_.json"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.6",
"@docusaurus/preset-classic": "2.0.0-beta.6",
"@docusaurus/theme-search-algolia": "^2.0.0-beta.9",
"@docusaurus/core": "2.1.0",
"@docusaurus/preset-classic": "2.1.0",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"buffer": "^6.0.3",
"clsx": "^1.1.1",
"docusaurus-theme-search-typesense": "^0.1.0",
"docusaurus-plugin-search-local": "1.0.1",
"file-loader": "^6.2.0",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
Expand Down
12 changes: 12 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ html[data-theme='dark'] .swagger-ui .model-toggle:after {
}
/* swagger END */

/* Changed search styles */
.searchResultsSection_nuUe {
max-height: 100% !important;
}

/* Adaptive START */
@media (max-width: 1440px) {
.navbar__link {
Expand Down Expand Up @@ -491,4 +496,11 @@ html[data-theme='dark'] .swagger-ui .model-toggle:after {
padding: 16px;
}
}

@media (max-width: 450px) {
.searchModalContainer_E1mc {
min-width: auto;
width: 100%
}
}
/* Adaptive END */
Loading

0 comments on commit 30452e0

Please sign in to comment.