How to add table of content to Wix blog

Updated: Jan 15

Wix is a very popular website builder. It is used by over 100 million people across 190 different countries. Today we will share how to add a table of content to Wix blog by python code.

add table of content to Wix blog

How to add a table of content to Wix blog?

  • curl website link > filename

  curl https://www.howtouselinux.com/post/15-linux-multipath-examples-for-linux-admin >howtouselinux
  • python code to get the title id and title name automatically

#-*-coding:utf-8-*-
from bs4 import BeautifulSoup
soup = BeautifulSoup(open('howtouselinux'),'html.parser')
for i in   soup.find_all('h3') :
     id=i['id']
     print '<li><a style="font-family: Lora regular; font-size: 18px; font-weight: 400; line-height: 1.7;text-decoration: none;" href="#' + id + '" rel="noonpener" target="_parent">' + i.string + '</a></li>'
  • copy the command output to wix blog

<li><a style="font-family: Lora regular; font-size: 18px; font-weight: 400; line-height: 1.7;text-decoration: none;" href="#viewer-ef142" rel="noonpener" target="_parent">Flush/Remove all the multipath device on Linux</a></li>
<li><a style="font-family: Lora regular; font-size: 18px; font-weight: 400; line-height: 1.7;text-decoration: none;" href="#viewer-b8ckg" rel="noonpener" target="_parent">Flush/Remove selected multipath device</a></li>
<li><a style="font-family: Lora regular; font-size: 18px; font-weight: 400; line-height: 1.7;text-decoration: none;" href="#viewer-79qhh" rel="noonpener" target="_parent">Show the existing multipath configuration in detail on Linux</a></li>
<li><a style="font-family: Lora regular; font-size: 18px; font-weight: 400; line-height: 1.7;text-decoration: none;" href="#viewer-5qhmr" rel="noonpener" target="_parent">How to Get complete HBA details on Linux</a></li>
  • add the output to wix blog

Then you can get a table of content for your link.


Example in this post:

15 Linux multipath examples for Linux admin


53 views

Join our mail group. Get a free Linux account on Cloud.

Never miss a post!

Want a free Linux account?  This account can be used to login to our cloud server and practice Linux commands.

 
kamateravps.gif
topbackgroud.png

✔ Linux Commands   ✔ Linux Skills    ✔ LinuxPerformance   ✔ Linux Interview

Some articles are from the public internet. If you find your article misused or undesired here and you don't want us to display it, please let us know and we'll remove it immediately.