-
Notifications
You must be signed in to change notification settings - Fork 279
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
Add support for displaying TOC on the side of page #398
Open
koktlzz
wants to merge
7
commits into
reuixiy:main
Choose a base branch
from
koktlzz:master
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are my Goddddd! |
我按照你的来不知道为什么不生效,请问是否有一个可以参考的操作文档呢 |
@Coder-itCheng 我没看到你博客的仓库,所以我也不清楚你怎么改的。可以参考更新 MemE 的方法,不过要把 clone 的仓库链接换成我 fork 的仓库: rm -rf themes/meme
git clone --depth 1 https://github.com/koktlzz/hugo-theme-meme.git themes/meme 最后在 注意这样做的话你之前魔改过的配置就没了,可以先 |
本來也想照這個改,但發現這項改動在手機版會出現重疊的情況,不利於手機版閱讀。 |
这个问题我也考虑过,目前的解决方案是屏幕宽度小于 @media screen and (max-width: $postWidth) {
.contents {
display: none;
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to #64, #368 and #387, many users want to display TOC on the side of their pages. I add a variable called
displayTOConSide
. If it's set tofalse
(by default), the TOC will be displayed on the top of the article; If it's set totrue
, the TOC will be displayed on the side of the article.The
position
of TOC will be set tofixed
ifdisplayTOConSide
is true. Users can DIY their style of TOC(such as on the left or right) by modifingcontents
in _single.scss.