Raneto Docs (open-source Knowledge Base building program), ranetodocs

Source: Internet
Author: User

Raneto Docs (open-source Knowledge Base building program), ranetodocs
1. raneto Docs: a Raneto is a Markdown-based open-source node. the js knowledge base platform uses the Markdown file to store the knowledge base. Raneto can also be called a "static website builder" because it does not need to store data in the database, all content is stored in Markdown (. md) file, which has the following features (Official introduction) a.1 simple we can use your favorite text editor to create and manage a complete knowledge platform. A.2 Flat Raneto is a "flat file" CMS, which means that the system has no database, no Mysql query, and nothing. A.3 Fast Raneto is lightweight and does not use databases, making access Fast. B Raneto Official Website: http://raneto.com/c learning documents: http://docs.raneto.com/d source code: https://github.com/gilbitron/Raneto e So to sum up, what is the purpose of Raneto? I personally think that its purpose is to build a knowledge base platform for the company or team to share (knowledge, norms (coding norms, operating norms), technology, and so on) with it, it can effectively reduce the communication time. Of course, it can also be used to develop personal website portals. There is no development volume at all, but the advantages and disadvantages are too obvious. Therefore, whether it is used is within your decision. F our team has used this thing a lot. Because of its simple deployment, it is not easy to write some internal tasks in the team on the company's Wiki (You know), so we have a lot of use, I hope you will enjoy it. 2. Preparations a. After a brief introduction above, we have learned what Raneto actually does. Then we need to build it in Linux and configure and use it. B we know from the above that Raneto is based on nodejs. Therefore, to run Raneto in Linux, We need to install nodejs first, and then install Raneto. C nodejs download package address: http://nodejs.cn/download/ d Raneto: https://github.com/gilbitron/Raneto/releases e operation required software and the system is as follows: Virtual Machine (Vmware), virtual machine installed in the Centos system, Xshell, Xftp, nodejs package, raneto package. 3. After Nodejs installation a passes the simple preparations above, we now have the package to be installed and the release environment. If not, please refer to the above article and download and prepare it yourself. B. Because Raneto is based on nodejs, we need to first install nodejs for linux. How can we install it? Continue to look down at c. Use XShell to connect to Centos. After the connection is successful, run the command to jump to the local directory to create your own folder kencery, and create the nodejs folder under this folder. The command is as follows: c.1 (1 ): cd usr/local/(2): mkdir kencery (3): cd kencery/(4): mkdir nodejs (5 ): cd nodejs/d and then use Xftp to copy the node. js package downloaded above to the node. js folder. E. decompress the uploaded node-v6.2.0-linux-x64.tar.gz package and name it node ,: e.1 tar-zxvf node-v6.2.0-linux-x64.tar.gz e.2 mv node-v6.2.0-linux-x64.tar.gz node f edit file add environment variable f.1 vim/etc/profile f.2 Add the following command at the end of the file and save it to make sure the ADD is correct: # (/usr/local/kencery/nodejs/node this PATH is the decompressed PATH of nodejs) export NODE_HOME =/usr/local/kencery/nodejs/node export PATH = $ PATH: $ NODE_HOME/bin export NODE_PATH = $ NODE_HOME/lib/node_modules f.3 enter the following command to bring the modified file into effect: sourc E/etc/profile g after all the above operations are completed, run the following command to view the nodejs version. if the version is displayed, the installation is successful. Otherwise, the installation fails, check the process g.1 after node-v4.Raneto installs a through the preparations in the preceding short answer, we already have the package to be installed and the release environment, and the nodejs is successfully installed, if you have not prepared enough, please prepare yourself. B. Use XShell to connect to Centos. After the connection is successful, run the command to jump to the local directory to create your own folder, and create the raneto folder under this folder. The command is as follows:
B .1 (1): cd usr/local/(2): mkdir kencery (3): cd kencery/(4): mkdir raneto (5): cd raneto/c kernel) copy to the raneto folder, and decompress the package, decompress the package named raneto,: c.1 tar-zxvf Raneto-0.9.0.tar.gz c.2 mv Raneto-0.9.0 raneto d decompress and jump to raneto to execute the installation command, the command is as follows: d.1 (1): cd raneto/(2): npm install (time is not average) (3): npm start e if the above command is not executed unexpectedly, at this time, it indicates that your raneto has been started. At this time, you can use http: // localhost: 3000 on the installed local machine to access it. However, if you want To access the service on your machine, open port 3000 to linux and restart the firewall. F after the installation is complete, use my local computer to access (http: // 192.168.37.20.: 3000/). However, when the loading is complete, our page is messy. I checked the monitoring system, I found a lib folder in it. Why not? (I can only say that I really don't know, but I suspect it is a wall, so I didn't download it when executing the command, but I think it should be included when I download it from the source code, but it does not. But it does not matter. Find the lib folder (themes/default/public/) and put it in the installation path. Page mess: f.1 lib file: http://pan.baidu.com/s/1pK81Gan g last restart Raneto (Ctrl + C close), use the command npm start (if you wantBackground running:nohup npm startThen you can turn off the command line. When you need to disable Raneto againps -fe | nodeAfter obtaining the PIDkill PID) Restart and access to the page becomes neat and regular. 5. the file structure after the Raneto configuration is complete. a after the Raneto installation is complete, before learning to use it, let's take a look at its file structure to give us a simple understanding, as shown below:
A.1. We do not need to know or configure most folders and files. We mainly know example and package. json. example is the page content in the default system, package. json is used to configure which folder to start as the system content. A.2 for other files, let's take a look at the configuration file of the app, the bin Installation File, node_modules as the package content (such as search engine) on which raneto depends, and themes is the topic information of the website. A.3 The configuration file should be simply mentioned here. This kind of things should be mainly applied in practice, so we began to configure our own content. 6. raneto configures the input path (http: // 192.168.37.htm: 3000/) for website data a. When the page is opened, it is found that the system has provided the page information about raneto by default, however, this is relatively less useful to us, and we need our own things. At this time, we need to configure our own. The original page and other information do not need to be moved. B First jumps to the unzipping path of raneto, creates the kencery folder, creates a new content directory in the kencery folder (as the name suggests, it is to put the content file), and then we will put the server under example. js, package. json, config. default. js is copied to the kencery directory, and after the final deployment is complete: After the configuration of c is complete, we return to the unzipping path of raneto and see that there is a package. json (not in kencery, but in the main directory). Open it and find the node scripts, as shown in the following figure, modify the content in the red box that I painted and the name of the folder we created, and then save it. D. Restart raneto and check that the new content is accessed. Here we have completed the configuration, but we have no internal page, at this time, we will add several pages to test according to the content structure under example, and you will understand how to set it. 7. raneto Online Editing/sorting/other a. After successfully configuring the website information for ourselves, enter the path to access and find that there is very little content, at this time, we need to write a large amount of website information to the system, but we found that online editing is not allowed on the pages we visit by default, at this time, if we still write data on the server, the operation will be slow. Therefore, Raneto contains the online editing option by default, but it is not enabled by default, we will enable it. A.1 first, open the self-created folder (kencery), modify the value of allow_editing In the config. default. js file to true, and then save it. A.2 restart raneto and open the page. after entering the page details page, you will find some smaller numbers + and Actions, and click the content to test it by yourself. As shown in B, we see three modules (homepage, permission management, and adding). What should we do if we want to sort permission management first? B .1 open the config. default. js file in kencery and we find that there is a property: page_sort_meta: 'sort '. B .2 then jumps to the permission management folder under the content, creates the sort file, writes 0 internally, saves B .3, restarts raneto, opens the homepage page, and finds that the sorting is completed. B .4 Note: If you can see that the content on the home page is still there, it is because the home page is the default in the system. If you do not want to sort it first, you can delete it and create a home page file, instead of putting it in the content folder. Structure: Note: You can take a closer look at the config. default. all the attributes in the js file have comments, which are easy to know. Please test them on your own and view the page changes. 8. raneto restricts that users can only log on to access information. a. According to the above steps, we have created many pages, but this is something inside the company. We do not want everyone to browse our knowledge base, we only want people from one of our teams to see it, so we need to configure login information for the website (of course, it is best to deploy it in the LAN and do not allow access from people outside the LAN ). B raneto currently does not support configuring multiple user names and passwords, that is, only one user name and password can be configured. C First, we find the config in kencery. default. the authentication and credentials attributes in the js configuration file, enable permissions, and enter your own username and password, d. go back to the installation path, enter layout.html in the themes/default/templatesdirectory of the master computer, open layout.html, and add {# config at the beginning of the body tab. authentication }{{# loggedIn} d.2 add (custom jump path) before the body Tag ends. c. after saving the preceding file, restart raneto and continue browsing the website. You are prompted to jump to the logon page. Enter the username and password you just set and click log on to go to the homepage.

Every day is a little progress

If any problem exists in the article, you are welcome to point it out and I will modify it as soon as possible.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.