GithubHelp home page GithubHelp logo

wkallhof / hazel Goto Github PK

View Code? Open in Web Editor NEW
118.0 8.0 28.0 1.3 MB

Fast, simple, markdown powered wiki knowledge base for Node.js

Home Page: http://hazel.wmk.io

License: GNU General Public License v3.0

JavaScript 60.81% CSS 17.74% HTML 21.45%

hazel's Introduction

Hazel: Fast, simple, markdown powered wiki knowledge base for NodeJs

NPM Version NPM Downloads Linux Build Windows Build Test Coverage

Archived

Hazel is no longer in active development. If you are interested in taking over development, let me know!

Installation

$ npm install hazel-wiki

Setup

const Hazel = require("hazel-wiki").app;
const config = require("./config.default.js");
const StorageProvider = require("hazel-wiki").storageProvider;

let app = new Hazel(config, StorageProvider);
let server = app.server;

server.listen(3000)

For a more in-depth tutorial, check out Getting Started with Hazel

Demo

Use the full featured online demo : http://hazel-demo.wmk.io

Features

  • Simple markdown editing of documents
  • Configurable storage provider architecture (disk, browser, etc.)
  • Leverages Express for routing and exposes the server for configuration
  • Auto-links to existing documents based on link text
  • Customizable templates utilizing EJS

Examples

To view the examples, clone the Hazel repo and install the dependencies:

$ git clone git://github.com/wkallhof/hazel.git --depth 1
$ cd hazel
$ npm install

Then run the example provided:

$ node example/server.js

Tests

To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test

People

The author of Hazel is Wade Kallhoff

Contributions by:

License

GPL-3.0

hazel's People

Contributors

rysiekpl avatar sontan avatar winklerand avatar wkallhof 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

hazel's Issues

Image upload fail with non-existent `uploads_dir` directory

Using the same setup as in #3.
Node version: 6.1.0
NPM version: 3.8.6

When an non-existent uploads_dir key in config.json

In contrast to the content_dir and data_dir being created automatically uploads_dir is not.
Maybe there should be a consistent default behaviour for all three of them?

Moreover when uploading without a uploads_dir the upload progress bar indicates a successful upload, although nothing is actually saved. When hovering over the upload file the pop-over shows "[Object Object]".
That should be changed, too, IMHO.

Ugly error message on failed form validation during document creation

$ node --version 
v6.1.0
$ npm --version 
3.8.6

Trying to create a new page without supplying a title leads to a blank page only showing Cannot POST /save.

When creating a document with a title and the other fields left blank one is redirected to a page saying the page could not be created. On the home page the document link to the non-existent page apperas as if it had been created successfully.

META info syntax question/suggestion

Would it be possible to put the META information in a markdown-invisible expression? For instance

[META]: # ({"title":"Home","tags":["overview"],"createDate":1512133049820,"updateDate":1512133049820})

instead of the HTML comment block Hazel uses now, which is visible in standard md viewers:

<!--META {"title":"Home","tags":["overview"],"createDate":1512133049820,"updateDate":1512133049820} -->

More info: https://stackoverflow.com/questions/4823468/comments-in-markdown

Thank you for this piece of software, it is very useful to me!

Does not work for nested folders with markdown files

I tried to use this tool to my dozens of folders with markdown but only markdown files in root path are scanned.

Also new created documents are stored in root content folder without option to create or locate an folder.

Is this functionality implemented?

Thanks a lot.

Feature Request -- Syntax Highlighting

Perhaps you have already mentioned this in a previous question. Will there be some for of syntax highlighting feature added to this wiki?

I am curious, thanks!

Illegal Characters

When uploading files the editor breaks on file names with ")". This maybe the solution.

this.dropzone.on("addedfile", function(file){
		if(file.name.indexOf("(") > 0 || file.name.indexOf(")") > 0){
			alert('File Contains illegal Characters');
			this.removeFile(file);
		}
	});

folders?

This is a beautiful project and I love the simplicity. But I am wondering if there are ways (or plans) for having more of a hierarchy via folders. And is it possible to have a tag column on the homepage? Thank you for your work

Auto Linking only links first item in a document

if (missingLinks && missingLinks.length > 0) {
var pairs = _.chunk(missingLinks, 2);
_.forEach(pairs, (pair) => {
let slug = this._storageProvider.titleToSlug(pair[1]);
document.markdown = document.markdown.replace(pair[0], pair[0].replace("()", "(/" + slug + ")"));
});
}

I updated this code to (but also moved to using slugify):

      missingLinks.forEach((link) => {
        const title = link.substr(1).slice(0, -3);
        const pairSlug = slugify(title, { lower: true });
        document.markdown = document.markdown.replace(link, `[${title}](/${pairSlug})`);
      });

Also needed to make this RegEx a global search:

this._missingLinkRegex = /\[(.*)\]\(\)/;

this._missingLinkRegex = /\[(.*)\]\(\)/g;

Single Line Break not working

Double Like breaks work but the single line break doesn't drop the information to the next line.

it seems something like this is needed on the documentController.js

marked.setOptions({
		  breaks: true,
		});

Expose AuthenticationProvider?

Hello, this project has taken my interest and I would like to make use of it, however it doesn't seem to expose the authenticationProvider, which I want to modify to suit my own needs. Is this in the pipeline? Thanks

Running behind Apache proxy, `base` directive doesn't seem to have any effect

Hello there, first of all โ€“ thanks for your effort, Hazel looks great as far as I can judge from what I've seen so far.

However, trying to set up my personal instance on a shared hosting I encountered the following error.
I'm attempting to run Hazel behind an Apache and in a sub-directory:

http://domain.com/wiki

Therefore I set base in my config.default.js:

var config = {
  //  Your site title (format: page_title - site_title)
  site_title: "Abacus Wiki",

  //Application base url
  base: "/wiki/",
};
// Exports
module.exports = config;

My .htaccess in the specified dir /wiki contains a rewrite

RewriteEngine On
RewriteRule (.*) http://localhost:62626/$1 [P]

directing any request to the running Hazel server.

Still the paths in the resulting HTML pages are incorrect (e.g. /styles/tidy.css) resulting in un-styled pages.

What is wrong here?

Page Access Control?

Hi I was wondering if there was a way to set roles for admins and users? Like if a user has wikis locked out to them until after 3 months after which I can enable access to them (as an admin)?

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.