hamano / apache-mod-markdown Goto Github PK
View Code? Open in Web Editor NEWMarkdown filter module for Apache HTTPD Server
License: Apache License 2.0
Markdown filter module for Apache HTTPD Server
License: Apache License 2.0
I'm trying to utilise these to add standard copyright info to each Markdown page but I can't seem to get the configuration options working. I've tried using a filename, an absolute filename, a character string but none of these seem to be actually adding anything to the pages.
Not worked:
MarkdownFooterHtml markdown.footer
MarkdownHeaderHtml markdown.header
Not worked:
MarkdownFooterHtml /usr/share/markdown.footer
MarkdownHeaderHtml /usr/share/markdown.header
Not worked:
MarkdownFooterHtml "<hr><h1>Testing Headers</h1><hr>"
MarkdownFooterHtml "<hr><h1>Testing Footers</h1><hr>"
using the bs4 package on Ubuntu 18.04, if you have a #
symbol within a
```block, the code is being transformed into a title which is incorrect:
eg:
To compile Net-SNMP and build a compressed archive, follow these steps: ``` $ ./configure --with-your-options $ make # mkdir /usr/local/dist # make install prefix=/usr/local/dist/usr/local exec_prefix=/usr/local/dist/usr/local # cd /usr/local/dist # tar cvf /tmp/net-snmp-5.3.1-dist.tar usr # gzip /tmp/net-snmp-5.3.1-dist.tar # rm -rf /usr/local/dist ```
To compile Net-SNMP and build a compressed archive, follow these steps:
$ ./configure --with-your-options
$ make
# mkdir /usr/local/dist
# make install prefix=/usr/local/dist/usr/local exec_prefix=/usr/local/dist/usr/local
# cd /usr/local/dist
# tar cvf /tmp/net-snmp-5.3.1-dist.tar usr
# gzip /tmp/net-snmp-5.3.1-dist.tar
# rm -rf /usr/local/dist
To compile Net-SNMP and build a compressed archive, follow these steps:
$ ./configure --with-your-options
$ make
Hi, I built and installed commit 7b0eb68 and 1.0.3 and notice some unusual differences:
Not sure if it's really an issue or if already fixed, though.
I am unable to build, both dependencies are detected according to .configure
and I have checked that mkdio.h is actually present. Please advice.
make[1]: Entering directory '/home/sigurd/apache-mod-markdown-1.0.2'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -D_LARGEFILE64_SOURCE -Wall `/usr/bin/apxs -q CFLAGS` -I`/usr/bin/apxs -q INCLUDEDIR` -I/usr/include -g -O2 -MT libmodmarkdown_la-mod_markdown.lo -MD -MP -MF .deps/libmodmarkdown_la-mod_markdown.Tpo -c -o libmodmarkdown_la-mod_markdown.lo `test -f 'mod_markdown.c' || echo './'`mod_markdown.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -D_LARGEFILE64_SOURCE -Wall -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/apache2 -I/usr/include -g -O2 -MT libmodmarkdown_la-mod_markdown.lo -MD -MP -MF .deps/libmodmarkdown_la-mod_markdown.Tpo -c mod_markdown.c -fPIC -DPIC -o .libs/libmodmarkdown_la-mod_markdown.o
In file included from /usr/include/apache2/ap_config.h:25:0,
from /usr/include/apache2/httpd.h:44,
from mod_markdown.c:40:
/usr/include/apache2/ap_hooks.h:39:17: fatal error: apr.h: No such file or directory
#include "apr.h"
^
compilation terminated.
Makefile:463: recipe for target 'libmodmarkdown_la-mod_markdown.lo' failed
make[1]: *** [libmodmarkdown_la-mod_markdown.lo] Error 1
make[1]: Leaving directory '/home/sigurd/apache-mod-markdown-1.0.2'
Makefile:341: recipe for target 'all' failed
make: *** [all] Error 2
ap_hooks.h is at the location described in the output, and arp.h does exist at /usr/include/apr-1.0/apr.h
As title, it seems that not only MKD_LATEX
needs to be set, we have to add MathJax library to HTML code as well.
Both [single tick] and [triple tick] are rendered as
tags, so it's not possible to use CSS to make code blocks.
It would be expected that [single tick] render to and [triple tick] render to
AutoTools: Obsoleted m4s found
------------------------------
AM_CONFIG_HEADER: configure.ac:6
AM_PROG_LIBTOOL: configure.ac:10
Fedora 33, autoconf-2.69, m4-1.4.18
Fix:
-AM_CONFIG_HEADER(config.h)
# Add a test for a compiler.
AC_PROG_CC
-AM_PROG_LIBTOOL
+LT_INIT
Hello,
I would like to now if there is a way to process a (gzip) compressed markdown file?
I mean, if I have a file named foo.md.gz (or foo.gz.md), I would like to have it:
Maybe there is an already existing Apache handler / configuration that I could use, but it doesn't seem very obvious to find: the mod_deflate module seems to be more designed for compressing contents in order to send it to the client than for uncompressing contents in order to send it to another handler.
Regards,
Gingko
The doc says:
"Note: <DISCOUNT_DIR> is the directory that contains the include directory that contains mkdio.h Probably you need to specify --with-discount=/usr or --with-discount=/usr/local"
But on recent debian based distros, the path to the file mkdio.h is:
/usr/include/x86_64-linux-gnu/mkdio.h
I symlinked it to /usr/include/mkdio.h and it seemed to work.
make install
does not work in Ubuntu 16.04
I used this guide to install http://stackoverflow.com/questions/32597316/serving-markdown-from-apache-2-4-7-on-ubuntu
as title.
I am attempting to build on OpenBSD (5.5) but the module
keyword on line 48 of mod_markdown.c
doesn't appear to be recognised by gcc
(version 4.2.1). I know nothing about apache module development but I tried apxs
to no avail. Any hints?
Can you make this package available via homebrew? Alternate instructions given that apt-get is not available on the Mac might be helpful.
The following steps can help one get closer to a working implementation on MacOSX however I am seeing an error as noted below.
Using Homebrew and Terminal on El Capitan 10.11.6.
Preliminary requirements:
brew install autoreconf
brew install automake
brew install discount
Commands using specific paths on 10.11.6:
autoreconf -f -i
./configure --with-apxs=/usr/sbin/apxs --with-discount=/usr/local --includedir /usr/include/apr-1
make -I /usr/include/apr-1
make install*
.libs/libmodmarkdown.so', needed by
install'. Stop.My working directory contains:
AUTHORS config.status
COPYING config.sub
ChangeLog configure
INSTALL configure.ac
Makefile depcomp
Makefile.am install-sh
Makefile.in libmodmarkdown.la
NEWS libmodmarkdown_la-mod_markdown.lo
README.md libmodmarkdown_la-mod_markdown.o
aclocal.m4 libtool
autom4te.cache ltmain.sh
compile m4
config.guess missing
config.h mod_markdown.c
config.h.in stamp-h1
config.log
When I cd .libs, that directory contains
libmodmarkdown.0.dylib libmodmarkdown.la
libmodmarkdown.a libmodmarkdown.lai
libmodmarkdown.dylib libmodmarkdown_la-mod_markdown.o
I don't know if it does not work with mpm_worker, but I think it simply does nothing.
It downloads the index.md file
According to the W3C HTML(4) specification:
Every HTML document **must** have a TITLE element in the HEAD section.
Patch is coming
XHTML 1.0 Strict not always be the desired Doctype to use with the content, please allow user to select which Doctype to be used.
Hi, having trouble building this on debian. I get this error:
root@tor-web-01:~/apache-mod-markdown# make
/usr/bin/apxs -c -I/usr/local/include -L/usr/local/lib -lmarkdown mod_markdown.c
/usr/share/apr-1.0/build/libtool --mode=compile --tag=disable-static x86_64-linux-gnu-gcc -prefer-pic -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/local/include -c -o mod_markdown.lo mod_markdown.c && touch mod_markdown.slo
libtool: compile: x86_64-linux-gnu-gcc -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/local/include -c mod_markdown.c -fPIC -DPIC -o .libs/mod_markdown.o
/usr/share/apr-1.0/build/libtool --mode=link --tag=disable-static x86_64-linux-gnu-gcc -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -o mod_markdown.la -L/usr/local/lib -lmarkdown -rpath /usr/lib/apache2/modules -module -avoid-version mod_markdown.lo
libtool: link: x86_64-linux-gnu-gcc -shared -fPIC -DPIC .libs/mod_markdown.o -L/usr/local/lib -lmarkdown -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-soname -Wl,mod_markdown.so -o .libs/mod_markdown.so
/usr/bin/ld: /usr/local/lib/libmarkdown.a(mkdio.o): relocation R_X86_64_PC32 against symbol `__mkd_io_strget' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmarkdown.a(markdown.o): relocation R_X86_64_PC32 against symbol `__mkd_footsort' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libmarkdown.a(tags.o): relocation R_X86_64_PC32 against symbol `extratags' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make: *** [Makefile:702: mod_markdown.la] Error 1
Let me know if there's any testing you need me to do, or anything I could try to fix this if it's an issue with my system (though I doubt it, as this happens on a clean install as well).
It would be nice if you could add apache-mod-markdown-1.0.1.tar.gz
to the release name. At the moment is it just 1.0.1.tar.gz
and a common name would be easier for downstream packagers like me.
checkboxes are not rendered nicely
e.g.:
- [X] item 1
- [ ] item 2
- [x] item 3
is rendered as
but should be rendered as:
or
Or is this an issue with discount? If so, I'll open the issue there. ;-)
$ markdown --version ↑
markdown: discount (main)2.2.7b
$ uname -a ↑
Linux xxx 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_
64 GNU/Linux
$ ./configure --with-apxs=/usr/bin/apxs --with-discount=/usr/local
...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
$ make ↑
/usr/bin/apxs -c -I/usr/local/include -L/usr/local/lib -lmarkdown mod_markdown.c
/usr/share/apr-1.0/build/libtool --mode=compile --tag=disable-static x86_64-linux-gnu-gcc -prefer-p
ic -pipe -g -O2 -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-securi
ty -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apache2 -
I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/local/include -c -o mod_markdo
wn.lo mod_markdown.c && touch mod_markdown.slo
libtool: compile: x86_64-linux-gnu-gcc -pipe -g -O2 -flto=auto -ffat-lto-objects -fstack-protector-
strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_
SOURCE -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/lo
cal/include -c mod_markdown.c -fPIC -DPIC -o .libs/mod_markdown.o
/usr/share/apr-1.0/build/libtool --mode=link --tag=disable-static x86_64-linux-gnu-gcc -Wl,--as-nee
ded -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o mod_markdown
.la -L/usr/local/lib -lmarkdown -rpath /usr/lib/apache2/modules -module -avoid-version mod_markd
own.lo
libtool: link: x86_64-linux-gnu-gcc -shared -fPIC -DPIC .libs/mod_markdown.o -L/usr/local/lib -l
markdown -Wl,--as-needed -Wl,-Bsymbolic-functions -flto=auto -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,
-soname -Wl,mod_markdown.so -o .libs/mod_markdown.so
/usr/bin/ld: /usr/local/lib/libmarkdown.a(tags.o): warning: relocation against `extratags' in read-o
nly section `.text'
/usr/bin/ld: /usr/local/lib/libmarkdown.a(tags.o): relocation R_X86_64_PC32 against symbol `extratag
s' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
Page: https://sites.ind.ntou.edu.tw/
Source: https://github.com/ntouind/sites.ind.ntou.edu.tw/blob/master/README.markdown
The output page doesn't contain any <title> elements.
I noticed that in mod_markdown.c the title has been handled but somehow not worked properly
title = mkd_doc_title(doc);
if (title) {
ap_rprintf(r, "<title>%s</title>\n", title);
}
I'm currently using 1.0.3
Hello,
I had a problem building on Debian Jessie :
--8<-----------------------------------------------------------------------------
$ make
make all-am
make[1]: Entering directory '/home/casa/tmp/apache-mod-markdown-1.0.2'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -D_LARGEFILE64_SOURCE -Wall /usr/bin/apxs2 -q CFLAGS
-I/usr/bin/apxs2 -q INCLUDEDIR
-I/usr/include -g -O2 -MT libmodmarkdown_la-mod_markdown.lo -MD -MP -MF .deps/libmodmarkdown_la-mod_markdown.Tpo -c -o libmodmarkdown_la-mod_markdown.lo test -f 'mod_markdown.c' || echo './'
mod_markdown.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -D_LARGEFILE64_SOURCE -Wall -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/apache2 -I/usr/include -g -O2 -MT libmodmarkdown_la-mod_markdown.lo -MD -MP -MF .deps/libmodmarkdown_la-mod_markdown.Tpo -c mod_markdown.c -fPIC -DPIC -o .libs/libmodmarkdown_la-mod_markdown.o
In file included from /usr/include/apache2/ap_config.h:25:0,
from /usr/include/apache2/httpd.h:44,
from mod_markdown.c:40:
/usr/include/apache2/ap_hooks.h:39:17: fatal error: apr.h: No such file or directory
#include "apr.h"
^
compilation terminated.
Makefile:463: recipe for target 'libmodmarkdown_la-mod_markdown.lo' failed
make[1]: *** [libmodmarkdown_la-mod_markdown.lo] Error 1
make[1]: Leaving directory '/home/casa/tmp/apache-mod-markdown-1.0.2'
Makefile:341: recipe for target 'all' failed
make: *** [all] Error 2
--8<-----------------------------------------------------------------------------
I fixed the issue editing Makefile and replacing :
--8<-----------------------------------------------------------------------------
apache_CFLAGS = /usr/bin/apxs2 -q CFLAGS
-I/usr/bin/apxs2 -q INCLUDEDIR
--8<-----------------------------------------------------------------------------
with:
--8<-----------------------------------------------------------------------------
apache_CFLAGS = /usr/bin/apxs2 -q CFLAGS
-I/usr/bin/apxs2 -q INCLUDEDIR
-I/usr/include/apr-1.0
--8<-----------------------------------------------------------------------------
This fixed the problem, but I am sure this is not the right way ;o)
The module seems to support Tables of Contents (with the option MKD_TOC enabled by default), but I can't generate any. I have tried [toc]
and <!-- toc -->
, with all combinations of upper and lower cases, but no TOC is generated...
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.