Automate mkdocs html files build process

At work I needed to find a way of writing a lot of documentation easily and quickly. The system was going to be used by technical and non-technical people.

For this I am current looking at a great project called mkdocs. This is a python program that allows for all documentation to be created in markdown syntax and then built into a flat html website.

Markdown is a text to html processor that has an easy to learn syntax . Markdown files can be created in any text editor. So users can be focused on creating documentation rather than getting distracted.

My idea was to allow all user to create documentation and see the changes instantly on the website. mkdocs has a setting that dynamically shows how your pages will look in a browser while creating the documentation source files.

This works great but I needed to be able to build flat html files and copy them to a web server.

Below is the batch file (windows)
REM Automate the build process of creating a website from mkdocs markdown

REM Change to source drive
X:

REM path to docs site to convert
cd X:\DocSource\admin

REM covert to flat html website (this creates a 'site' folder)
c:\Python27\python.exe c:\Python27\Scripts\mkdocs build

REM copy site to web server folder
xcopy site\* c:\inetpub\wwwroot\admin\* /s /e /y
This can run on a schedule or even could be set up to run when something changes in the document source location.


Comments

AngularJS supports .wrap() jQuery functionality. Here in below examples we can see how to wrap HTML structure around an element.psd to css
Html Pro said…
HTML Pro Team has got an extensive expertise in Design/AI/PSD to Drupal Theme Conversion. HTML Pro is a trusted name among all Drupal development service providers, with a team of 50+ in-house developers; we’re passionate to provide you the most reliable Drupal development services. Our Drupal code meets all the web standards as we deliver W3C valid, SEO semantic, pixel perfect and handwritten markup.
Joe said…

Thanks for sharing this wonderful article. Your article is very interesting to read. Looking forward to read ur future post.
Node JS Training in Chennai
Node JS Course in Chennai
Tangki Fiber said…
You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will likely be back to get more. Thanks
Tangki Panel
Tangki Fiberglass
Jual Septic Tank
chitra said…
Amazing Information! keep updating your Blog like this.
Tally Course in Chennai
Tally Training in Chennai
Langger is one of the best brands when it comes to gun safes.
Visit: Best Langger Gun Safes in US.
Choosing the ideal washing machine for you can be an intimidating task. Even if you try to select a washing machine with the best features, it can be quite heavy on your pockets.

Visit: Best Washing Machine under Rs 10000
A mixer grinder is a cooking device that is most commonly used in today’s modern kitchen. It is generally an electric appliance.
Visit: Best Mixer Grinder in India.
Bharat Go Digital, a premimum SEO Agency in Bangalore, is led by Mr Bharat Manghnani. Bharat has been doing Digital Marketing since 2103 and is a SEO Expert located in Bangalore, India.
Visit: SEO Specialist India
Induction cookers or induction stove runs on electricity and uses the magnetic induction that directly heats the cooking vessel. It does not run on flames or any other sort of thermal conduction for cooking.

Visit: best bajaj induction cooktop in india
karthick said…
This post is so helpfull and attractive.keep updating with more information...
Data Science Requirements
Career In Data Science
David Fincher said…
This post is so interactive and informative.keep update more information...
hadoop training in velachery
Big data training in chennai
Pavithra Devi said…
This post is so interactive and informative.keep update more information...
Angularjs training in anna nagar
Angularjs Training in Chennai

Popular Posts