From eee06b92d7fd4e6accd53122361de7a94b73adc3 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Fri, 26 May 2023 12:50:50 +0300 Subject: [PATCH] docs: revise and improve the documentation --- docs/configuration.md | 14 ++++++++++-- docs/faq.md | 4 ++-- docs/installation.md | 53 ++++++++++++++++++++++++++++++++++++------- docs/introduction.md | 2 +- docs/theming.md | 43 ++++++++++++++++++++++++++++++++++- 5 files changed, 102 insertions(+), 14 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index be0325a..bb10ba6 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,15 @@ # Configuration -Everything in websurfx can be configured through the config file located at `websurfx/config.lua`. +## Installed From Source + +If you have built `websurfx` from source then the configuration file will be located under project directory (codebase) at `websurfx/` + +> **Note** +> If you have built websurfx with unstable/rolling/edge branch then you can copy the configuration file from `websurfx/config.lua` located under project directory (codebase) to `~/.config/websurfx/` and make the changes there and rerun the websurfx server. _This is only available from unstable/rolling/edge version_. + +## Installed From Package + +If you have installed `websurfx` using the package manager of your Linux distro then the default configuration file will be located at `/etc/xdg/websurfx/`. You can copy the default config to `~/.config/websurfx/` and make the changes there and rerun the websurfx server. Some of the configuration options provided in the file are stated below. These are subdivided into three categories: @@ -12,6 +21,7 @@ Some of the configuration options provided in the file are stated below. These a - **port:** Port number on which server should be launched. - **binding_ip_addr:** IP address on the which server should be launched. +- **production_use:** Whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users). If production_use is set to true. There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests. This is newly added option and hence is only available in the **edge version**. ## Website @@ -39,4 +49,4 @@ Some of the configuration options provided in the file are stated below. These a - **redis_connection_url:** Redis connection url address on which the client should connect on. -[⬅️ Go back to Home](https://github.com/neon-mmd/websurfx/wiki). +[⬅️ Go back to Home](./README.md) diff --git a/docs/faq.md b/docs/faq.md index 1805487..cbd3582 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -2,7 +2,7 @@ ## Why Websurfx? -The main goal of the Websurfx project is to provide a fast, secure, and privacy-focused [meta search engine](https://en.wikipedia.org/wiki/Metasearch_engine). While there are many meta search engines available, they do not always guarantee the security of their search engine, which is essential for ensuring privacy. For example, memory vulnerabilities can leak private or sensitive information, which is never good. Websurfx is written in Rust, which guarantees memory safety and eliminates such problems. Many meta search engines also lack key features such as advanced image search, which is required by many graphic designers, content creators, and others. Websurfx aims to provide these features and others, such as proper NSFW blocking, to improve the user experience. +The primary purpose of the Websurfx project is to create a fast, secure, and privacy-focused [meta-search engine](https://en.wikipedia.org/wiki/Metasearch_engine). While there are numerous meta-search engines available, not all of them guarantee the security of their search engine, which is critical for maintaining privacy. Memory flaws, for example, can expose private or sensitive information, which is never a good thing. Also, there is the added problem of Spam, ads, and unorganic results which most engines don't have the full-proof answer to it till now but with Websurfx I finally put a full stop to this problem, also, Rust is used to write Websurfx, which ensures memory safety and removes such issues. Many meta-search engines also lack important features like advanced picture search, which is required by many graphic designers, content providers, and others. Websurfx attempts to improve the user experience by providing these and other features, such as proper NSFW blocking and Micro-apps or Quick results (like providing a calculator, currency exchanges, etc in the search results). ## Why AGPLv3? @@ -12,4 +12,4 @@ Websurfx is released under the AGPLv3 license to ensure that the source code rem Rust was chosen as the programming language for Websurfx due to its memory safety features, which can help prevent vulnerabilities and make the codebase more secure. Rust is also faster than C++, which helps to make Websurfx fast and responsive. In addition, Rust's ownership and borrowing system allows for safe concurrency and thread safety in the codebase. -[⬅️ Go back to Home](https://github.com/neon-mmd/websurfx/wiki). +[⬅️ Go back to Home](./README.md) diff --git a/docs/installation.md b/docs/installation.md index c9aa6f1..050be70 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,16 +1,47 @@ -# Stable +# Install From Package -To get started with Websurfx, clone the repository, edit the config file which is located in the `websurfx` directory and install redis server by following the instructions located [here](https://redis.io/docs/getting-started/) and then run the websurfx server and redis server using the following commands: +## Arch Linux + +You can install `Websurfx` through the [Aur](https://aur.archlinux.org/packages/websurfx-git), Currently we only support `Rolling/Edge` version. You can install the rolling/edge version by running the following command (using [paru](https://github.com/Morganamilo/paru)): + +```bash +paru -S websurfx-edge-git +``` + +After installing it you can run the websurfx server by running the following commands: + +``` bash +redis-server --port 8082 & +websurfx +``` + +Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx. + +If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md). + +## Other Distros + +The package is currently not available on other Linux distros. With contribution and support it can be made available on other distros as well 🙂. + +# Install From Source + +## Stable + +To get started with Websurfx, clone the repository, edit the config file which is located in the `websurfx` directory and install redis server by following the instructions located [here](https://redis.io/docs/getting-started/) and then build and run the websurfx server by running the following commands: ```shell git clone https://github.com/neon-mmd/websurfx.git cd websurfx -cargo build +cargo build -r redis-server --port 8082 & ./target/debug/websurfx ``` -# Rolling/Edge/Unstable +Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx. + +If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md). + +## Rolling/Edge/Unstable If you want to use the rolling/edge branch, run the following commands instead: @@ -18,13 +49,15 @@ If you want to use the rolling/edge branch, run the following commands instead: git clone https://github.com/neon-mmd/websurfx.git cd websurfx git checkout rolling -cargo build +cargo build -r redis-server --port 8082 & ./target/debug/websurfx ``` Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx. +If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md). + # Docker Deployment Before you start, you will need [Docker](https://docs.docker.com/get-docker/) installed on your system first. @@ -61,7 +94,11 @@ colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used fo theme = "simple" -- the theme name which should be used for the website -- Caching -redis_connection_url = "redis://redis:6379" -- redis connection url address on which the client should connect on. +redis_connection_url = "redis://127.0.0.1:8082" -- redis connection url address on which the client should connect on. + +production_use = false -- whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users) +-- if production_use is set to true + -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests. ``` After this run the following command to deploy the app: @@ -74,7 +111,7 @@ This will take around 5-10 mins for first deployment, afterwards the docker buil ## Unstable/Edge/Rolling -For the unstable/rolling/edge version, follow the same steps as above with an addition of one command for cloning the repository which makes the cloning step as follows: +For the unstable/rolling/edge version, follow the same steps as above (as mentioned for the stable version) with an addition of one command which has to be performed after cloning and changing directory into the repository which makes the cloning step as follows: ```bash git clone https://github.com/neon-mmd/websurfx.git @@ -82,4 +119,4 @@ cd websurfx git checkout rolling ``` -[⬅️ Go back to Home](https://github.com/neon-mmd/websurfx/wiki). +[⬅️ Go back to Home](./README.md) diff --git a/docs/introduction.md b/docs/introduction.md index 476f509..7b540fb 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -10,4 +10,4 @@ Most meta search engines tend to be slow, lack high level of customization and m Websurfx is a project which seeks to provide privacy, security, speed and all the features which the user wants. -[⬅️ Go back to Home](https://github.com/neon-mmd/websurfx/wiki). +[⬅️ Go back to Home](./README.md) diff --git a/docs/theming.md b/docs/theming.md index 95ff7ff..49f3f22 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -321,4 +321,45 @@ footer { } ``` -[⬅️ Go back to Home](https://github.com/neon-mmd/websurfx/wiki). +### Styles for the about page + +This part is only available right now in the **rolling/edge/unstable** version + +```css +.about-container article{ + font-size: 1.5rem; + color:var(--fg); + padding-bottom: 10px; + } + +.about-container article h1{ + color: var(--2); + font-size: 2.8rem; + } + +.about-container article div{ + padding-bottom: 15px; + } + +.about-container a{ + color:var(--3); +} + +.about-container article h2{ + color: var(--3); + font-size: 1.8rem; + padding-bottom: 10px; +} + +.about-container p{ + color:var(--fg); + font-size: 1.6rem; + padding-bottom: 10px; +} + +.about-container h3{ + font-size: 1.5rem; +} +``` + +[⬅️ Go back to Home](./README.md)