Skip to content

Commit

Permalink
Add support locale config for remark42
Browse files Browse the repository at this point in the history
  • Loading branch information
Mavrin authored and umputun committed Mar 7, 2020
1 parent 375ab9d commit 19d507f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ publisher/utils/eyeD3/*.pyc
*.code-workspace
.env
.DS_Store
publisher/target/
publisher/target/
.idea
3 changes: 3 additions & 0 deletions hugo/src/js/components/remark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type Props = {
id?: string;
className?: string;
theme?: RemarkTheme;
locale: string;
};

export default class Remark extends Component<Props> {
Expand Down Expand Up @@ -56,11 +57,13 @@ export default class Remark extends Component<Props> {
page_title: string;
url?: string;
theme: RemarkTheme;
locale: string,
} = {
baseurl: this.props.baseurl || "https://remark42.radio-t.com",
site_id: this.props.site_id,
page_title: this.props.page_title,
theme: this.props.theme || "light",
locale: this.props.locale,
};

if (!remark_config.site_id) {
Expand Down
1 change: 1 addition & 0 deletions hugo/src/js/controllers/comments_embed_controller.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default class extends Controller {
url={'https://radio-t.com' + location.pathname}
page_title={window.remark_config.page_title}
theme={theme}
locale={window.remark_config.locale}
/>), this.element);
}

Expand Down

0 comments on commit 19d507f

Please sign in to comment.