Skip to content

Commit

Permalink
docs: Update Docs (#211)
Browse files Browse the repository at this point in the history
* update AList v3 Docs

* update ali-open

* del ali-open

* update site config docs

* add sso Casdoor Docs

* add faq Docs

* add faq-wht Docs

* add sso login Casdoor

* fix build error

* update vuepress-theme-hope version

* test update

* Update pnpm-lock.yaml

* adapt new version

* rename ads to ss

---------

Co-authored-by: Andy Hsu <[email protected]>
  • Loading branch information
anwen-anyi and xhofe authored May 5, 2023
1 parent e84cbef commit a2c449e
Show file tree
Hide file tree
Showing 39 changed files with 2,270 additions and 1,743 deletions.
2 changes: 1 addition & 1 deletion docs/.vuepress/components/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<span>🌈 {{ spStr }}</span>
<div class="mingdao">
<a href="https://www.mingdao.com?s=utm_51=utm_source=alist&utm_medium=banner&utm_campaign=%E5%93%81%E7%89%8C%E6%8E%A8%E5%B9%BF&utm_content=IT%E8%B5%8B%E8%83%BD%E4%B8%9A%E5%8A%A1"
target="_blank"><img src="/img/ads/mingdao-h.png" alt="" /></a>
target="_blank"><img src="/img/ss/mingdao-h.png" alt="" /></a>
</div>
</div>
<div class="hero-info-wrapper wwads-container">
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/components/NormalPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="mingdao" v-if="showMingdao">
<a href="https://www.mingdao.com?s=utm_51=utm_source=alist&utm_medium=banner&utm_campaign=%E5%93%81%E7%89%8C%E6%8E%A8%E5%B9%BF&utm_content=IT%E8%B5%8B%E8%83%BD%E4%B8%9A%E5%8A%A1"
target="_blank">
<img src="/img/ads/mingdao-h.png" alt="" />
<img src="/img/ss/mingdao-h.png" alt="" />
<span>{{ spStr }}</span>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="ss">
<div class="mingdao">
<a href="https://www.mingdao.com?s=utm_51=utm_source=alist&utm_medium=banner&utm_campaign=%E5%93%81%E7%89%8C%E6%8E%A8%E5%B9%BF&utm_content=IT%E8%B5%8B%E8%83%BD%E4%B8%9A%E5%8A%A1"
target="_blank"><img src="/img/ads/mingdao.png" alt="" /></a>
target="_blank"><img src="/img/ss/mingdao.png" alt="" /></a>
<span>{{ spStr }}</span>
</div>
</div>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/img/advanced/casdoor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/img/faq/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
204 changes: 107 additions & 97 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,124 +2,134 @@ import { hopeTheme } from "vuepress-theme-hope";
import * as navbar from "./navbar";
import * as sidebar from "./sidebar";

export default hopeTheme({
hostname: "https://alist.nn.ci",
themeColor: {
blue: "#2196f3",
red: "#f26d6d",
green: "#3eaf7c",
orange: "#fb9b5f",
},
export default hopeTheme(
{
hostname: "https://alist.nn.ci",
themeColor: {
blue: "#2196f3",
red: "#f26d6d",
green: "#3eaf7c",
orange: "#fb9b5f",
},

author: {
name: "Andy Hsu",
url: "https://i.nn.ci",
},
author: {
name: "Andy Hsu",
url: "https://i.nn.ci",
},

iconAssets: "iconfont",
iconAssets: "iconfont",

logo: "/logo.svg",
logo: "/logo.svg",

repo: "alist-org/docs",
repo: "alist-org/docs",

docsDir: "docs",
docsDir: "docs",

pageInfo: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"],
pageInfo: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"],

locales: {
"/": {
// navbar
navbar: navbar.en,
locales: {
"/": {
// navbar
navbar: navbar.en,

// sidebar
sidebar: sidebar.en,
// sidebar
sidebar: sidebar.en,

footer: `<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" /> </a>
footer: `<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" /> </a>
<script src="/adb.js" type="text/javascript"></script>
`,

displayFooter: true,
},
displayFooter: true,
},

/**
* Chinese locale config
*/
"/zh/": {
// navbar
navbar: navbar.zh,
/**
* Chinese locale config
*/
"/zh/": {
// navbar
navbar: navbar.zh,

// sidebar
sidebar: sidebar.zh,
// sidebar
sidebar: sidebar.zh,

footer: `<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" /> </a>
footer: `<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" /> </a>
<script src="/adb.js" type="text/javascript"></script>`,

displayFooter: true,
displayFooter: true,
},
},
},

// encrypt: {
// config: {
// "/guide/encrypt.html": ["1234"],
// "/zh/guide/encrypt.html": ["1234"],
// },
// },

plugins: {
autoCatalog: {
frontmatter: () => ({
toc: false,
}),
},
// blog: {
// autoExcerpt: true,
// encrypt: {
// config: {
// "/guide/encrypt.html": ["1234"],
// "/zh/guide/encrypt.html": ["1234"],
// },
// },

// If you don't need comment feature, you can remove following option
// The following config is for demo ONLY, if you need comment feature, please generate and use your own config, see comment plugin documentation for details.
// To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
comment: {
/**
* Using Giscus
*/
provider: "Giscus",
repo: "alist-org/docs",
repoId: "R_kgDOHmaM-A",
category: "Announcements",
categoryId: "DIC_kwDOHmaM-M4CRRXl",

/**
* Using Twikoo
*/
// provider: "Twikoo",
// envId: "https://twikoo.ccknbc.vercel.app",

/**
* Using Waline
*/
// provider: "Waline",
// serverURL: "https://vuepress-theme-hope-comment.vercel.app",
},

mdEnhance: {
// enableAll: true,
// presentation: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
plugins: {
autoCatalog: {
frontmatter: () => ({
toc: false,
}),
},
// blog: {
// autoExcerpt: true,
// },
container: true,
linkCheck: "dev",
tabs: true,
tasklist: true,
gfm: true,
flowchart: true,
mark: true,
mermaid: true,
sub: true,
sup: true,
align: true,
},
components: {
components: ["ArtPlayer", "BiliBili", "Badge"],

// If you don't need comment feature, you can remove following option
// The following config is for demo ONLY, if you need comment feature, please generate and use your own config, see comment plugin documentation for details.
// To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
comment: {
/**
* Using Giscus
*/
provider: "Giscus",
repo: "alist-org/docs",
repoId: "R_kgDOHmaM-A",
category: "Announcements",
categoryId: "DIC_kwDOHmaM-M4CRRXl",

/**
* Using Twikoo
*/
// provider: "Twikoo",
// envId: "https://twikoo.ccknbc.vercel.app",

/**
* Using Waline
*/
// provider: "Waline",
// serverURL: "https://vuepress-theme-hope-comment.vercel.app",
},

mdEnhance: {
// enableAll: true,
// presentation: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
// },
container: true,
checkLinks: {
status: "dev",
},
tabs: true,
tasklist: true,
gfm: true,
flowchart: true,
mark: true,
mermaid: true,
sub: true,
sup: true,
align: true,
},
components: {
components: ["ArtPlayer", "BiliBili", "Badge"],
},
},
},
});
{
check: true,
compact: true,
custom: true,
debug: false,
}
);
14 changes: 1 addition & 13 deletions docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ category:
- Config
---

## Catalog

- [Configuration file](configuration.md)

- [Site Settings](site.md)

- [Style Settings](style.md)

- [Preview Settings](preview.md)

- [Global Settings](global.md)

- [Other settings](other.md)
<AutoCatalog />
27 changes: 26 additions & 1 deletion docs/config/site.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,46 +22,71 @@ star: true

The version of the `alist`, readonly.



### Api url

> Deprecated in v3.0.2 and later, moved to [site_url](./configuration.md#site-url)
The address of your `alist`, such as `https://pan.nn.ci`.This address will be used in some places in the program, If you do not set this field, Some features may not work properly, such as:

Do not carry `/` at the end of the URL link, correct example:heavy_check_mark: :`https://pan.nn.ci`, wrong example: `https://pan.nn.ci/` :x:,Otherwise the following functions will not be available

- thumbnail of `LocalStorage`
- Preview after opening web proxy
- The download address after opening the web proxy
- Reverse proxy to sub directory
- ...



### Base path

> Deprecated in v3.0.2 and later, moved to [site_url](./configuration.md#site-url)
Default `/`, if you want reverse proxy with sub directory(see [reverse proxy with sub directory](../faq/howto.md#how-to-reverse-proxy-with-sub-directory) for details), such as `https://pan.nn.ci/alist`, you should set this field to `alist`, at the same time you need to set `Api url` to `https://pan.nn.ci/alist`.



### Site title

The title of the `alist`, such as `Alist`.



### Announcement

The announcement of the `alist`, such as `### Hello\nWelcome to use Alist`. We suggest you add a title in front of the content, such as `### Hello`, so that the content will not be covered by `Close Button`.

- If you don't want to display it, you can clear the contents of the announcement to not display it.



### Pagination type

- All: All files will be displayed at once.
- Pagination: Show a `Paginator` at the bottom of the page.
- Load more: Show a `Load more` button at the bottom of the page.
- Auto load more: Automatically load more files when scrolling to the bottom of the page.



### Default page size

The default page size of the `alist` if `Pagination type` doesn't set to `All`, such as `20`.



### allow indexing

Whether to allow others to mount your Alist to build the index, check it and enable it.
Whether to allow others to mount your AList to build the index, check it and enable it.

The default is off, use with caution. (New features in version 3.8.0)



## allow mounted

Do you allow others to mount your AList and then access it

**It is enabled by default, it is recommended to turn it off if you don’t want others to mount it** (v3.16.3 new feature)
10 changes: 10 additions & 0 deletions docs/config/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,33 @@ The logo is displayed in the upper left corner of the page. The default is the `

- You can set two different ones at night and during the day, one link per line



### Favicon

The favicon is displayed in the browser tab. The default is the `AList logo`.



### Main color

The main color is used to on the page. The default is `#1890ff`.



### Home icon

The home icon is displayed in the left of the navigation bar. The default is `🏠`.



### Home container

- Max 980px: the main width will set to `min(99%, 980px)`
- Hope container: sets the max-width of the content to match the min-width of the current breakpoint, refer to https://hope-ui.com/docs/layout/container .



## Set the layout

- Responsive: grids next to each other
Expand Down
6 changes: 1 addition & 5 deletions docs/faq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ category:
- FAQ
---

## Catalog

- [How to ...](howto.md)
- [Why ...](why.md)
- [See also ...](seealso.md)
<AutoCatalog />
Loading

0 comments on commit a2c449e

Please sign in to comment.