Giter Site home page Giter Site logo

siyuan-note / siyuan Goto Github PK

View Code? Open in Web Editor NEW
15.9K 107.0 1.2K 246.77 MB

A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang.

Home Page: https://b3log.org/siyuan

License: GNU Affero General Public License v3.0

Dockerfile 0.02% JavaScript 9.66% HTML 1.46% CSS 0.22% NSIS 0.04% TypeScript 57.09% SCSS 2.90% Smarty 0.12% Batchfile 0.02% Shell 0.04% Go 28.39% Python 0.06%
note-taking pkm local-first knowledge-base markdown s3 ocr chatgpt openai notion

siyuan's Introduction

SiYuan
Refactor your thinking






Twitter Follow

SiYuan - A privacy-first personal knowledge management software | Product Hunt

中文

💡 Introduction

SiYuan is a privacy-first personal knowledge management system, support fine-grained block-level reference and Markdown WYSIWYG.

Welcome to SiYuan English Discussion Forum to learn more.

feature0.png

feature51.png

🔮 Features

Most features are free, even for commercial use.

  • Content block
    • Block-level reference and two-way links
    • Custom attributes
    • SQL query embed
    • Protocol siyuan://
  • Editor
    • Block-style
    • Markdown WYSIWYG
    • List outline
    • Block zoom-in
    • Million-word large document editing
    • Mathematical formulas, charts, flowcharts, Gantt charts, timing charts, staffs, etc.
    • Web clipping
    • PDF Annotation link
  • Export
    • Block ref and embed
    • Standard Markdown with assets
    • PDF, Word and HTML
    • Copy to WeChat MP, Zhihu and Yuque
  • Database
    • Table view
  • Flashcard spaced repetition
  • AI writing and Q/A chat via OpenAI API
  • Tesseract OCR
  • Multi-tab, drag and drop to split screen
  • Template snippet
  • JavaScript/CSS snippet
  • Android/iOS App
  • Docker deployment
  • API
  • Community marketplace

Some features are only available to paid members, for more details please refer to Pricing.

🏗️ Architecture design and open source ecosystem

SiYuan Arch

Project Description Forks Stars
lute Editor engine GitHub forks GitHub Repo stars
chrome Chrome/Edge extension GitHub forks GitHub Repo stars
bazaar Community marketplace GitHub forks GitHub Repo stars
dejavu Data repo GitHub forks GitHub Repo stars
petal Plugin API GitHub forks GitHub Repo stars
android Android App GitHub forks GitHub Repo stars
ios iOS App GitHub forks GitHub Repo stars
riff Spaced repetition GitHub forks GitHub Repo stars

🌟 Star History

Star History Chart

🗺️ Roadmap

🚀 Download Setup

It is recommended to give priority to installing through the application market on the desktop and mobile, so that you can upgrade the version with one click in the future.

App Market

Mobile:

Desktop:

Docker Hosting

Docker Deployment

Overview

The easiest way to serve SiYuan on a server is to deploy it through Docker.

File structure

The overall program is located under /opt/siyuan/, which is basically the structure under the resources folder of the Electron installation package:

  • appearance: icon, theme, languages
  • guide: user guide document
  • stage: interface and static resources
  • kernel: kernel program

Entrypoint

The entry point is set when building the Docker image: ENTRYPOINT ["/opt/siyuan/kernel" ], use docker run b3log/siyuan with parameters to start:

  • --workspace: Specifies the workspace folder path, mounted to the container via -v on the host
  • --accessAuthCode: Specifies the access authorization code

More parameters can refer to --help. The following is an example of a startup command:

docker run -d -v workspace_dir_host:workspace_dir_container -p 6806:6806 b3log/siyuan --workspace=workspace_dir_container --accessAuthCode=xxx
  • workspace_dir_host: The workspace folder path on the host
  • workspace_dir_container: The path of the workspace folder in the container, which is the same as specified in --workspace
  • accessAuthCode: Access authorization code, please be sure to modify, otherwise anyone can read and write your data

To simplify, it is recommended to configure the workspace folder path to be consistent on the host and container, such as: workspace_dir_host and workspace_dir_container are configured as /siyuan/workspace, the corresponding startup commands is:

docker run -d -v /siyuan/workspace:/siyuan/workspace -p 6806:6806 -u 1000:1000 b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=xxx

Alternatively, see below for an example Docker Compose file:

