Thanks for the replies. On 7/17/22 7:36 PM, Steve Williams wrote:
On 7/17/2022 6:29 PM, Gary Aitken wrote:Can anyone point me at a resource for help getting apache2 to display Markdown (.md) files as translated to html?I did that awhile back: https://sbw.org/mdhandler/
So... I'm trying to either write a mod_xxx, or get mod_markdown from https://github.com/hamano/apache-mod-markdown to work. I'm totally unskilled in this area, so am trying to get some logging to see what's actually being called. I'm trying to register two modules with the server: mod_markdown mod_commonmark When I bounce the server, I see the following: [markdown:debug] [pid 26801:tid 140068510301120] mod_markdown.c(738): markdown_hook_check_config: markdown_conf found? true which is printed from an ap_log_error call in markdown_hook_check_config. However, I see no similar line for commonmark, which has a similar call in its commonmark_hook_check_config. There is no output for either in errors.log. mod_commonmark register_hooks: static void register_hooks(apr_pool_t *pool) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, "mod_commonmark:register_hooks"); (void)pool; ap_hook_check_config(commonmark_hook_check_config, NULL, NULL, APR_HOOK_LAST); ap_hook_handler(commonmark_handler, NULL, NULL, APR_HOOK_LAST); } static int commonmark_hook_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { (void)pconf; (void)plog; (void)ptemp; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "commonmark_hook_check_config called"); return OK; } commonmark.load in apache2/mods-available looks like: LoadModule commonmark_module /usr/lib/apache2/modules/mod_commonmark.so with a symlink in mods-enabled. apache2.conf contains: LogLevel warn commonmark:debug markdown:debug mysite.conf in apache2/sites-available contains: AddHandler markdown .md AddHandler commonmark .md inside the virtual host definition. It feels like something is not working in the early mod_commonmark loading process, but I haven't a clue how to debug this. Any hints would be much appreciated. Thanks, Gary --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx