-
Notifications
You must be signed in to change notification settings - Fork 188
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 a table of contents to the blog posts #10
Conversation
I just realized I edited the css directly instead of through stylus (never heard of it before 😅). Do you want me to change that? I see that this is a question you ask in Issue #2 but I don't know how to answer, web development is not my thing and I haven't been initated to any of the shiny stuff with their bells and whistles :) |
Hmmm. I would definitely prefer not touching the However, the asset pipeline for this project has not been implemented fully since I transitioned my site to a theme. Tomorrow I will spend some time thinking about how to get that up and running. I'll document how to edit the styles in a That would be a blocker for this PR. |
OK, thanks! |
Hey @xvallspl, I updated the asset pipeline in a PR earlier this morning. I also added a Here's the rundown for css:
A good suggestion for developing this theme is to:
NOTE: The static directory is not playing nice with |
Thanks! |
From what I can see, the reason why git is marking them as modified is because they are. The files are missing linebreaks now. Why does that happen, I don't know yet 🙃 |
My first thought is that it has something to do with |
Hugo has a ToC document that could be helpful. Not sure if you are using it or not 👍 |
Yes, that's what generates the ToC automatically |
@xvallspl just peeped your site and I love what I'm seeing with the ToC <3 |
73a0f0c
to
0d21e1d
Compare
Thanks! I just reworked the commits so the changes are applied in stylus and not in the css and I added an opt-in parameter to it |
@jakewies I'm not sure having the ToC on mobile is one of my priorities right now. Maybe we can add it as an issue for later or for someone to take. As for making everything prettier, can I ask for your help? In that case we could merge as soon as you are happy with the changes and I applied your feedback |
Agreed. We can hide on mobile for now. I’ll def help out where needed. Let me know when you’ve wrapped up your work on this branch and I’ll hop in. |
You can hop in now if you want |
43a7f17
to
ed38dd6
Compare
Somewhat painfully rebased to the new layout structure. |
Sorry about that! 😅 @kentnek is making some changes to the asset pipeline. We'll be switching away from stylus. It'll be good for this project in the long run, but I know it puts some strain on your work for the moment. We'll get this feature in the project soon though. I think it will be a great addition! |
I actually appreciate his changes as I had something like that on the wishlist 😁 |
@xvallspl Sorry I've neglected this PR a bit. What's the status? Is it time for me to hop in and take a look at the styles? |
I'll adapt it to the scss first! |
post pagination was not correctly aligned, which helped see that the structure
I've seen it too. It's buggy for sure. I'm not 100% sold that it's the markdown page but it could be. The ToC is getting |
I know why. It's because of the table in the middle of the page. I've seen websites making tables horizontally scrollable when they're too wide, but I'm not sure how to do that (other than specifying Other than that I think the PR is good to go, what's left is rebasing and adding some docs on the TOC config. |
EDIT: I realized I wasn't putting the value underneath Should we just wipe this option and default to showing the title in the ToC at this point? I feel like the use case is so small that we don't need to support it unless there is enough demand for it. |
The last thing that needs doing, as @kentnek said in his previous post, is to document the usage of the ToC. This is a good time to discuss post frontmatter and general configuration of this theme. I think it's best to be as explicit as possible to avoid confusion, so my proposal is that we update the In my opinion this is a better solution than letting users update post configuration in the site params via The example posts can all be set to |
d7016bf
to
fe4f0f0
Compare
Ok documentation is updated and all that's is to have you guys do a once over on everything before I rebase with master and merge this puppy. |
Oh I actually want to not show the title by default 😆 So I figured just make it an option so that I don't need to override the layout later on. Other than that and the |
@kentnek Yup I have some time this morning to take care of it. I'll handle the conflicts as well. |
73b465b
to
72dfb5e
Compare
@all-contributors please add @xvallspl for code, design |
I've put up a pull request to add @xvallspl! 🎉 |
@jakewies @kentnek Thanks for everything guys! I'm sorry I haven't been able to follow this for the last days. Now I only have a couple of issues with the result: the fact that the post is not centered in the screen (I guess this is by design, as it wasn't before either), and that I see the table of contents conceptually belonging to the post. I find it out of place so far away from the post in a big screen. A couple of screenshots: Although this might be only me, I would like to hear your thoughts on it. |
^ yeah I actually had the idea of moving it a bit closer to the actual contents, so the whole (content - TOC) block is centered instead. Also for mobile the TOC can be right after the main title (or the However I recently found a layout bug that affects contents that are too wide on mobile (and fixed that on my own fork), so I will deal with the TOC again once I finish fixing that. |
Thanks @kentnek ! |
Hey, I noticed that the site param |
Hey @SanchithHegde that would be awesome if you. |
Added a prototype for a post's table of contents
Still missing:
Make it optional
Move changes in css to styles
Maybe make the table of contents available in the menu on mobile? or collapsable?
Improve design (I am not the right person for this)