devaneando / wikitten Goto Github PK
View Code? Open in Web Editor NEWWikitten is a small, fast, PHP wiki, and the perfect place to store your notes, code snippets, ideas, and so on.
License: MIT License
Wikitten is a small, fast, PHP wiki, and the perfect place to store your notes, code snippets, ideas, and so on.
License: MIT License
Is it possible to add disqus support under Markdown document page?
This should be good if visiters want to leave some comments on my Wiki page.
Thanks
Uranus
This point of this issue is to gather opinions on the possibility of using Composer with Wikitten.
Pros:
Cons:
我感觉我发现了新大陆
PHP Version 5.4.7
Fatal error: Call to undefined function finfo_open()
This may just be a case of lack of documentation.
The README only mentions PHP5. Does this software work with PHP 7? More specifically 7.3 and the upcoming PHP 7.4?
When editing a file in the interface and saving, all existing Unix line-endings and any new ones are converted to Mac line-endings.
This leads to ugly diffs and other issues for anyone who keeps their library directory under version control
I think there is an error with this.
If you download/clone the repository, put the files in your documentRoot i.e for apache on linux:
/var/www/Wikitten/
Then go to
http://[your ip]/Wikitten the index page loads, however none of the links on the side, in the tree work - they all result in page could not be found.
So for me I can see inthe browser that is is trying to go to:
https://[my ip]/Wikitten/Sample%20HTML%20document.html
Which does not exist.
I may have set it up incorrectly however I believe I am following the instructions properly.
hi
i write my markdown file use typora local,then upload the .md file to library,but it can't nicely render. such as line feed.
how can i sove this problem? Could i use my typora css?
thank you very much.
Is it possible to forbid the javascript code execution and avoid the xss vulnerabilities ?
or add an option to forbid the html code execution and only allow markdown code.
Hi Victor,
Where is the CSS that decides what the converted markdown - css renders like?
问题已解决,config.php去掉注释即可
I still find Wikitten my go to notes solutions ... for years!
I'd love if you could incorporate Mermaid
This library may make it trivial (hopefully): Mermaid-PHP
The wiki pages are vulnerable to javascript injection. Putting this on a page is risky.
can a routine be run on "Saving changes" to check for and encode any script tags in the wiki are protected against?
I believe this is an issue with the configuration of URL rewriting. I'm running Wikitten internally on an Ubuntu server. It's installed in the Apache root /var/www/html
. Wikitten loads fine for the homepage, but as soon as I click a link in the nav it attempts to go to say http://{ip}/Sample HTML document.html
and I get a 404 since that file is actually in http://{ip}/library/Sample HTML document.html
.
Do I need other rewrite rules that aren't included in the default install? Seems like a great project, but documentation is certainly light.
Modern Browsers (Safari, Chrome) throw a HTTP 404 in the development tools, because the map file for the used query.min.js is missing.
You're currently using Version 1.9.1 of JQuery, so the correct map file is located here:
http://code.jquery.com/jquery-1.9.1.min.map
You additionally need to change the filename in the first line of that map file into jquery.min.js, because you're not providing the JQuery version in your js-filename.
Cheers!
It will be great to add custom head sections such as title metadata related with the page.
For example:
``` ufw allow 113 ufw allow 631 ufw allow 100XX ufw limit 22 ufw enable ```
from https://wiki.mikaela.info/Me%20%28Mikaela%29/New%C2%A0systems.md becomes
ufw allow 113 ufw allow 631 ufw allow 100XX ufw limit 22 ufw enable
while it should become
ufw allow 113
ufw allow 631
ufw allow 100XX
ufw limit 22
ufw enable
this can be also reproduced with most of other markdown files on wiki.mikaela.info this site was removed.
The latest version of Wikitten/static/js/codemirror.min.js seems to have broken PHP syntax highlighting.
Pulling back in the Wikitten/static/js/codemirror.min.js file from commit 063f1bf fixes the sample PHP.php files highlighting.
Trying to work out the cause however working through this file could be fun! Any help would be appreciated 👍
Below is my to modify the app to fit my own personal needs. If anyone has ideas, feel free the mention in the comments and I might implement them as well.
My goal is to remain a file, non-DB app for easy portability. However many of my upgrades below would benefit and open up more possibilities if I decided to switch to a database down the road.
Luckily there is SQLite which is a file based Database. SO I could easily use SQLite and still be a file based portable app! For now though I am going to not use a DB if I can.
PluginBin.php
file and it is enabled in the config file manually and then it is manually called in the render.php
file. With the new system, any plugin could hook into the render.php
file without any manual hard coding names like it is now.Most of these plugins mentioned here can hook into the on-save action event or on the render action event. The embed plugins below might be best hooked in on the render action so that files saved outside of the app will also be processed. Something like the JS beatificastion might be better to run on save so that it doesnt have to run on every view! Really up to the user though.
These things might be called in the format of a short_code
like WordPress uses. So when the file is parsed and a shortcode is detected it is replaced with the embed code for that plugin.
The idea here is to have a list of file extensions and map each one to a render()
function.
Right now the MarkDown file maps to render with the Markdown parser.
With this re-engineered and the plugin system, you would be able to add your own custom file types and render() functions for them. This opens up the door to many unique things.
Example....A new Book COllection
file type might hold a collection of my programming books in a certain format and my render function could format these type of files to show in a nice tabular format with thumbnail image to the left, book data to the right and format it in a nice way to easily view the collection.
Basically allow you to create templates for different file types to show when viewing them. THe template would have placeholder variables and the render() function for your file type would parse the file to get the template var values and build the final output.
What would be nginx equivalent of .htaccess rewrite rules for the wiki to run properly?
I was wondering whether adding new pages to the wiki from the web page is possible or is a future idea?
It could just be a button that adds a .md file to a folder with a name set by the user. Then the user edits it in the normal way(s).
In routing.php
new code has been added:
<?php
if (!defined('APP_STARTED')) {
die('Forbidden!');
}
But, wouldn't APP_STARTED
be false when runningphp -S 0.0.0.0:8888 routing.php
? Because, routing.php
has not had a chance to run index.php
where APP_STARTED
is set to true?
Steven
I've just installed Wikitten and started to play with it (looks very nice!), adding files and directories. My OS is Windows 7 and I've noticed that when files and folder names have special characters (e.g. accented chars), they're not properly rendered. A quick workaround for my particular situation was to add:
$item = iconv("windows-1250", "UTF-8", $item);
after https://github.com/victorstanciu/Wikitten/blob/master/wiki.php#L238
(EDIT: not a workaround because then the links don't work anymore).
Any idea for some more general and robust solution that could be included in your code?
so i loaded everything up and all was well. so i removed all the files in library
and changed index.md
to my liking and reloaded and i get a blank page.
Very useful software, thank you!
Fulltext search would IMHO be a great feature...
Might be a good idea to update the project website, since quite a few new features were added since then :)
Cheers!
Hello,
i use wikitten on a linux server.
It works fine.
When i start the wiki on a windows server i get a error message.
PHP Fatal error: Uncaught exception 'Exception' with message 'Page 'index.md' was not found' in C:\xampp\htdocs\wikitten\wiki.php:41
And here the trace:
Stack trace:
#0 C:\xampp\htdocs\wikitten\wiki.php(45): Wiki->{closure}()
#1 C:\xampp\htdocs\wikitten\wiki.php(331): Wiki->_render('index.md')
#2 C:\xampp\htdocs\wikitten\wiki.php(269): Wiki->indexAction()
#3 C:\xampp\htdocs\wikitten\index.php(52): Wiki->dispatch()
#4 {main}
thrown in C:\xampp\htdocs\wikitten\wiki.php on line 41
Who can help?
Your sincerly
Stephan
rt
Can we use ParseDown instead of Markdown original? This also has Extra and other features that Markdown has. :) Do let me know if I can help in finishing this work?
It would be interesting to use PJAX to load only the content and not the entire page each time we click on a link.
I begin the integration, but when I load a page of code, codemirror don't load.
Would be nice to have cleaner URLs such as
http://server/support (really support.md on disk)
http://server/contact (really contact.md on disk)
http://server/todo (really todo.md on disk)
and when Wikitten notices there's no extension, it implies ".md" at the end. This allows a "pretty" URL and on disk, still stored as MarkDown. This would require tweaks of the tree.php as well. I made this change in index.php, just after $request_uri = parse_url($_SERVER['REQUEST_URI']);
if( strlen(pathinfo($request_uri['path'], PATHINFO_EXTENSION)) === 0) {
$request_uri['path'] .= ".md";
}
but I think there's more work to be done
I need to be able to use the bootstrap accordion feature. Can wikkitten do this?
.htm and .html are valid extensions for HTML files. Could a change be made to add .mdown and .markdown as valid MARKDOWN extensions to the existing .md to allow the rederer to render them? Personally I only use .markdown (and .md if the file is from someone else) but I have seen .mdown as a MARKDOWN extension.
Lines quoted with backticks (`) don't wrap and continue off the screen. This happens whether there are spaces or not.
Here's an example of proper implementation:
A-Really-Long-Line-of-Text:WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
I find this happens after first new line is introduced, the blinking cursor is placed one character in front of where it places characters.
This does not causes any error, but it is a little disturbing :) I guess has something to do with the textarea component javascript.
Is this possible through the web interface or am just not able to find it?
-thanks !
First of all thank you for this great wiki script based on md - I am in love with it, completely!
As I discovered this only last night and had play with it and fixed prettyfi.css for your default theme and also today I created new theme.. its main.css changes mainly but there is one line modified in php - toggle source button - Just renamed to Raw Source. Also I added print overrides to main.css so when you printing the page you see only content, no sidebar and breadcrumbs. Breadcrumbs are also not visible on mobile phones as main menu is on top of the screen. In the end I've decided to add also scroll to top button as I do have some document contents quiet long and its quiet good when you viewing wiki from mobile.
My private personal documentation (as you can see I still have even original md files which came with cms)
It would be nice to be able to mirror Github repos/docs on WIkitten. Currently Github displays contents of README.md in each directory, if found.
Can we add a check so if no index.md is found, the wiki tries README.md?
I'm confused about APP_DIR
.
If I touch a file named /library/linux/bash.md
(with no space),I‘ll get errors when I access http://host.com/linux/bash.md
:
`could not find file bash.md` .
That is because of php gets a wrong APP_DIR in index.php
:
/code%20snippets/Bash.sh -> APP_DIR=
/linux/bash.sh -> APP_DIR=/linux
I've fixed it by reset APP_DIR
as defined('APP_DIR', '');
in index.php
BTW, I'm looking forward that creating / updating files directly through the web interface. It would be awesome if you add this markdown editor: https://stackedit.io/
hello, tonight i saw your project and begann to "merge" into my pluginsys.. it looks really nice. because my project don't use rewrites right now, i've rewritten some stuff, so it recive data over a get-variable now. Also not possible is the base-tag since he kills everything else there (links).
there's something to do, may you like it, may you ignore it.. anyway, my question is about style.. whenever i press "Toggle source" code will go on the right boarder with one sign per line.
weird because i didn't change any css and on your project it's working nice.. i have no idea. may for you it's something on first view.
and maybe your interessted in that fork too.
http://dev.thoeni.me/peta/plugin.php?plugin=30&page=nospacefoldr%2FBash.sh
(dont delete pluginid there)
https://github.com/skamster/Peta/tree/master/plugins/wikittenPlugin
changes are mostly made by discount index.php and mod wiki.php + tree.php
so, i'm very tired, good day/night..
EDIT: should be marked as question, not as bug. of course it's not your issue, it's mine.. sry, i fail there..
I run my local webpage out of my home directory using mod_userdir
. Whenever I would click a link I would get "index.php was not found on this server". Eventually I figured out it was necessary to add RewriteBase /~my-user-name/
to the .htaccess
. It might be useful to mention in the installation instructions that you need to set the RewriteBase
directive if you don't want to or can't run the wiki from the webroot.
Is there any way to have a rss list of recent changes, or to have such info in a page?
Using BrowserID you can easily add a login system to this code if you wanted to enable web admin or editor.
You can see a simple example of the API in my tiny forum system.
index2.md doesn't exist and thus goes to the uhoh.php page:
curl -I http://wikitten.vizuina.com/index2.md
HTTP/1.1 200 OK
Date: Tue, 19 Jan 2016 15:32:37 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.45-3+deb.sury.org~precise+1
Vary: Accept-Encoding
Content-Type: text/html
By inserting the following in uhoh.php, it returns a 404 and prevents dead links from being indexed:
<?php header("HTTP/1.0 404 Not Found"); ?>
Great project, but missing LICENSE so far. Could you license it please, so I know the freedoms I have (or have not)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.