version: "3.9"
services:
  main:
    image: b3log/siyuan
    command: ['--workspace=/siyuan/workspace/', '--accessAuthCode=${AuthCode}']
    user: '1000:1000'
    ports:
      - 6806:6806
    volumes:
      - /siyuan/workspace:/siyuan/workspace
    restart: unless-stopped
    environment:
      # A list of time zone identifiers can be found at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      - TZ=${TimeZone}

User permissions

In the image, the normal user siyuan (uid 1000/gid 1000) created by default is used to start the kernel process. Therefore, when the host creates a workspace folder, please pay attention to setting the user group of the folder: chown -R 1000:1000 /siyuan/workspace. The parameter -u 1000:1000 is required when starting the container.

Hidden port

Use NGINX reverse proxy to hide port 6806, please note:

  • Configure WebSocket reverse proxy /ws

Note

  • Be sure to confirm the correctness of the mounted volume, otherwise the data will be lost after the container is deleted
  • Do not use URL rewriting for redirection, otherwise there may be problems with authentication, it is recommended to configure a reverse proxy

Limitations

  • Does not support desktop and mobile application connections, only supports use on browsers
  • Export to PDF, HTML and Word formats is not supported
  • Import Markdown file is not supported

Installation Package

Insider Preview

We release insider preview before major updates, please visit https://github.com/siyuan-note/insider.

🏘️ Community

🛠️ Development Guide

See Development Guide.

❓ FAQ

How does SiYuan store data?

The data is saved in the workspace folder, in the workspace data folder:

  • assets is used to save all inserted assets
  • emojis is used to save emoji images
  • snippets is used to save code snippets
  • storage is used to save query conditions, layouts and flashcards, etc.
  • templates is used to save template snippets
  • widgets is used to save widgets
  • plugins is used to save plugins
  • public is used to save public data
  • The rest of the folders are the notebook folders created by the user, files with the suffix of .sy in the notebook folder are used to save the document data, and the data format is JSON

Does it support data synchronization through a third-party sync disk?

Data synchronization through third-party synchronization disks is not supported, otherwise data may be corrupted.

