kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
867 stars 130 forks source link

Fix auto menu weight calculation during "all subtrees" exports #643

Closed kaushalmodi closed 2 years ago

kaushalmodi commented 2 years ago

The fix is to correct the order of when the subtree post's menu weight is calculated.

  1. First the subtree post's location is found in the original buffer and weight calculated based off that.
  2. Then the buffer is pre-processed and export is done using that.

Fixes https://github.com/kaushalmodi/ox-hugo/issues/642.