LinuxPlanet Casts

Media from the Linux Moguls

HPR1577: Introducing Nikola the Static Web Site and Blog Generator

without comments

Nikola - The Static Web Site and Blog Generator - http://getnikola.com Note: Please see developer notes below What is it? A Static Website and Blog Generator based on Python. What is a Static Website Generator? It generates posts and pages via commands. You edit those posts and pages in a text editor, then run a command to build the site, and finally, deploy/upload the generated html etc files to your webhost. That sounds kinda old school are you sure thats web 3.0? Its old and new school. Nikola gives you CMS like features without the overhead of the database server and page rendering engine. How can I install it? Use PIP and follow the handbook on the getnikola.com website. NOTE: Python 2.6 or newer or Python 3.3 or newer is required sudo pip install nikola sudo pip install nikola[extras] You should be good to go if you can enter nikola help in a terminal and get a list of nikola commands. Lets create our skeleton website: nikola init mysite You will need to answer some questions now (NOTE a directory to cd into called mysite will be created if you issue mysite.. You should enter your domain name instead - mysite is just an example). The questions it asks will help populate the conf.py file in the mysite directory. Site Title: Site Author: Site Author Email: Site Description: Site URL: Languages to support: (default en) Time zone: Which comments system to use: Once complete your site will be created and in the directory you named the site as - in my case, mysite. cd into that and take a look at the files with ls. you will have: conf.py - your configuration file files - where you will place images etc and reference them in blog posts and pages galleries - where you can serve up images in a gallery posts - where your blog posts go stories - where your pages go Lets create a blog post. nikola new_post Type in the title of your blog post and hit enter. I will use foobar in this example It will report the new post is in posts/foobar.rst fire up your text editor and edit that file. There is a header area at the top of the file - most of it is already filled in and you wont need to change it but you should add a Tag because you can see posts by Tag once the site is generated and it gives your readers a way to find all items on that subject. These are separated by commas so enter as many or few as you like. Enter a Description in the Description area. Now move into the Write your post here area and go to town - erase that or it shows up in your post. You should read the page on ReStructuredText here: http://getnikola.com/quickstart.html but also just look at the Source by clicking Source on the getnikola website and you can see the markup they used. Some basics are *word* for italics, word for bold, a single * space item for bullet points and for hyperlinks `Tree Brewing Co: `_. a Tree Brewing Co hyperlink which will bring you when clicked to treebere.com. Lastly issue: .. image:: /files/imagefilename.jpg to point to an image file that you have placed into the files directory. Ok lets say you are done your post, save it and exit. Lets now build your site and fire up the built in webserver to display it. nikola build nikola serve -b Your default web browser will launch and you will see your site with blog post. Savour the moment - you have just created your first blog post. Note all the generated files you would upload to your webhost are in the output folder. Ok so thats great but I want to add pages and have it in my navigation window Ok lets do that. nikola new_post -p Enter a name for it and press Enter. In my case I created MyPage It tells you your page is in the stories directory and shows you how it named the file. In my case its mypage.rst Open that in a text editor and compose the page - save it when complete. So that would be great but its not showing up in your navigation yet. You need to put that in your conf.py file. Open conf.py in a text editor, look for NAVIGATION_LINKS. Observe how the existing pages are linked and follow that format. Here is how I would add mypage: (/stories/mypage.html, MyPage), any page you create will show up in stories so dont forget to put that in the path. NAVIGATION_LINKS = { DEFAULT_LANG: ( ("/archive.html", "Archive"), ("/categories/index.html", "Tags"), ("/rss.xml", "RSS feed"), ("/stories/mypage.html", "MyPage"), ), } Save that and rebuild your site. NOTE:: As of Today Nikola v7.0.1 requires a special command to include the new pages in navigation. This has been fixed in git but currently you must issue: nikola build -a nikola serve -b Now you are viewing it - nice work - you have a page now. This site seems a bit plain, how can I theme it? Glad that you asked - issue this command. nikola bootswatch_theme -n custom_theme -s slate -p bootstrap3 Now you have set it to use the slate bootswatch theme. Review the bootswatch themes on: http://bootswatch.com/ In order to let Nikola know to use this new theme you need to edit the conf.py file and look for THEME and change the value from bootstrap3 to custom_theme. Now issue these commands at the command line to view the changes: nikola build nikola serve -b You can modify the themes to your liking and there is guidance on changing the theme on the nikola website. There are ways to depoly your site via rsync or ftp commands in the conf.py file. There are also other things you can set in the conf file such as google analytics, add an embeded duckduckgo or google search engine, specify options for the image galleries etc. More things you can do to spify up your posts / pages are to do with using shortcode like sytax for ReStructuredText. You can embed soundcloud, youtube videos etc - here is a list of these: http://getnikola.com/handbook.html#restructuredtext-extensions I hope this helps you get started on using Nikola and hope you enjoy using it as much as I do. If you have questions or comments, find me in the oggcastplanet.net irc chat room on freenode, or go to http://stevebaer.com click Tags and click HPR and leave a comment on this episodes blog post. Until next time, Cheers! Corrections to this episode provided by Chris Warrick http://stevebaer.com/posts/hpr-episode-on-using-the-static-web-site-and-blog-generator-called-nikola.html Some small corrections: it is recommended to use a virtualenv, `sudo pip` can be dangerous `pip install nikola[extras]` is enough, no need to do both steps new pages can be created with `nikola new_page`, too (both ways are equally supported) missing quotes around "MyPage" in example navbar code Fixed you can get rid of /stories/ if you change PAGES[*][1] from "stories" to an empty string. bootswatch themes are not everything, there is also install_theme that uses a more varied collection from http://themes.getnikola.com/

Written by saras fox