Although it does not support third-party sync disks, it supports connect with third-party cloud storage (Member's privileges).

In addition, you can also consider manually exporting and importing data to achieve data synchronization:

  • Desktop: Settings - Export - Export Data / Import Data
  • Mobile: Right column - About - Export Data / Import Data

Is SiYuan open source?

SiYuan is completely open source, and contributions are welcome:

For more details, please refer to Development Guide.

How to upgrade to a new version?

  • If installed via app store, please update via app store
  • If it is installed through the installation package on the desktop, you can open the option of Settings - About - Automatically download update installation package, so that SiYuan will automatically download The latest version of the installation package and prompts to install
  • If it is installed by manual installation package, please download the installation package again to install

You can Check update in Settings - About - Current Version, or pay attention to Official Download or GitHub Releases to get the new version.

Is there any note for deleting docs?

After deletion, the doc will not appear in the operating system's recycle bin, but will be deleted directly. When deleted, SiYuan will generate data history.

How can I just wrap and not start a new paragraph?

Please use Shift+Enter.

What if some blocks (such as paragraph blocks in list items) cannot find the block icon?

The first sub-block under the list item is the block icon omitted. You can move the cursor into this block and trigger its block menu with Ctrl+/ .

How to share notes?

  • Share document to Liandi
  • Export and import .sy.zip package
  • Via network hosting
  • Export and import Markdown
  • Export Preview to copy to third-party online services

What should I do if the data repo key is lost?

  • If the data repo key is correctly initialized on multiple devices before, the key is the same on all devices and can be set in Settings - About - Data repo key - Copy key string retrieve

  • If it has not been configured correctly before (for example, the keys on multiple devices are inconsistent) or all devices are unavailable and the key string cannot be obtained, you can reset the key by following the steps below:

    1. Manually back up the data, you can use Export Data or directly copy the workspace/data/ folder on the file system
    2. Settings - About - Data rep key - Reset data repo
    3. Reinitialize the data repo key. After initializing the key on one device, other devices import the key
    4. The cloud uses the new synchronization directory, the old synchronization directory is no longer available and can be deleted
    5. The existing cloud snapshots are no longer available and can be deleted

Do I need to pay for it?

Most features are free, even for commercial use.

Member's privileges can only be used after payment, please refer to Pricing.

🙏 Acknowledgement

The birth of SiYuan is inseparable from many open source projects and contributors, please refer to the project source code kernel/go.mod, app/package.json and project homepage.

The growth of SiYuan is inseparable from user feedback and promotion, thank you for everyone's help to SiYuan ❤️

Contributors

Welcome to join us and contribute code to SiYuan together.

siyuan's People

Contributors

88250 avatar a15355447898a avatar acoez avatar cijiugechu avatar dantefromhell avatar dase1353 avatar debbbbie avatar dependabot[bot] avatar eulores avatar fsy0718 avatar iamqiz avatar java4candy avatar kecrily avatar lindalinya avatar meteor199 avatar mingpepe avatar nekrondev avatar pinghe avatar reverier-xu avatar sinemark2020 avatar soltus avatar ssfdust avatar tcotc avatar terwer avatar tinkmingking avatar vanessa219 avatar yb6b avatar zsxsoft avatar zuoqiu-yingyi avatar zxhd863943427 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

siyuan's Issues

图片功能的改进建议

1、提供选项:粘贴图片,拉取本地图片,拉取互联网图片,全部存入笔记本。
2、图片大小可以修改。

建议书签和大纲的快捷键调换一下

1,按快捷键alt+1出现文件树
2,按alt+2出现书签
3,再按alt+2书签关闭,顶端出现文件树字样,但实际显示的是大纲内容。此处可以反复复现。
4,若没有第一步,书签只显示打开关闭状态
5,是否可以按alt+1出现文件树,再按出现大纲?或者alt+2改成大纲,alt+3为书签,文件树和大纲似乎逻辑上更贴近一些,这样是否更好呢?

建议实现闭环的文件管理功能

文件管理目前还缺乏几个方面:
1、文件/文件夹的移动。参考第二条。。。
2、文件的复制、粘贴。因为复制粘贴不可重复,不可换根文件夹,建议不要用普通的复制粘贴功能,直接用移动至...,复制至...。直接限制移动操作只能在根目录内的文件夹、子文件夹进行。并在说明文档种详细列明,移动、复制对引用产生的潜在影响。如:"移动文件并不会对引用产生影响。复制后,若删除原文档,则会使原引用失效。"并在删除一个文档的时候,自动扫描文档是否存在引用关系,给出提示”此文档存在被引用关系,若删除所有引用将会失效,是否确认删除?“
3、软删除建议增加回收站。但是因为不同根目录删除文件文件夹不同,回收站要么就一个根目录一个,要么就要提示一下目录。
4、文件夹管理存在bug,如果我删除一个A文件夹,产生A.deleted,此时我新建A文件夹,再删除,会报错。无法删除,建议有一个功能,比如把A.deleted直接改名?文件没测试,不知道是否会有类似问题。
通过实现闭环的文件、文件夹管理,减少从资源管理器进入的问题。

支持表格编辑

插入表格,目前只看到三行三列的样式,不清楚如何增减行列数

目前是通过快捷键操作表格,应该支持可视化编辑,类似 Typora 那样。

内容块动态查询嵌入

需求

卡片编写和完善的时候,需要对同类块进行收集、整理。建议加入宏命令,支持模糊或者精确查询并显示所有符合条件的块,把它们内容依次显示出来,比如

list (("学习经验"))

在页面中显示所有标题为 “学习经验”的块内容

list(("*学习经验"))
在页面中显示所有结束标题为 “学习经验”的块内容

这样对卡片整理、知识汇总非常方便了。

实现

  • 引入查询块!{{ SQL }} ,查询块是叶子块
  • 使用 SQL 子集做 DSL

示例:

查询并嵌入所有内容中包含“待办”文本的块:

!{{ SELECT * FROM blocks WHERE content LIKE '%待办%' }}

渲染:

!((id1))

!((id2))

not working at Mac

Version 0.1.6 mac version

  1. rm -rf .siyuan
  2. open Siyuan app
  3. select open local notebook
  4. editing markdown

Screen Shot 2020-09-10 at 10 52 25 PM

  1. close all doc.
  2. select Connect to WebDav
  3. I can't remember the old password but it worked at liandi 1.1.3
  4. Can not connect webdav.
  5. close Siyuan app
  6. open Siyuan app
  7. Toggle the Developer Tools, I got the below errors

vditor1

内嵌内容块预览问题

以用户指南为例:
修改快速上手的标题级别,让其在内容块的大标题下面
编辑模式下能看到完整信息
image

而预览模式下内容块信息被截取,展示如下
image

怀疑与有序列表块有关系,测试发现预览时从第一个有序列表块块引用快开始展示

内容块嵌入编辑

什么时候可以支持 block embed ?也就是可以编辑嵌入的block,同步到原block,而不仅仅是预览block ref的内容。
直接可以编辑嵌入的block,更方便,不然要跳转打开多窗口页面,还要鼠标放在上面去预览。有点麻烦。

搜索功能

我在搜索时, 搜索列表内有内容,搜索输入框无内容或者 有内容, 我输入法键盘未关闭,点击enter都会自动打开选中的第一条结果
微信截图_20200921180721

文件树拖拽和排序

0.19

  1. 目前还没有找到更改文件位置(文件夹)的方法,只能在资源管理器里更改后重启软件.
  2. 目前文件树似乎是按创建时间排序的, 希望能增加选项按照A-Z方式排序.

LaTeX 语法缺陷之equation环境和\label{}

对于公式块中的内容,存在一些error渲染不出来的现象。

  1. 不支持equation环境
$$
\begin{equation}
\begin{aligned}
	I_n-I_{n+1}&=\frac{dQ_{n+1}}{dt}\\
	V_n-V_{n+1}&=\frac{d\Phi _{Jn}}{dt}
\end{aligned}
\end{equation}
$$

image

删除掉\begin{equation}和\end{equation}之后公式渲染成功,说明不支持的是equation环境

期待结果

image


  1. 公式块中的\label{}带来error,可能是由于不支持自动标号导致的
$$
\frac{\partial ^2\Phi}{\partial t^2}-\frac{\partial}{\partial x}\left[ v^2\left( x,t \right) \frac{\partial \Phi}{\partial x} \right] =0
\label{bodsfhig1}
$$

image

期待结果

  • 正常渲染
    image
  • 后续可以对该公式进行引用
    image

其他信息

  • 操作系统:win10

assets 资源文件展现

可否让其显示存在的图片呢?像obsidian那样。
或者干脆不显示,我倾向第一种。

【关系图】在小比例下查看节点时文字闪动

image
鼠标放到某个节点时,相关笔记会显示文字,但文字显示出来后,文字层好像在节点层上方,所以鼠标失去了焦点,文字就会隐藏,节点又变成了鼠标hover状态,文字又显示出来……如此循环,文字就闪动起来了。

webdav

image
这个webdav 中的笔记关闭后能不能提供保存啊,
现在 我点击关闭后,它就没了;
预期效果 :
类似于x-shell gui面板一样,我再次点击这个文件夹会自动链接到webdav,如果我没点记住密码则需要 正确输入密码后才能打开链滴笔记;

快捷键

  • ctrl+n 新建文件
  • ctrl + w 关闭当前标签页
  • ctrl + shift + ] 选择下一个标签页
  • ctrl + shift + [ 选择上一个标签页
  • Alt + 1 打开文件树

生成静态站点

单独启一个开源项目来做,让有在线发布静态站点需求的用户就可以通过这个工具来导出静态站点,自己部署 GitHub Pages 或者 Gitee Pages 之类的平台伺服。

【bug】待办事项 格式错乱

  1. 待办事项格式错乱。比如我手动输入如下内容:
  • 待办事项

显示效果会变成:
image

只有写"待办事项",然后选中这些文字,再点击顶上的待办图标,才能正常显示。

  1. 待办事项跟无序列表组合使用的时候格式错乱。如果我手动输入以下代码:
  • 待办事项1
  • 待办事项2
    • 待办事项2-1
    • 待办事项2-2

显示效果会变成:
image

  1. 运行环境:
    win10 64

关于块引用符号问题

内容块嵌入符号(( 似乎和其他的笔记皆不同,不知道是有特殊的原因还是什么,这在其他笔记迁移到思源笔记的过程中,所有的原先的引用链接全部不能启用,造成很大的迁移成本。不知有何种方式解决?

而且((输入会麻烦很多,一是要按住shift再加9键。二是很多符号输入设置是自动补全的,这就增加了更多的步骤,又不能连按否则就变成了(9).

如果和其他笔记通用[[]],会有什么影响吗?谢谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.