Skip to content

Commit

Permalink
fix: solve issue with author config option handling (#2tkcfjg)
Browse files Browse the repository at this point in the history
  • Loading branch information
dziudek committed Mar 23, 2023
1 parent ff62a7f commit c678511
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/back-end/builddata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.41.1","build":16201}
{"version":"0.41.1","build":16206}
5 changes: 1 addition & 4 deletions app/back-end/modules/render-html/contexts/author.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,12 @@ class RendererContextAuthor extends RendererContext {
this.prepareData();

let metaRobotsValue = this.siteConfig.advanced.metaRobotsAuthors;
console.log('[AuthContext] ', metaRobotsValue);


if (this.metaRobots !== false) {
metaRobotsValue = this.metaRobots;
console.log('[AuthContext - OWN] ', metaRobotsValue);
}

if (this.siteConfig.advanced.noIndexThisPage) {
console.log('[AuthContext - NOINDEX] ', metaRobotsValue);
metaRobotsValue = 'noindex,nofollow';
}

Expand Down
2 changes: 1 addition & 1 deletion app/back-end/modules/render-html/items/author.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AuthorItem {
prepareData() {
let addIndexHtml = this.renderer.previewMode || this.renderer.siteConfig.advanced.urls.addIndex ? 'index.html' : '';
let authorConfig = this.author.config ? JSON.parse(this.author.config) : {};
let additionalData = this.author.additionalData ? JSON.parse(this.author.additionalData) : {};
let additionalData = this.author.additional_data ? JSON.parse(this.author.additional_data) : {};

this.authorData = {
id: this.authorID,
Expand Down
2 changes: 1 addition & 1 deletion app/back-end/modules/render-html/renderer-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class RendererCache {
name,
username,
config,
additional_data AS additionalData
additional_data
FROM
authors;
`).all();
Expand Down

0 comments on commit c678511

Please sign in to comment.