zacharyvoase / markdoc Goto Github PK
View Code? Open in Web Editor NEWA lightweight Markdown-based wiki system. Current status: abandoned.
Home Page: http://markdoc.org/
License: The Unlicense
A lightweight Markdown-based wiki system. Current status: abandoned.
Home Page: http://markdoc.org/
License: The Unlicense
Hi.
I discovered strange behavior while using Markdoc. I'm not expert on Unix system, but it makes me can't use Markdoc as I expected. Please read this issue and let me know what the problem is :(
I was trying to configure Markdoc to use with group account.
I configured Markdoc and set its repository being owned by a new user:group markdoc:markdoc
.
I pushed all users who will use Markdoc into markdoc
group. And last, I set the repository directory permission like this.
find . -type d -exec chmod ug+wrxs {} \;
find . -type f -exec chmod ug+wr-xs {} \;
It worked properly, before I run markdoc build
with other user account rather than markdoc
itself.
rsync: failed to set times on "/srv/markdoc/var/.html/.": Operation not permitted (1)
rsync: failed to set times on "/srv/markdoc/var/.html/media": Operation not permitted (1)
rsync: failed to set times on "/srv/markdoc/var/.html/media/css": Operation not permitted (1)
rsync: failed to set times on "/srv/markdoc/var/.html/media/sass": Operation not permitted (1)
rsync: failed to set times on "/srv/markdoc/var/.html/project": Operation not permitted (1)
rsync: failed to set times on "/srv/markdoc/var/.html/project/gigaknight-system-prototyping": Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
Traceback (most recent call last):
File "/usr/local/bin/markdoc", line 9, in <module>
load_entry_point('Markdoc==0.6.6', 'console_scripts', 'markdoc')()
File "/usr/local/lib/python2.6/dist-packages/markdoc/cli/main.py", line 38, in main
return command(config, args)
File "/usr/local/lib/python2.6/dist-packages/markdoc/cli/commands.py", line 29, in wrapper
return function(config, args)
File "/usr/local/lib/python2.6/dist-packages/markdoc/cli/commands.py", line 270, in build
sync_html(config, args)
File "/usr/local/lib/python2.6/dist-packages/markdoc/cli/commands.py", line 29, in wrapper
return function(config, args)
File "/usr/local/lib/python2.6/dist-packages/markdoc/cli/commands.py", line 238, in sync_html
subprocess.check_call(command)
File "/usr/lib/python2.6/subprocess.py", line 498, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['rsync', '-vaxq', '--cvs-exclude', '--delete', '--ignore-errors', '--include=.htaccess', '--exclude=.*', '--exclude=_*', '/srv/markdoc/var/.tmp/', '/usr/local/lib/python2.6/dist-packages/markdoc/static/default-static/', '/srv/markdoc/var/static/', '/srv/markdoc/var/.html/']' returned non-zero exit status 23
I googled and found some opinions it could be a problem of rsync
.
This was my final approach to figure out what the problem is. What should I do to make it work?
I installed markdoc successfully in a Debian server, but failed on running markdoc command. it report below error:
root@aFEWS:~# markdoc
Traceback (most recent call last):
File "/usr/local/bin/markdoc", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2707, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Pygments
My server environment:
root@aFEWS:~# uname -a
Linux aFEWS 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64 GNU/Linux
root@aFEWS:~# python -V
Python 2.7.3
root@aFEWS:~# pip freeze
ansible==1.8.2
chardet==2.0.1
CherryPy==3.6.0
ecdsa==0.11
fpconst==0.7.2
Jinja2==2.7.3
Markdoc==0.6.6
Markdown==2.5.2
MarkupSafe==0.23
paramiko==1.15.2
pycrypto==2.6.1
Pygments==2.0.2
python-apt==0.8.8.2
python-debian==0.1.21
python-debianbts==1.11
PyYAML==3.11
reportbug==6.4.4
SOAPpy==0.12.0
WebOb==1.4
From the headings, sub-heading and points inside the headings, an index can be generated and displayed at the top of the pages.
Is there any possibility for that being implemented?
Is there a possibility to implement search feature in markdoc?
A searchbar at the top that will search all the markdown files. A simple line-based search is fine.
Looking over the Meta-Data extension for the Markdown implementation you're using, it occurs to me that it would be possible to have a number of important RDFa metadata attributes -- the key three being dc:title, dc:created, and dc:creator -- specified inline in the Markdown page source itself. Just a thought.
I get the following response when I request a page that does not exist:
Traceback (most recent call last):
File "/Users/jonathan/.virtualenvs/wiki/lib/python2.7/site-packages/cherrypy/wsgiserver/init.py", line 1245, in communicate
req.respond()
File "/Users/jonathan/.virtualenvs/wiki/lib/python2.7/site-packages/cherrypy/wsgiserver/init.py", line 775, in respond
self.server.gateway(self).respond()
File "/Users/jonathan/.virtualenvs/wiki/lib/python2.7/site-packages/cherrypy/wsgiserver/init.py", line 2018, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/Users/jonathan/.virtualenvs/wiki/lib/python2.7/site-packages/markdoc/wsgi.py", line 53, in call
response = self.get_response(request)
File "/Users/jonathan/.virtualenvs/wiki/lib/python2.7/site-packages/markdoc/wsgi.py", line 65, in get_response
return self.file(request)
File "/Users/jonathan/.virtualenvs/wiki/lib/python2.7/site-packages/markdoc/wsgi.py", line 117, in file
return self.not_found(request)
File "/Users/jonathan/.virtualenvs/wiki/lib/python2.7/site-packages/markdoc/wsgi.py", line 173, in
not_found = lambda self, request: self.error(request, 404)
File "/Users/jonathan/.virtualenvs/wiki/lib/python2.7/site-packages/markdoc/wsgi.py", line 161, in error
context['reason'] = webob.statusreasons.status_reasons[status]
AttributeError: 'module' object has no attribute 'statusreasons'
I'm currently using webob 1.0.7. It seems that webob.status_reasons has been moved to the util module.
When I name my file as ๆต่ฏ.md
in wiki and run markdoc build
, there will be an exception:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 3: ordinal not in range(128)
Full exception can be find here http://pastie.org/2979381
A wiki isn't really a wiki unless the rendered pages (can) have an edit link. A markdown-format wiki is exactly what I'm after, but I'd like to be able to add / edit content via my web browser, and not just the command line. Or is this there, and I just missed it (after reading all the documentation)?
when using command line
markdoc serve
the port specified in markdoc.yaml is not used always 8008
to use a different port you have to
markdoc serve -p 8010
There's a bit of an issue with being able to effectively use the TOC extension with Markdoc: the TOC output includes the h1-level header used as the Markdoc page title, which goes against the principle of least surprise. This means in practice that the TOC output is a little uselessly redundant, since Markdoc pages are not likely to have more than one h1. If one places the TOC directly after the page title, the redundancy really pokes one in the eye.
In case there exists some way to specify that the TOC output should only include h2-level headers and their children, that'd be fantastic. I realize this isn't really a Markdoc issue per se, but one concerning the TOC extension. However, perhaps Markdoc has some degree of control here internally, within which scope the output could be remedied? I can't really imagine that when using the TOC extension with Markdoc anyone could want the h1-level titles as part of the TOC, so it wouldn't even need to be configurable.
Any chance that MathJax support could be provided out of the box?
What seems to be the problem here?
Just installed (via easy_install and then through also through pip), run "markdoc init my-wiki", entered the directory and neither "markdoc build" nor "markdoc serve" work.
This is the message on running "markdoc serve":
c:\temp_a\my-wiki>markdoc serve
Traceback (most recent call last):
File "c:\programs\dev\Python27\Scripts\markdoc-script.py", line 9, in
load_entry_point('markdoc==0.6.6', 'console_scripts', 'markdoc')()
File "C:\programs\dev\Python27\lib\site-packages\markdoc-0.6.6-py2.7.egg\markdoc\cli\main.py", line 38, in main
return command(config, args)
File "C:\programs\dev\Python27\lib\site-packages\markdoc-0.6.6-py2.7.egg\markdoc\cli\commands.py", line 29, in wrapper
return function(config, args)
File "C:\programs\dev\Python27\lib\site-packages\markdoc-0.6.6-py2.7.egg\markdoc\cli\commands.py", line 341, in serve
server = config.server_maker()(app)
File "C:\programs\dev\Python27\lib\site-packages\markdoc-0.6.6-py2.7.egg\markdoc\server.py", line 27, in server_maker
from cherrypy.wsgiserver import CherryPyWSGIServer
File "C:\programs\dev\Python27\lib\site-packages\cherrypy-3.2.5-py2.7-win-amd6
4.egg\cherrypy\wsgiserver__init__.py", line 11, in
from wsgiserver2 import *
ImportError: No module named wsgiserver2
c:\temp_a\my-wiki>
If I may, I would suggest that the default template's body width could perhaps be slightly increased. Right now, e.g. http://markdoc.org/ looks really (too) tiny on a decent-sized screen. The http://unlicense.org/ template, by contrast, looks rather more readable; I don't recall whether I adjusted that myself, or whether the default template back in the day used to be wider.
Just like extracting the title from wiki pages as the HTML title, I want to have a special file in a directory to provide meta information of this directory.
something like this:
|
`-- directory_name
`-- .meta
in system/.meta file:
title: "This_is_used_when_link_to_this_directory"
descrpiton: "We can display this text in the directory's index.html page, make this index page more informative"
links of the form [/foo/bar#drek] don't work. Markdoc doesn't recognize this as an attempt to link to an anchor (hand entered via HTML) on page /foo/bar. This is not exactly earth-shaking but I was trying to use anchors to take readers to one of many items on a bibliography page or to something buried on a longer text-page.
Thanks ... love markdoc!
Hi
I'd like to modify the default CSS to have a larger space for my content.
Where can i find the default CSS sothat each time i will create a site and build it i will have my custom modification ?
Regards
Is there a way to exclude certain static files being synced, using wildcard matching for example?
An issue I've been seeing is that if I e.g. edit my robots.txt
, my editor will leave a robots.txt~
backup file lying around; as I'm sure you know, this is a fairly common convention in shell-based editors. Unfortunately, that backup file then gets copied to .html/robots.txt~
when I do a markdoc build
. Not that it's a huge problem, but it is a little annoying.
If the build process ignored ~
files, that'd solve the specific issue above. But even more useful (if wishes were horses) would be the ability to exclude patterns of files, including then "*~"
. This would come very handy in repositories where the static files are located directly on the top level, meaning that some extraneous non-static files get copied in the build process as well, particularly README.md
and Rakefile
in my typical use cases.
I bet you've already thought of this, and I have just overlooked it in the documentation ;-)
I would like to be able to build a set of linked html files locally readable without a server. I can individually open the pages as
file://~/html/index.html
but any links do not work as they are missing the .html extension. I know servers will add the extension as required (and the index.html if address ends in "/"). Would it be possible to add an option to include the extension on build?
On Windows, running Markdoc without rsync
installed causes the following confusing error message to be displayed:
PS C:\Users\lws\Documents\GitHub\morrowind-dnd3.5> markdoc build
Traceback (most recent call last):
File "C:\Python27\Scripts\markdoc-script.py", line 9, in <module>
load_entry_point('Markdoc==0.6.6', 'console_scripts', 'markdoc')()
File "C:\Python27\lib\site-packages\markdoc\cli\main.py", line 38, in main
return command(config, args)
File "C:\Python27\lib\site-packages\markdoc\cli\commands.py", line 29, in wrapper
return function(config, args)
File "C:\Python27\lib\site-packages\markdoc\cli\commands.py", line 270, in build
sync_html(config, args)
File "C:\Python27\lib\site-packages\markdoc\cli\commands.py", line 29, in wrapper
return function(config, args)
File "C:\Python27\lib\site-packages\markdoc\cli\commands.py", line 238, in sync_html
subprocess.check_call(command)
File "C:\Python27\lib\subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
If we run with the --verbose
option we can see this is just after the Markdoc attempts to call rsync
which is not installed.
markdoc.sync-html: DEBUG: rsync -vaxq --cvs-exclude --delete --ignore-errors --include=.htaccess --exclude=.* --exclude=_* .tmp/ default-static/ static/ .html/
Markdoc should trap this exception and produce a more useful error message, such as OSError: rsync not installed or could not be found.
Actually it's even worse than this; I do have rsync
installed (via cwRsync
) but Python can't find it. This is a Windows specific bug. The problem is at commands.py:238
where subprocess.check_call()
is called with the default argument of shell=False
. To quote from Walter Mundt's StackOverflow answer - "Also, on Windows with shell=False, it pays no attention to PATH at all, and will only look in relative to the current working directory". So even though rsync
is on my path, Python on Windows can't find it.
I have looked around but couldn't find anything about it. Markdoc is labeled as a wiki but I don't seem to be able and see a way to edit a page via the browser and further more see the history of page changes. Am I missing something?
The CSS provided after building a markdoc site switch the position of <sub>
and <sup>
text in Safari 8 on OS X Yosemite. Using the opposite tag puts the text in the correct location.
Even though there is an option in Markdown (presented in February 2014) to strike through the text, it seems that markdoc is not supporting it currently.
So:
~~text~~
should return the text with a strike through (like this one).
I hope I'm not misinterpreting here, but it seemed to me like invoking markdoc build
would remove potentially created .htaccess
files in the .html
output directory.
This was a bit confusing to me when I read this tip.
All went well in the end, I just configured it directly in the profile for the virtual host :)
It needs a responsive layout like bootstrap or something else. Today is unacceptable a document not to be accessible everywhere ;)
When rsync is missing on the system, markdoc build
exits with a fairly cryptic stacktrace:
Traceback (most recent call last):
File "/usr/bin/markdoc", line 9, in <module>
load_entry_point('Markdoc==0.6.6', 'console_scripts', 'markdoc')()
File "/usr/lib/python2.7/site-packages/markdoc/cli/main.py", line 38, in main
return command(config, args)
File "/usr/lib/python2.7/site-packages/markdoc/cli/commands.py", line 29, in wrapper
return function(config, args)
File "/usr/lib/python2.7/site-packages/markdoc/cli/commands.py", line 271, in build
sync_html(config, args)
File "/usr/lib/python2.7/site-packages/markdoc/cli/commands.py", line 29, in wrapper
return function(config, args)
File "/usr/lib/python2.7/site-packages/markdoc/cli/commands.py", line 239, in sync_html
subprocess.check_call(command)
File "/usr/lib/python2.7/subprocess.py", line 536, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I think it would help a lot of people if markdoc would check on the availability of rsync first and error if it's not available.
The sync-html command should sync everything inside your temp folder to HTML root. However, it doesn't sync the listing or index files to HTML root.
This is because the build_listing method puts the files directly into the HTML root. Instead, it should put them in the temp folder, and have the sync_html method sync those over to the HTML root. Once this change is made, lines 270 and 271 should be flip-flopped in the build method in commands.py.
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.