Linkding是什么Linkding 是一个开源的书签管理应用它以其简洁、高效和高度可定制性而著称。它允许用户快速添加、管理和检索书签同时提供了丰富的功能如自动元数据抓取、网站快照存档、批量编辑等以满足不同用户的需求。性能不错几万标签依然很流畅检索很灵活支标题、备注、网页正文检索支持高级语法日期、未读、标签过滤界面简洁美观支持书签和过滤器类似分类和文件夹支持网页图标和元数据自动获取Linkding安装部署1、创建本地存储路径方便数据持久化mkdir -p /opt/linkding /opt/linkding/data #进入数据存储目录 cd /opt/linkding2、Docker Compose方式创建应用1Docker Compose配置文件services: linkding: container_name: ${LD_CONTAINER_NAME} image: woohoodai/linkding-cn:latest ports: - ${LD_HOST_PORT:-9090}:9090 volumes: - ${LD_HOST_DATA_DIR:-./data}:/etc/linkding/data env_file: - .env restart: unless-stopped deploy: resources: limits: memory: 1024m # 限制为使用1GB内存2.env 配置文件.env 配置文件根据官网提供的例子进行修改.env文件放在/opt/linkding跟docker compose文件放在一起# Docker container name LD_CONTAINER_NAMElinkding-cn # Port on the host system that the application should be published on LD_HOST_PORT9090 # Directory on the host system that should be mounted as data dir into the Docker container LD_HOST_DATA_DIR./data ​ # Can be used to run linkding under a context path, for example: linkding/ # Must end with a slash / LD_CONTEXT_PATH # Username of the initial superuser to create, leave empty to not create one LD_SUPERUSER_NAMEadmin # Password for the initial superuser, leave empty to disable credentials authentication and rely on proxy authentication instead LD_SUPERUSER_PASSWORD123456 # Option to disable background tasks LD_DISABLE_BACKGROUND_TASKSFalse # Option to disable URL validation for bookmarks completely LD_DISABLE_URL_VALIDATIONFalse # Enables support for authentication proxies such as Authelia LD_ENABLE_AUTH_PROXYFalse # Name of the request header that the auth proxy passes to the application to identify the user # See docs/Options.md for more details LD_AUTH_PROXY_USERNAME_HEADER # The URL that linkding should redirect to after a logout, when using an auth proxy # See docs/Options.md for more details LD_AUTH_PROXY_LOGOUT_URL # List of trusted origins from which to accept POST requests # See docs/Options.md for more details LD_CSRF_TRUSTED_ORIGINS ​ # Database settings # These are currently only required for configuring PostreSQL. # By default, linkding uses SQLite for which you dont need to configure anything. ​ # Database engine, can be sqlite (default) or postgres LD_DB_ENGINEpostgres # Database name (default: linkding) LD_DB_DATABASElinkding # Username to connect to the database server (default: linkding) LD_DB_USERadmin # Password to connect to the database server LD_DB_PASSWORD123456 # The hostname where the database is hosted (default: localhost) LD_DB_HOST192.168.50.1 # Port use to connect to the database server # Should use the default port if not set LD_DB_PORT5433 # Any additional options to pass to the database (default: {}) LD_DB_OPTIONS参数说明主要修改数据库和容器设置部分其他可不修改1、数据库相关配置数据库支持postgres和sqlitepostgres性能使用postgres创建linkding# Database engine, can be sqlite (default) or postgres LD_DB_ENGINEpostgres # Database name (default: linkding) LD_DB_DATABASElinkding # Username to connect to the database server (default: linkding) LD_DB_USERadmin # Password to connect to the database server LD_DB_PASSWORD123456 # The hostname where the database is hosted (default: localhost) LD_DB_HOST192.168.50.1 # Port use to connect to the database server # Should use the default port if not set LD_DB_PORT5433 # Any additional options to pass to the database (default: {}) LD_DB_OPTIONS2、容器相关配置容器名、容器端口容器数据存储路径主目录下data# Docker container name LD_CONTAINER_NAMElinkding-cn # Port on the host system that the application should be published on LD_HOST_PORT9090 # Directory on the host system that should be mounted as data dir into the Docker container LD_HOST_DATA_DIR./data配置管理员LD_SUPERUSER_NAMEadmin # Password for the initial superuser, leave empty to disable credentials authentication and rely on proxy authentication instead LD_SUPERUSER_PASSWORD123456 # Option to disable background tasks3、Docker 命令启动docker run --name ${LD_CONTAINER_NAME} -p ${LD_HOST_PORT:-9090}:9090 -v ${LD_HOST_DATA_DIR:-./data}:/etc/linkding/data -e $(cat .env) --restart unless-stopped -m 1024m --rm woohoodai/linkding-cn:latest.env文件参考2-Docker ComposeLinkding使用智能1、添加书签点击右上角新增按钮新增一个书签光标默认聚焦在URL一般我们只要填入网页地址URL、标签即可标题、地址描述、图标可以自动获取笔记支持Markdown语法2、设置过滤器类似文件夹或标签集合的概念将统一类别的标签、搜索词聚集到一起1通过过滤器附近的标签点击管理过滤器2新增过滤器可根据搜索词、标签必选标签、排除标签等多个条件组合比如搜索词排除标签多个标签生活娱乐类过滤器为例我们可以将电视、电影、音乐、视频、听歌、听书、K歌、跳舞放到一起作为一个过滤器