Site logo

Archived topic

Table of contents Google docs transfer issue

7 replies · Started by Taylor on April 20, 2022

Viewing posts 1–8 of 8

Hello,

I just transferred my entire blog post over from google docs into WordPress including the table of contents, and I'm trying to figure out how I can get it to resemble the way it looks in Google docs. Any chance this is possible? Or is there other tweakings that I need to do? Thanks for any and all help!

-Taylor

Hi there,

i don't think theres an automatic way to do that.
If you can share a link to the site where i can see the ToC - then i can see what its doing and advise?
But it may require manually rebuilding

Sorry, I should have specified that I'm trying to get the table of contents to look in WordPress how it looks in Google Docs. The spacing and everything just look way off. Here's a link to my very rough draft site page where you can see the table of contents that I transferred over. Thanks! https://snugsensations.com/?p=1718&preview=true#bad-smells

That URL is a preview link which can only be viewed if you're logged in as an admin.
Can you publish the page or provide jus with a login ?

You can use the Private Information field to share any details

Hi Taylor,

You can try Grouping the Paragraph Blocks meant for you TOC in one Container Block(if you have GenerateBlocks) or a WordPress Group Block as such, and then add custom class my-toc to the Container/Group Block.

Example: https://share.getcloudapp.com/p9u6BLjW

Then add this CSS in Appearance > Customize > Additional CSS:

.my-toc p {
    border-top: solid 1px rgb(50,50,50);
    border-right: solid 1px rgb(50,50,50);
    border-left: solid 1px rgb(50,50,50);
    margin-bottom:0;
}

.my-toc p:last-child {
    border-bottom: solid 1px rgb(50,50,50);
}

Kindly modify the values to your preference.

Side note: If you’re using GenerateBlocks, you can set borders to Headline Blocks/Container Blocks, and use Grid Blocks to easily create a TOC which looks like one from Google Docs.

See: https://docs.generateblocks.com/article/headline-overview/

Also see: https://docs.generateblocks.com/article/container-overview/

Hope this helps! Kindly let us know if further assistance is needed. :)

Hello and thanks for your help. I tried grouping the paragraphs together in a block and then putting in the custom class and CSS, but the TOC looks very unappealing for my website. I'm also extremely new at using GenerateBlocks, so modifying CSS to my preference is difficult because I don't know what some of those values mean and how to really modify it to make it look how I want to. I also don't really understand how to create a TOC by setting borders and using grid blocks and all of that, because again this is all just very new technology for me. But I am willing to learn so if there are any more detailed tips you can give a newbie like myself on how to make this TOC look good and professional on my blog, I would greatly appreciate it!

If you would like to learn about borders, here is a good article you may refer to: https://developer.mozilla.org/en-US/docs/Web/CSS/border

The Block you were using was a Paragraph Block which is core WordPress Block If you opt to use GenerateBlocks’ Headline Block, you’ll be able to easily modify its border without the need for custom code.

See this for reference: https://docs.generateblocks.com/article/headline-overview/

Now, with regards to TOC, a third party can also be used to generate one.

Here is the repository of WordPress for such plugins: https://wordpress.org/plugins/search/table+of+contents/

Maybe, an article like this might also help: https://www.wpbeginner.com/plugins/how-to-create-a-table-of-content-in-wordpress-posts-and-pages/

Basically, you can create one manually through GenerateBlocks blocks or use a third party plugin.

This article might also be helpful if you would want to create one manually: https://docs.generatepress.com/article/smooth-scroll/

Hope this helps! Kindly let us know if further assistance regarding this is needed, and we’ll do our best to assist. :)

This archived topic is closed to new replies.