claudioc / jingo Goto Github PK
View Code? Open in Web Editor NEWNode.js based Wiki
License: MIT License
Node.js based Wiki
License: MIT License
Any plans to support GitHub login? Considering the compatibility with GitHub Wiki / Gollum, I reckon being able to authenticate through GitHub is just as attractive as Google.
There should be a way to use images from inside the repository
wiki_src
wiki_src
config.yaml
, set application.repository
to "wiki_src"wiki_src/.git is not a git repository
The result is a redirect loop.
It looks like Home.md was saved, however.
What sort of log files should I check to help diagnose this issue? Environment is Windows, Node 0.10.
node jingo -c config.yaml
Output:
Unrecognized git semver (1.9.4.msysgit.2)
Codemirror can be used with highlight support for Markdown (see Ghost)
Gollum has an interesting feature: automatic table of content generation.
Usage: [[_TOC_]]
It would be nice to have such feature in Jingo.
Good job so far, great project
Remove ^M
When I run jingo -c config.yaml
I get this error:
fs.js:696
return binding.stat(pathModule._makeLong(path));
^
Error: ENOENT, no such file or directory '/home/alex/Desktop/ninth-hour/public/favicon.ico'
at Object.fs.statSync (fs.js:696:18)
at favicon (/home/alex/.node/lib/node_modules/jingo/node_modules/serve-favicon/index.js:55:15)
at Object.module.exports.initialize (/home/alex/.node/lib/node_modules/jingo/lib/app.js:107:11)
at start (/home/alex/.node/lib/node_modules/jingo/jingo:82:34)
at /home/alex/.node/lib/node_modules/jingo/jingo:77:3
at Object.<anonymous> (/home/alex/.node/lib/node_modules/jingo/lib/gitmech.js:153:7)
at ChildProcess.exithandler (child_process.js:656:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Socket.<anonymous> (child_process.js:979:11)
I'm on Ubuntu 14.04, and I've installed jingo globally using the sudoless npm install.
I already have a git repo for all my documents and would like to add a wiki directory inside this for use through jingo.
Can you please add a config option for specifying the directory path inside the repo under which jingo does its business.
For example if the config option is:
repository:"/blah/"
storePath:"wiki"
Then jingo would store the pages inside the wiki
directory in the blah
repository.
There is an issue rendering tables in the wiki using HTML tags instead of MD syntax.
The table will be aligned in the bottom of the page.
Steps to reproduce:
Create a new page and paste the following code:
## TITLE
<table>
<tr>
<th>header</th>
<td>test</td>
</tr>
</table>
### SUBTITLE
There is an unexpected gap between the TITLE and the Table.
When creating a new page, the proposed title will not show up in the tab/browser title, as <title></title>
is empty.
The MarkItUp editor doesn't seem to change anything in its associated textarea.
No errors are thrown on the console. UI interaction works (buttons, alerts, ...).
Clicking on any modal popup shows the modal-backdrop at z-index: 1040 while the rest of the site appears to be z-index: 0.
Unless I've completely misunderstood how Jingo works, it should be possible to use Jingo essentially as an alternative front-end for a GitHub Wiki, correct? (If I'm mistaken then I'd appreciate some explanation on what you mean by "compatible".)
Then how about making a demo site that's hooked up with a live GitHub Wiki, so we can see this in action? I'm not very keen on signing up to a demo app, but I'd have no qualms about making edits via GitHub's interface and seeing how they're reflected in Jingo.
I'm getting an error with one of my wiki page:
Error: You need to pass a language obtained via "getLanguage"
Please report this to https://github.com/chjj/marked.
at Object.highlight (/opt/jingo/node_modules/node-syntaxhighlighter/node-syntaxhighlighter.js:81:24)
at Object.Marked.setOptions.highlight (/opt/jingo/lib/renderer.js:12:16)
at Parser.tok (/opt/jingo/node_modules/marked/lib/marked.js:837:33)
at Parser.parse (/opt/jingo/node_modules/marked/lib/marked.js:778:17)
at Function.Parser.parse (/opt/jingo/node_modules/marked/lib/marked.js:765:17)
at marked (/opt/jingo/node_modules/marked/lib/marked.js:1017:19)
at Object.Renderer.render (/opt/jingo/lib/renderer.js:77:12)
at exports.miscPreview (/opt/jingo/routes/index.js:423:23)
at callbacks (/opt/jingo/node_modules/express/lib/router/index.js:161:37)
at param (/opt/jingo/node_modules/express/lib/router/index.js:135:11)
I suspect yaml
syntax.
Git backed by redis alternative ssdb. Is that possible? In return I can help u code other api etc
The sidebar is displayed correctly on all other pages.
Hi
When trying to install I get the following warnings and errors.
npm WARN engine [email protected]: wanted: {"node":"0.8.x","npm":"1.1.x"} (current: {"node":"0.10.31","npm":"1.4.23"})
npm ERR! fetch failed https://registry.npmjs.org/iconv/-/iconv-2.1.4.tgz
npm ERR! Error: 400 Bad Request
npm ERR! at WriteStream.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\fetch.js:58:12)
npm ERR! at WriteStream.emit (events.js:117:20)
npm ERR! at evalmachine.<anonymous>:1609:14
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:102:5
npm ERR! at Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jingo"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0
The command was executed in a console with admin rights. Also I could not locate the file - npm-debug.log - on my system.
trailing and leading spaces are left in the page names.
Should not be too much trouble to lightly modify the jade files and style.css with appropriate classes so that the sidebar and footer don't look like crap on mobile browsers. I've already added some specific element classes/ids (#sidebar/#footer/.markdown-body etc.) in a dev branch that makes things like tables look much better.
It would be nice to have a clean mobile interface. I will take a look into it. Posting this for accountability, heh.
When I initially downloaded jingo through git, it was hanging on every request.
After looking at the code I noticed that express-validator wasn't being instantiated properly.
Instead of:
app.use(expValidator);
it should be
app.use(expValidator());
I have been using this wiki with no problems in the past. But then, I tried to upgrade it (to see if there was a newer version) and then I was unable to log in.
I tried to uninstall it and then reinstall it to no avail.
Using node-inspector, I found out that res.locals.user
is always undefined.
Since I noticed that the version of jingo I had and the version I just installed are the same version, my best guess is that, while the jingo version was the same, one of the dependencies was upgraded. That is very likely, since jingo's package.json uses the *
wildcard as the required version of several dependencies.
I tried to install jingo on a different pc to be 100% sure, and no, I can't install it there either.
Sometimes I notice that my process has died, even when I don't recall explicitly having accessed unknown pages. Logs say the history of an unknown page was requested. I suppose it could happen if a web crawler tries to reindex a previously present page.
To reproduce:
Assuming wiki.myhost.com
is jingo, go to
http://wiki.myhost.com/wiki/some_made_up_page/history
Instead of a 404, the process will exit with the error:
/app/node_modules/jingo/lib/tools.js:14
var title = content.split("\n")[0];
^
TypeError: Cannot call method 'split' of undefined
at Object.tools.getPageTitle (/app/node_modules/jingo/lib/tools.js:14:25)
at /app/node_modules/jingo/routes/index.js:428:36
at /app/node_modules/jingo/lib/gitmech.js:215:9
at ChildProcess.<anonymous> (/app/node_modules/jingo/lib/gitmech.js:36:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
This does not happen with normal unknown page access, which redirects to a 404.
The pageHistory
function in routes/index.js
does check for error in the same as pageShow
and tries to redirect to /
, so it's not clear to me what is happening here.
When you click on the Edit button, Jingo should issue a pull request and then open the edit page
I've just pulled new commits from Jingo and were happy to see Sidebar and Footer support.
Both work well, but appearantly links put in the footer are not clickable.
At short sight, I don't know why it's blocked.
After login, I was shown an edit view for Home
page. But after saving, I can't see any page because I get a "redirect loop" error from the browser:
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
It would be nice to see what was the last change on a page.
This is what Gollum does automatically
Despite I can successfully login to our Jingo instance, users repeatedly report errors which are reflected by the thrown 403 below.
x.x.x.x - - [22/Jan/2015:08:21:05 +0100] "GET /auth/github HTTP/1.1" 302 0 "http://wiki.transformap.co/login?destination=%2Fwiki%2FTransforMap" "Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.3.0"
x.x.x.x - - [22/Jan/2015:08:21:06 +0100] "GET /auth/github/callback?code=07548d1af20764a1a354 HTTP/1.1" 302 76 "http://wiki.transformap.co/login?destination=%2Fwiki%2FTransforMap" "Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.3.0"
x.x.x.x - - [22/Jan/2015:08:21:07 +0100] "GET /auth/done HTTP/1.1" 403 29 "http://wiki.transformap.co/login?destination=%2Fwiki%2FTransforMap" "Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.3.0"
I'm running Jingo behind a nginx reverse proxy and proxy_buffering off;
.
How can this error happen? Why does the user receive a forbidden status?
It should not be difficult to add a feature for codemirror to select one of the existing pages to be linked while editing a document
I am proposing to think about a Plugin System for Jingo, maybe version 2.
Generally accepted use of npm
as the package manager is clear.
Together with this, seperation of Client and Server could be undertaken, to render Jingo more data friendly (thus, being an Open API at the core). It would innovate by providing an HTTP API to a git backed Markdown Wiki. Additionally this seperation would make it more easy for me to include real time aspects for an Etherwiki.
Plugins should have names like jingo-plugin-persona
, jingo-plugin-ether
or jingo-plugin-rss
. What these do could then be discussed in seperate Repos.
I will try to build both into core first, but as a plugin would be much more appreciated.
Is there api documentation on how to access the wiki externally through rest or w/e other protocol?
Thanks.
A simple login method for local installations would be very desirable.
By simple, I mean: salted password or some such method. Easy way to do this would be to have a command line option to generate salted passwords for a user:
jingo --generate-salt username password
The admin can then copy this into the config file. This should suffice for personal wikis and the like.
Thanks for making a great project!
It would be nice to optionally (config option?) have the page titles determined by the file name (and not have the # Title
in the files), for compatibility/interaction with GitHub Wikis.
P.S.: Love Jingo!
Unfortunately it isn't possible to edit articles when using a mobile browser (at least not on my Nexus 5 using Chrome), because the toolbox is outside the visible area.
hi
Some useful patch like "fix jade error" are not applied on 0.5.1 version
it's a minor but annoying issue ;)
Can't find demo of jingo ((( I tried a demo server running from example -
When opening a page from a search page, highlight the line containing the term
In Github's version of markdown I can create todo lists:
(hrmph, no support for nested lists yet ๐ )
Test the presence of pages
object in the config, for example
If you enter an unauthorized e-mail you will have to clear the browser's data for the page to attempt another login.
It seems like if the sidebar is present, Jingo will show its title instead of removing it
The customization section states that that _style.css
and _script.js
in the repository will be included as custom CSS/Javascript; however, I'm only able to get this to work if the files end in .md
. I believe this is caused by line 22 of the components.js
, which hardcodes .md
to the filename it is looking for:
this.file = this.getConfig().customizations[this.name] + ".md";
(As an aside, I think the wiki would be more flexible if it looked for other common file extensions, like .markdown
, or even .text
, but that's probably a separate issue...)
The Ctrl P
shortcut to preview is great. Please add ability to close the preview with ESC
.
In the layout, remove the search box if the anonymous cannot read documents (thus, it cannot issue searches)
The compare page misses the title of the page the versions of which we are comparing
I'm just running jingo locally; revision history is lacking a space after the page title just inbetween the word and the french braces.
requesting page X and logging in, should redirect me to page X
Now that docSubdir is implemented, I think the scope of search should be restricted to this folder.
I have a big git repo where I keep all personal docs/notes. When I search something in jingo, it is searching the whole repo (which is a nice feature(!) to have sometimes), but it is miserably slow.
I suggest there be a run-time flag to search "only the wiki" or "entire repo".
Thanks!
If you add a line on a doc, the subsequent diff will show the new line in red.
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.