Closed VaibhavSys closed 2 years ago
Sorry for the late reply.
~There is no good solution so far~, but it still can be fixed by overriding the copyright partial:
$ mkdir -p layouts/partials/post/panel
$ touch layouts/partials/post/panel/copyright.html
// layouts/partials/post/panel/copyright.html
<a class="action" data-bs-container="body" data-bs-toggle="popover" data-bs-html="true" data-bs-placement="bottom"
data-bs-trigger="focus" tabindex="0" type="button" aria-label="Copyright"
data-bs-content="MIT LICENSE">
<i class="fas fa-fw fa-copyright"></i>
</a>
And then restart the Hugo server for previewing.
I created two hooks for customizing panel actions, which called post-panel-begin and post-panel-end.
Now you can solve it by creating a hook:
// layouts/partials/hooks/post-panel-end.html
<a class="action" data-bs-container="body" data-bs-toggle="popover" data-bs-html="true" data-bs-placement="bottom"
data-bs-trigger="focus" tabindex="0" type="button" aria-label="Copyright"
data-bs-content="MIT LICENSE">
<i class="fas fa-fw fa-copyright"></i>
</a>
This feature was introduced by the latest commit, you'll need to upgrade the theme.
Hey!
Thank you for the reply, After doing what you said in the first comment, it did show MIT Licence but it is showing the path above the button as shown down below.
I was trying to do what you said in the second comment so I looked at the upgrade guide for your theme, but when I tried to fetch the repo the directory is inside another git repo (my own repo).git fetch
, it said that it isn't a repo,
So I thought of creating a git repo adding a remote origin of this git repo there and continue, but git didn't allow me to create a repo there so I deleted that directory, cloned this repo again, and ran the server again, it is showing MIT Licence there now too but it is worse now, let me attach a picture below.
How to fix it? (btw liked that you put the menu button on the right along with other buttons)
// layouts/partials/post/panel/copyright.html
is a comment, delete this line, and it will work as expected.
// layouts/partials/hooks/post-panel-end.html
is also a comment, you'll need to delete it.
It is slightly strange, git fetch
works fine with submodule, how do you install this theme? git clone ...
or git submodule add ...
Kind remind: the second solution is recommended, please delete the layouts/partials/post/panel/copyright.html
of first solution.
I removed the comment and it was changed but still messed up, but then I upgraded the theme again but this time by the method listed on your repo as the theme directory has info about the repo now, it is fine now.
Thanks alot for this theme and helping me!
Kind remind: the second solution is recommended, please delete the
layouts/partials/post/panel/copyright.html
of first solution.
I did this and it shows the creative commons license again, should I add it back? Will it affect my site negatively?
Latest Update
This is my repo: https://gitlab.com/AnonymousDebug/cyborgstation-website
Website: https://www.cyborgstation.tk
I took a close look at the source code, found that the theme does not upgrade to the latest version yet. Please try to upgrade the theme as the instructions shown.
After the git add themes/hugo-theme-bootstrap
, when I try to commit it says:
`On branch main Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean`
there isnt anything to push either.
It was all fixed till I deleted copyright.html https://gitlab.com/AnonymousDebug/cyborgstation-website/-/commit/4f44af7469e415cc08908f0d892ad1aacbd06c52
But got messed up after deleting it https://gitlab.com/AnonymousDebug/cyborgstation-website/-/commit/740462d7c1e347a867c9b4121f2eeadc4af31bf0
I fork your repo and make some changes, https://gitlab.com/razonyang/cyborgstation-website, it works fine now.
Np.
I fork your repo and make some changes, https://gitlab.com/razonyang/cyborgstation-website, it works fine now.
I cloned your repo and tried it locally, blank white screen is shown and I get this error message in the console
Please follow the instruction to initialize the submodule: https://github.com/razonyang/hugo-theme-bootstrap#note
To merge from your repo, pipline needs to run successfully but I am blocked from gitlab pipeline. I invited you to be a maintainer.
I ran your code locally after that and its showing this
Please follow the instruction to initialize the submodule: https://github.com/razonyang/hugo-theme-bootstrap#note
(Need to go rn)
.gitlab-ci.yml
, You can merge the PR now. Thanks for creating it for me! And btw it is still like the picture I sent above, isnt there a way to make it look like it was looking before (https://gitlab.com/AnonymousDebug/cyborgstation-website/-/commit/4f44af7469e415cc08908f0d892ad1aacbd06c52)
but you said to remove the copyright.html and after that its looking like the picture I uploaded before, and I do not like that look, if I add that back, will it harm my site? or is it safe?
Also yes I did add the expiration date
Hmm, it is a matter of taste. Which one do you like?
BTW, style won't harm your site.
Hmm, it is a matter of taste. Which one do you like?
BTW, style won't harm your site.
Tbh, none of those. I would like em both if they were INSIDE the box, but they are half in and half out and that triggers me a bit lol. ig mine would be:
So that means that I can switch to the previous revision if it wont harm my site, right?
Yep, you can customize it via assets/css/custom.css:
.post-panel {
right: -.35rem!important;
box-shadow: none!important;
border-radius: 0!important;
}
.post-panel .action {
border-bottom: none!important;
padding: 0!important;
}
Yep, you can customize it via assets/css/custom.css:
.post-panel { right: -.35rem!important; box-shadow: none!important; border-radius: 0!important; } .post-panel .action { border-bottom: none!important; padding: 0!important; }
Copyright button was like: Aight, I amma head ou t.
Also, I tried reverting changes to the revision I liked and worked for me, but I get errors about merges, I searched about it but was unsuccessful and I tried to revert the merge but it failed, do you know how to do it?
Revision: 4f44af7469e415cc08908f0d892ad1aacbd06c52
After the merge, it is messed.
You deleted the main files in the fork and made a merge request and I didn't check it nor did I made another branch, do you have a backup of the fork or smth? I had one but I deleted it....
It is easy to revert it:
$ git log --pretty=oneline -10
87daacc691be6ae09b445586a2fa930543e6472e (HEAD -> main, origin/main, origin/HEAD) Create .gitlab-ci.yml
a2702408d931f9d3cb28069b6dcafaaa80a38f89 Disable creative commons
d6dcdbe266cea8ba52079bce221a5c29a5f931fc Install theme via submodule
00de3432ca945898376582edc2b30db01f66ee01 Remove themes
740462d7c1e347a867c9b4121f2eeadc4af31bf0 Fixed issues
4f44af7469e415cc08908f0d892ad1aacbd06c52 Fixed issues
02a893813e436aee5781df619e94efe37d3af26c Fixed issues
6a15801b43c6da4541268aa3bab1c4d94bfa6d89 Fixed issues
9af09421e1cbd59dfcad8a7f7b96034823cee395 Upgrade the theme
fe5abb8cbc58e4c9cb24e4e71289fbdb47dd6e1e Upgraded the theme
And then reset the head. For example, 740462d7c1e347a867c9b4121f2eeadc4af31bf0
$ git reset --hard 740462d7c1e347a867c9b4121f2eeadc4af31bf0
Finally, force push to the remote.
Please keep in mind that it is a dangerous action, please double check whether the revert is done.
$ git push origin main -f
It is easy to revert it:
$ git log --pretty=oneline -10 87daacc691be6ae09b445586a2fa930543e6472e (HEAD -> main, origin/main, origin/HEAD) Create .gitlab-ci.yml a2702408d931f9d3cb28069b6dcafaaa80a38f89 Disable creative commons d6dcdbe266cea8ba52079bce221a5c29a5f931fc Install theme via submodule 00de3432ca945898376582edc2b30db01f66ee01 Remove themes 740462d7c1e347a867c9b4121f2eeadc4af31bf0 Fixed issues 4f44af7469e415cc08908f0d892ad1aacbd06c52 Fixed issues 02a893813e436aee5781df619e94efe37d3af26c Fixed issues 6a15801b43c6da4541268aa3bab1c4d94bfa6d89 Fixed issues 9af09421e1cbd59dfcad8a7f7b96034823cee395 Upgrade the theme fe5abb8cbc58e4c9cb24e4e71289fbdb47dd6e1e Upgraded the theme
And then reset the head. For example,
740462d7c1e347a867c9b4121f2eeadc4af31bf0
$ git reset --hard 740462d7c1e347a867c9b4121f2eeadc4af31bf0
Finally, force push to the remote.
Please keep in mind that it is a dangerous action, please double check whether the revert is done.
$ git push origin main -f
Thanks a ton! I thought I done goofed lol because I was supposed to merge it into a separate branch before. Anyways the problem is solved now and the website is looking how I want, also why is there an RSS in the socials? Before this copyright thing, it was there too but it isn't in the socials config file, it redirects to a non-existent page. How can it be removed?
If you don't need it, you can remove it by deleting "RSS" item from the config.toml
[outputs]
home = ["HTML", "RSS", "JSON"] // Delete the RSS
Did it, thanks!
Hey! So I wanted to change the copyright button which appears on the right of every post (like in the about post) to show the MIT license, I wanted to license it under the MIT license instead of the creative commons license.
Please help me!