Linux Format

CONVERTING BETWEEN FORMATS

-

One of the powerful reasons to use Markdown as the source format is that it can very easily be converted to other formats – for example, by using the Pandoc tool. Once Pandoc has been installed, individual files can be converted, as so:

$ pandoc INPUTFILE.MD -o OUTPUTFILE.FORMAT

Pandoc has native support for a large number of formats, such as text files, DOCX files (for Word), ODT files (for LibreOffic­e) and HTML for other web servers (should the formatting not be required). Further packages are required for conversion to PDF and these can be installed, on an Ubuntu machine, with the following command:

$ sudo apt install pandoc texlive-xetex

Option number two is to install the mkdocs-with-pdf package. This can be carried out by using the pip3 install mkdocs-with-pdf command. Once installed, add the following to the plugins section of the mkdocs.yml file, so that whenever the site is built, a PDF is also created:

plugins:

- with-pdf

selected to select all and then add a commit message at the bottom of the panel. Click the Commit button and this change is then committed to your local repository. Once the changes have been committed to the local repo, they can be published to GitHub. This button is near the top of the window and you are asked to confirm the repository that you wish to push to and if the files should be private or not. Don’t forget that if you use GitHub Desktop to create the online repository, you need to use the GitHub web interface to enable the Pages options.

Hopefully this article has shown how powerful static site generators can be and has given you some ideas of what you could use them for. The trivial example of an online recipe book is just to spark your imaginatio­n and you can use it to document pretty much anything or make yourself a new personal website. As can be seen, GitHub spaces are a powerful hosting platform and can be used with custom domains to make the site look more profession­al.

See the following link for a beginners’ guide to using Git: https://docs. github.com/en/ get-started/ quickstart/ hello-world

Newspapers in English

Newspapers from Australia