Giter VIP home page Giter VIP logo

apache-mod-markdown's People

Contributors

aheadlead avatar brlin-tw avatar dago avatar ecxod avatar hamano avatar jblond avatar jknoos avatar mattvenn avatar netniv avatar pmhahn avatar softins avatar thibaultduponchelle 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apache-mod-markdown's Issues

Generate a Table of Contents

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...

Cannot build on Debian 10

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).

configure.ac: obsoleted m4s macros

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

Brew support?

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*

  • Generates error --
    make: *** No rule to make target .libs/libmodmarkdown.so', needed byinstall'. 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

Build instructions broken

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.

Hash within Code section

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 
```

should look like:

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 

But actually comes out like:

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

Add mod-markdown to release name

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.

does nothing

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

checklists are not rendered nicely

checkboxes are not rendered nicely

e.g.:

- [X] item 1
- [ ] item 2
- [x] item 3

is rendered as

screen shot 2018-04-17 at 23 15 02

but should be rendered as:

  • item 1
  • item 2
  • item 3

or

screen shot 2018-04-17 at 23 20 41

Or is this an issue with discount? If so, I'll open the issue there. ;-)

Unable to build, Ubuntu 15.04

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

Serving compressed markdown file

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:

  1. Uncompressed (gunzip) by some handler.
  2. Processed by apache-mod-markdown.

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

Some unusual differences between master(7b0eb) and v1.0.3

Hi, I built and installed commit 7b0eb68 and 1.0.3 and notice some unusual differences:

  • In 1.0.3 the built module in installed as /usr/lib/apache2/modules/mod_markdown.so however in commit 7b0eb68 it is /usr/lib/apache2/modules/libmodmarkdown.so instead
  • in 1.0.3 the mod_markdown.so file has -rwxr-xr-x permission instead of -rw-r--r--, not sure if it's same in commit 7b0eb68 though

default

Not sure if it's really an issue or if already fixed, though.

Unable to build on OpenBSD

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?

How to use MarkdownFooterHtml/MarkdownHeaderHtml

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>"

make fails with link error

$ 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

Issue building on Debian Jessie

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)

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.