-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reload inconsistency when updating frontmatter #1068
Conversation
The header, footer and navigation frontmatter for the minimal and default site templates are empty. This causes inconsistent reloading when the frontmatter is changed (#1001). Here we populate said frontmatter.
@Parcly-Taxel could we also add this to the Page.prototype.collectAllPageSections = function () {
+ this.pageSectionsHtml = {}; // This resets the pageSectionsHTML whenever we collect.
this.collectPageSection('header');
this.collectPageSection(`#${SITE_NAV_ID}`);
this.collectPageSection('footer');
}; This ensures that each reload always reset the pageSections and reduce the dependency on how templates are created which could potentially be crowd-sourced. While you're at it, could you also add Thanks for your contribution! |
@crphang done, but @ang-zeyu said in #1035 to "go the other way", i.e. "add |
You could do both #1001 (comment) :) The fix I suggested was merely to remove |
@ang-zeyu yes, can we merge this now, since I have done both? |
Looks good to me 👍 I don't have merging powers here though, you'd have to wait for a maintainer to merge this in! |
Can't you approve it first? |
…nvert-to-code-block * 'master' of https://github.com/MarkBind/markbind: Allow changing parameter properties (MarkBind#1075) Custom timezone for built-in timestamp (MarkBind#1073) Fix reload inconsistency when updating frontmatter (MarkBind#1068) Implement an api to ignore content in certain tags (MarkBind#1047) Enable AppVeyor CI (MarkBind#1040) Add heading and line highlighting to code blocks (MarkBind#1034) Add dividers and fix bug in siteNav (MarkBind#1063) Fixed navbar no longer covers modals (MarkBind#1070) Add copy code-block plugin (MarkBind#1043) Render plugins on dynamic resources (MarkBind#1051) Documentation for Implement no-* attributes for <box> (MarkBind#1042) Migrate to bootstrap-vue popovers (MarkBind#1033) Refactor preprocess and url processing functions (MarkBind#1026) Add pageNav to Using Plugins Page (MarkBind#1062) # Conflicts: # docs/userGuide/syntax/siteNavigationMenus.mbdf
* 'master' of https://github.com/MarkBind/markbind: 2.12.0 Update outdated test files Update vue-strap version to v2.0.1-markbind.37 Fix refactor to processDynamicResources (MarkBind#1092) Implement lazy page building for markbind serve (MarkBind#1038) Add warnings for conflicting/deprecated component attribs (MarkBind#1057) Allow changing parameter properties (MarkBind#1075) Custom timezone for built-in timestamp (MarkBind#1073) Fix reload inconsistency when updating frontmatter (MarkBind#1068) Implement an api to ignore content in certain tags (MarkBind#1047) Enable AppVeyor CI (MarkBind#1040) Add heading and line highlighting to code blocks (MarkBind#1034) Add dividers and fix bug in siteNav (MarkBind#1063) Fixed navbar no longer covers modals (MarkBind#1070) Add copy code-block plugin (MarkBind#1043) Render plugins on dynamic resources (MarkBind#1051) Documentation for Implement no-* attributes for <box> (MarkBind#1042) Migrate to bootstrap-vue popovers (MarkBind#1033) Refactor preprocess and url processing functions (MarkBind#1026) Add pageNav to Using Plugins Page (MarkBind#1062)
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [X] Bug fix
What is the rationale for this request?
See proposed commit message below. This fixes #1001.
What changes did you make? (Give an overview)
The frontmatter files for the site templates are populated.
Is there anything you'd like reviewers to focus on?
This is just #1035 reopened, with proper branch management on my part, following advice from @ang-zeyu.
Testing instructions:
See topic opener for #1001.
Proposed commit message: (wrap lines at 72 characters)
Fix reload inconsistency when updating frontmatter
The header, footer and navigation frontmatter for the minimal and
default site templates are empty. This causes inconsistent reloading
when the frontmatter is changed (#1001). Here we populate said
frontmatter.