From 6f6d1512f54707cdc4da808e76b1035eac0ce2c6 Mon Sep 17 00:00:00 2001 From: okxlin Date: Sat, 13 Apr 2024 00:28:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0raneto=E5=88=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/raneto/README.md | 51 +++++++ apps/raneto/data.yml | 19 +++ apps/raneto/latest/.env.sample | 2 + apps/raneto/latest/data.yml | 10 ++ apps/raneto/latest/data/config/config.js | 170 +++++++++++++++++++++++ apps/raneto/latest/docker-compose.yml | 19 +++ apps/raneto/logo.png | Bin 0 -> 5755 bytes 7 files changed, 271 insertions(+) create mode 100644 apps/raneto/README.md create mode 100644 apps/raneto/data.yml create mode 100644 apps/raneto/latest/.env.sample create mode 100644 apps/raneto/latest/data.yml create mode 100644 apps/raneto/latest/data/config/config.js create mode 100644 apps/raneto/latest/docker-compose.yml create mode 100644 apps/raneto/logo.png diff --git a/apps/raneto/README.md b/apps/raneto/README.md new file mode 100644 index 00000000..8624062f --- /dev/null +++ b/apps/raneto/README.md @@ -0,0 +1,51 @@ +## 账号密码 +> 默认账户1 +- 账号:admin +- 密码:password + +> 默认账户2 +- 账号:admin2 +- 密码:password + +## MD文档 + +需要展示的 `Markdown` 文档,需要放置在应用数据目录下的 `/data/content/pages` 文件夹下。 + +在此文件夹下新建文件夹,则就是网页上的新建分类。 + +## 配置文件 + +> `Raneto` 的配置文件为 `config.js`,在应用数据目录下的 `/data/config` 目录下,编辑`config.js`文件修改设置。 + + +## 注意 + +编辑 `config.js` 文件修改设置。 + +- 站点名称 + +```shel +site_title: 'Raneto Docs', +``` + +- 用户名和密码 +```shell + credentials: [ + { + username: 'admin', + password: 'password', + }, + { + username: 'admin2', + password: 'password', + }, + ], + ``` + +- 支持中文语言 +```shell +locale: 'zh', + + // Support search with extra languages + searchExtraLanguages: ['zh'], +``` \ No newline at end of file diff --git a/apps/raneto/data.yml b/apps/raneto/data.yml new file mode 100644 index 00000000..4c3f4e55 --- /dev/null +++ b/apps/raneto/data.yml @@ -0,0 +1,19 @@ +name: Raneto +tags: + - 实用工具 +title: 一个免费、开放、简单的 Markdown 支持的 Node.js 知识库 +description: 一个免费、开放、简单的 Markdown 支持的 Node.js 知识库 +additionalProperties: + key: raneto + name: Raneto + tags: + - Tool + shortDescZh: 一个免费、开放、简单的 Markdown 支持的 Node.js 知识库 + shortDescEn: A free, open, and simple Markdown supported Node.js knowledge base + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://raneto.com + github: https://github.com/ryanlelek/Raneto + document: https://docs.raneto.com diff --git a/apps/raneto/latest/.env.sample b/apps/raneto/latest/.env.sample new file mode 100644 index 00000000..1a967b01 --- /dev/null +++ b/apps/raneto/latest/.env.sample @@ -0,0 +1,2 @@ +CONTAINER_NAME="raneto" +PANEL_APP_PORT_HTTP="40216" diff --git a/apps/raneto/latest/data.yml b/apps/raneto/latest/data.yml new file mode 100644 index 00000000..2c83b163 --- /dev/null +++ b/apps/raneto/latest/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 40216 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number diff --git a/apps/raneto/latest/data/config/config.js b/apps/raneto/latest/data/config/config.js new file mode 100644 index 00000000..6a931b38 --- /dev/null +++ b/apps/raneto/latest/data/config/config.js @@ -0,0 +1,170 @@ +// Modules +var path = require('path'); + +// Which Theme to Use? +// +// Local Directory Example (for development or custom themes) +// var theme_dir = path.join(__dirname, 'themes'); +// var theme_name = 'my-theme-directory'; +// +// Themes from NPM +// use "dist" as the theme name for modules (for now) +var theme_dir = path.join( + __dirname, + '..', + 'node_modules', + '@raneto/theme-default' +); +var theme_name = 'dist'; + +var config = { + // Your site title (format: page_title - site_title) + site_title: 'Raneto Docs', + + // The base URL of your site (can use %base_url% in Markdown files) + // This should be the full path to your Raneto installation: + // example 1: https://raneto.mydomain.com + // example 2: https://www.mydomain.com/raneto + // Do not include a trailing "/" + // Leave this as an empty string to use the default + base_url: '', + nowrap: true, + + // Path Prefix + // If you are running Raneto on a subpath of your domain, add it here + // Leave it blank if you are not sure + // + // Example: if you are running Raneto at http://www.mydomain.com/raneto + // then you would enter '/raneto' below + path_prefix: '', + + // Used for the "Get in touch" page footer link + support_email: '', + + // Footer Text / Copyright + copyright: `Copyright © ${new Date().getFullYear()} - Powered by Raneto`, + + // Excerpt length (used in search) + excerpt_length: 400, + + // The meta value by which to sort pages (value should be an integer) + // If this option is blank pages will be sorted alphabetically + page_sort_meta: 'sort', + + // Should categories be sorted numerically (true) or alphabetically (false) + // If true category folders need to contain a "sort" file with an integer value + category_sort: true, + + // Controls behavior of home page if meta ShowOnHome is not present. If set to true + // all categories or files that do not specify ShowOnHome meta property will be shown + show_on_home_default: true, + + // Theme (see top of file) + theme_dir, + theme_name, + + // Specify the path of your content folder where all your '.md' files are located + // Fix: Cannot be an absolute path + content_dir: path.join(__dirname, '..', 'content', 'pages'), + + // Where is the public directory or document root? + public_dir: path.join(theme_dir, theme_name, 'public'), + + // The base URL of your images folder, + // Relative to config.public_dir + // (can use %image_url% in Markdown files) + image_url: '/images', + + // Add your analytics tracking code (including script tags) + analytics: '', + + // Set to true to enable the web editor + allow_editing: true, + + // Set to true to enable HTTP Basic Authentication + authentication: true, + + // If editing is enabled, set this to true to only authenticate for editing, not for viewing + authentication_for_edit: true, + + // If authentication is enabled, set this to true to enable authentication for reading too + authentication_for_read: false, + + // Google OAuth + googleoauth: false, + google_group_restriction: { + enabled: false, + api_key: 'GOOGLE_API_KEY', + group_name: 'GOOGLE_GROUP_NAME', + }, + oauth2: { + client_id: 'GOOGLE_CLIENT_ID', + client_secret: 'GOOGLE_CLIENT_SECRET', + callback: 'http://localhost:3000/auth/google/callback', + hostedDomain: 'google.com', + }, + secret: 'someCoolSecretRightHere', + + // ##### WARNING ##### + // You MUST change the username and password for security + // Do NOT use "admin" as a username as it's easily guessed. + // You are encouraged to use tools to generate a password + // Preferably, use a local password manager + // If you absolutely must use an online tool, here are some suggestions + // https://bitwarden.com/password-generator/ + // https://www.grc.com/passwords.htm + credentials: [ + { + username: 'admin', + password: 'password', + }, + { + username: 'admin2', + password: 'password', + }, + ], + + locale: 'zh', + + // Support search with extra languages + searchExtraLanguages: ['zh'], + + // Sets the format for datetime's + datetime_format: 'Do MMM YYYY', + + // Set to true to render suitable layout for RTL languages + rtl_layout: false, + + // Edit Home Page title, description, etc. + home_meta: { + // title : 'Custom Home Title', + // description : 'Custom Home Description' + }, + + // variables: [ + // { + // name: 'test_variable', + // content: 'test variable' + // }, + // { + // name: 'test_variable_2', + // content: 'test variable 2' + // } + // ] + + // Set to true to enable generation of table of contents + table_of_contents: false, + + // Configure generation of table of contents (see markdown-toc's docs for details on available options) + table_of_contents_options: { + // append: 'Table of contents appendix', + // maxdepth: 6, + // firsth1: true, + }, + + menu_on_pages: true, + menu_on_page_collapsible: true, +}; + +// Exports +module.exports = config; \ No newline at end of file diff --git a/apps/raneto/latest/docker-compose.yml b/apps/raneto/latest/docker-compose.yml new file mode 100644 index 00000000..26c96c11 --- /dev/null +++ b/apps/raneto/latest/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3.6' +services: + raneto: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:3000" + volumes: + - "./data/config:/opt/raneto/config" + - "./data/content/pages:/opt/raneto/content/pages" + image: raneto/raneto:latest + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/raneto/logo.png b/apps/raneto/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..4cfb97aa131859f3d6f527fa04a7abf621bdd192 GIT binary patch literal 5755 zcmV->7KG`EP)z=P+neMUteEKY-(R$UteEeUtL{fVq#rcSYuOEU|d{ZVq#uhU0+>Y3ADCeUS42e zU}9ooTUuIRU|?KbU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