Skip to content
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

Hyvor talk support and use local packages for Grunt #214

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Givemeurcookies
Copy link
Contributor

Found some time to make more consistent indents and removes mixing of tab/spaces in post.hbs (will be blocked by #212) This is only a style change and doesn't otherwise change any logic.

Also added an alternative fix for the Disqus bug by replacing the variable name in package.json. The other Disqus bug fix can be found at: #212

@Givemeurcookies
Copy link
Contributor Author

Also added grunt commands to package.json

A few notes on this:

  • The project can be built without having grunt installed globally, this let's you use an isolated shell script (such as nix-shell which has some extra setup in order to install global packages) to build and compress projects.
  • Currently Grunt is defined in devDependencies. Running npm install will install grunt locally in the project. However the current instructions runs Grunt globally instead of the local package version.
  • Less install instructions. You can simply run npm install and you're off to the races.
  • You can still use Grunt globally to build/compress if you so wish.

Sorry about the combined pull requests, I can branch them off if it's desired.

@Givemeurcookies Givemeurcookies changed the title More consistent indents in the post template + fixing wrong Disqus variable in package.json ost template refactor, Feb 16, 2022
@Givemeurcookies Givemeurcookies changed the title ost template refactor, Post template refactor, added Hyvor talk support, wrong disqus variable bug Feb 16, 2022
@Givemeurcookies
Copy link
Contributor Author

Added Hyvor talk support for comments, had to refactor post.hbs. The refactor is based upon handlebars logic instead of CSS being set to display:none and using JS to change classes.

The Hyvor talk implementation has support for dark/light theme which is dynamically set based upon custom.color_scheme (dark when browser theme is set to dark or when theme is set to dark) and uses the darkmode_accent_color for comment section color accent.

I also went back and implemented the other pull request for wrong Disqus bug as that seems like the correct fix. I can fix the collision upstream after #212 has been merged with master project.

@Givemeurcookies Givemeurcookies changed the title Post template refactor, added Hyvor talk support, wrong disqus variable bug Hyvor talk support and use local packages for Grunt Feb 16, 2022
@Givemeurcookies
Copy link
Contributor Author

The collisions are fixed and it's ready to be merged.

As a conclusion to changes made:

  • Added grunt commands to npm package.
  • Refactored the comment section of post template to use template engine instead of switching classes with Javascript.
  • Added Hyvor talk with dark theme support.
  • Fixed whitespacing for the post template so it is a bit more readable.
  • Updated README.md to reflect changes.
  • Bumped version from 3.4.0 to 3.5.0

I also manually tested the implementation, the install instructions works using a fresh install. Adding hyvor talk website id adds Hyvor talk (unless Disqus is defined, Disqus currently takes priority over Hyvor talk) to the posts. Disqus also works. Both theme preview and live site works with the two commenting systems.

Please give me a heads up if the pull request is too big or the changes aren't desired!

@zutrinken
Copy link
Owner

Hi, Thanks for your PR! The package changes look quite interesting. Can you create a dedicated PR for that? Hyvor I'd skip, since this service doesn't provide a free option and this theme is all about being open.

@Givemeurcookies
Copy link
Contributor Author

Givemeurcookies commented Feb 17, 2022

Hi, Thanks for your PR! The package changes look quite interesting. Can you create a dedicated PR for that? Hyvor I'd skip, since this service doesn't provide a free option and this theme is all about being open.

Sure! I can make it into a dedicated PR.

Related to the commenting system, Disqus is selling personal data to advertisers so technically Disqus isn't free or open either. Hyvor is just using a different business model and are more focused on privacy. I can understand the reasoning though, I just made the implementation due to already using Hyvor on my own sites.

The changes I made are fairly generic so it should be easy to switch out or add other commenting systems. Are you more open towards systems such as commento? They're offering both a cloud hosting solution and self-hosting. The code is open sourced. If there's any interest I can branch out Hyvor and maintain that in my own repository and instead make the pull request using a open source embedded commenting platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants