How is the best way to debug a problem -- e.g. changing default heading level in posts?

7 views
Skip to first unread message

cweber

unread,
Jun 8, 2018, 11:24:03 AM6/8/18
to nikola-discuss
I've tried to use the options in conf.py to change the default heading level, including various combination of: 

PANDOC_OPTIONS = ['--base-header-level=2']

and 

DEMOTE_HEADERS = 2

I can see that these are picked up in the conf.cpython-36.pyc file in __pycache__. Yet in the index.html file for a post I always get: 

<article class="post-text h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article"><header><h1 class="p-name entry-title" itemprop="headline name"><a href="." class="u-url">Test</a></h1>

I've tried using: 

nikola clean 

with various options, including -a and -c, and followed this with 

nikola build 

with and without the -a option. 

I'm running nikola v8.0.0b2 on OSX, in a conda environment with python 3.6. I don't think I installed this with the "extras" option.  

Any suggestions for next steps? 

Roberto Alsina

unread,
Jun 8, 2018, 1:16:47 PM6/8/18
to nikola-...@googlegroups.com
In that specific case:

1. The output of pandoc should be in the cache folder untouched, that means you can see if the pandoc option is doing what you expect.


What I would do is just stick a pdb.set_trace() there and see what's happening :-)

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Warrick

unread,
Jun 8, 2018, 1:20:23 PM6/8/18
to Nikola—Discuss
1a. Perhaps try deleting that cache file and rebuilding, perhaps the options are not dependencies for a Pandoc build.
2a. I believe Pandoc has DEMOTE_HEADERS support disabled.

--
Chris Warrick <https://chriswarrick.com/>
Reply all
Reply to author
Forward
0 new messages