August 18th, 2014 at 6:00 pm

Posted in Linux

The Scripting Chronicles | CR 115

without comments

Where does TypeScript fit in, and are the many criticisms lobbied at it legitimate? We discuss the state of scripting, and the new dark pragmatism that seems to be setting in.

Plus picking your ideal client, package managers for Windows and Mac, your feedback & more!

Written by Jupiter Broadcasting

August 18th, 2014 at 3:15 pm

Posted in Linux

China’s new Apple | Tech Talk Today 44

without comments

A leak reveals the specs, price, and other details about the new Moto 360 smartwatch & is Xiaomi’s new MIUI 6 OS release a iOS rip off?

Plus the market share numbers you won’t believe, and if Linux distros were superheroes, which hero would they be? We debate!

Written by Jupiter Broadcasting

August 18th, 2014 at 12:44 pm

Posted in Linux

Go Hack Yourself | FauxShow 189

without comments

Angela and Chris go over 46 different life hacks that not only make sense but will make your life easier! In the process you’ll learn crucial information about random things, mostly useless knowledge.

Written by Jupiter Broadcasting

August 17th, 2014 at 10:22 pm

Posted in Linux

What’s Next for Fedora | LAS 326

without comments

The Fedora Project Lead joins us to explain Fedora.next, their ambitions for the cloud, desktop, and what success means for Fedora.next. Tyler from Arch Assault joins us to update us on the latest from Blackhat, the new developments with their distro, and the what the future holds.

Plus news of the week, our picks, your feedback, and more!

Written by Jupiter Broadcasting

August 17th, 2014 at 9:01 pm

Posted in Linux

HPR1576: How I got into Linux

without comments

Short Summary: This is my story about how I got into computers, computing and GNU/Linux. Links: Personal identity number in Sweden https://en.wikipedia.org/wiki/Personal_identity_number_%28Sweden%29 Apple II: https://en.wikipedia.org/wiki/Apple_2 ABC80: https://en.wikipedia.org/wiki/ABC_80 Tipp-Ex: https://en.wikipedia.org/wiki/Tippex IBM Portable PC: https://en.wikipedia.org/wiki/IBM_Portable MacIntosh Plus: https://en.wikipedia.org/wiki/Macintosh_Plus Imagewriter II: https://en.wikipedia.org/wiki/ImageWriter_II Hypercard: https://en.wikipedia.org/wiki/Hypercard Netscape Navigator: https://en.wikipedia.org/wiki/Netscape_Navigator Debian Social Contract: https://www.debian.org/social_contract

Written by Inscius

August 17th, 2014 at 6:00 pm

Posted in Linux

Linux Outlaws 357 – Space Laser Internet

without comments

An uncut video version of this episode can be found on YouTube.

0:01:19 Introduction

Miroslav Klose

0:19:19 Berlin Fibre, The Maker’s Eden & Synapse

Space Laser

0:33:38 Releases

0:42:24 Security News

1:09:18 Next Gen OpenGL, Qt Company & Compilers

Backside of the Omega Seamaster

1:20:27 Feedback

  • Thanks to our supporters!
  • Orange Dolphin writes us about our novel idea
  • Torin Doyle writes us about converting people to Linux as well as about Munster, Münster and Munster
  • Félim Whiteley comes in with the amazing title “Murder He Rode” for our novel
  • Martin Lake says he’s a big fan of the show and asks what our favourite shell is
  • Leigh comments on Fab buying a motorbike and he doesn’t like Disqus
  • Your users deserve better than Disqus
  • Barry Williams writes with a Rent reference
  • Daniel Frey wants us to raise awareness for the Fund Anything campaign for 5150

1:39:52 Song

Written by linuxoutlaws@sixgun.org (Sixgun Productions)

August 17th, 2014 at 3:56 pm

mintCast 206 – Debian and LMDE

without comments

Download News: LMDE switching to Debian Stable for it’s package base when “Jessie” goes live (blog.linuxmint.com) Numerous improvements being worked on for Mint 17.1 (segfault.linuxmint.com) How we turn $199 Chromebooks into Ubuntu-based code learning machines for kids (codestarter.org) Why Hoboken … Continue reading

Written by mintcast@mintcast.org (Charles and Rothgar)

August 16th, 2014 at 9:38 am

mintCast 206 (MP3) – Debain and LMDE

without comments

Download

Written by mintcast@mintcast.org (Charles and Rothgar)

August 16th, 2014 at 9:35 am

Posted in Linux,mp3

S07E20 – The One with All the Cheesecakes

without comments

We’re back with Season Seven, Episode Twenty of the Ubuntu Podcast! Alan Pope, Mark Johnson, Tony Whitmore, and Laura Cowen are drinking tea and eating the Co-op’s Red Velvet cake in Studio L.

In this week’s show:

  • We discuss whether Google are eating our lunch? Not literally. At least, I hope not…

  • We also discuss:

  • We share some Command Line Lurve that tells you the day of the week (modified from @climagic):

    $ date -d "Nov 15" | cut -d' ' -f1 Sat $ date -d "Nov 15 2015" | cut -d' ' -f1 Sun $ date -d "Nov 15 2016" | cut -d' ' -f1 Tue
  • And we read your feedback. Thanks for sending it in!

We’ll be back next week, so please send your comments and suggestions to: podcast@ubuntu-uk.org
Join us on IRC in #uupc on Freenode
Leave a voicemail via phone: +44 (0) 203 298 1600, sip: podcast@sip.ubuntu-uk.org and skype: ubuntuukpodcast
Follow us on Twitter
Find our Facebook Fan Page
Follow us on Google+

Written by Ubuntu Podcast » mp3

August 16th, 2014 at 3:33 am

Posted in Linux,Ubuntu