01:52:48 <suser> Finally added preview images for my blog. In the end it was quiet simple. 01:53:53 <suser> 4am, but worth it. 11:57:43 <suser> Is there a way to create a table of content for markdown files like there is a wa for rst files with .. title: The Nikola Handbook 11:57:45 <suser> .. slug: handbook 11:57:48 <suser> .. date: 2012-03-30 23:00:00 UTC-03:00 11:57:51 <suser> .. link: 11:57:53 <suser> .. description: 11:57:56 <suser> .. tags: 11:57:58 <suser> .. has_math: true 11:58:00 <suser> .. author: The Nikola Team 11:58:03 <suser> :Version: 8.0.4 11:58:06 <suser> .. class:: alert alert-primary float-md-right 11:58:08 <suser> .. contents:: 11:58:11 <suser> All You Need to Know 11:58:13 <suser> -------------------- 11:58:16 <suser> After you have Nikola `installed <https://getnikola.com/getting-started.html>`_: 11:58:18 <suser> Create an empty site (with a setup wizard): 11:58:21 <suser> ``nikola init mysite`` 11:58:23 <suser> You can create a site with demo files in it with ``nikola init --demo mysite`` 11:58:26 <suser> The rest of these commands have to be executed inside the new ``mysite`` folder. 11:58:29 <suser> Create a post: 11:58:32 <suser> ``nikola new_post`` 11:58:34 <suser> Edit the post: 11:58:37 <suser> The filename should be in the output of the previous command. 11:58:39 <suser> You can also use ``nikola new_post -e`` to open an editor automatically. 11:58:42 <suser> Build the site: 11:58:44 <suser> ``nikola build`` 11:58:47 <suser> Start the test server and open a browser: 11:58:49 <suser> ``nikola serve -b`` 11:58:52 <suser> That should get you going. If you want to know more, this manual will always be here 11:58:55 <suser> for you. 11:58:57 <suser> DON'T READ THIS MANUAL. IF YOU NEED TO READ IT I FAILED, JUST USE THE THING. 11:59:00 <suser> On the other hand, if anything about Nikola is not as obvious as it should be, by all 11:59:03 <suser> means tell me about it :-) 11:59:05 <suser> What's Nikola and what can you do with it? 11:59:08 <suser> ------------------------------------------ 11:59:10 <suser> Nikola is a static website and blog generator. The very short explanation is 11:59:13 <suser> that it takes some texts you wrote, and uses them to create a folder full 11:59:15 <suser> of HTML files. If you upload that folder to a server, you will have a 11:59:18 <suser> rather full-featured website, done with little effort. 11:59:20 <suser> Its original goal is to create blogs, but it supports most kind of sites, and 11:59:23 <suser> can be used as a CMS, as long as what you present to the user is your own content 11:59:26 <suser> instead of something the user generates. 11:59:28 <suser> Nikola can do: 11:59:31 <suser> * A blog (`example <http://ralsina.me>`__) 11:59:33 <suser> * Your company's site 11:59:36 <suser> * Your personal site 11:59:38 <suser> * A software project's site (`example <https://getnikola.com>`__) 11:59:41 <suser> * A book's site 11:59:43 <suser> Since Nikola-based sites don't run any code on the server, there is no way to process 11:59:46 <suser> user input in forms. 11:59:49 <suser> Nikola can't do: 11:59:51 <suser> * Twitter 11:59:54 <suser> * Facebook 11:59:56 <suser> * An Issue tracker 11:59:59 <suser> * Anything with forms, really (except for `comments`_!) 12:00:01 <suser> Keep in mind that "static" doesn't mean **boring**. You can have animations 12:00:04 <suser> or whatever fancy CSS3/HTML5 thingie you like. It only means all that HTML is 12:00:06 <suser> generated already before being uploaded. On the other hand, Nikola sites will 12:00:09 <suser> tend to be content-heavy. What Nikola is good at is at putting what you write 12:00:11 <suser> out there. 12:00:14 <suser> Getting Help 12:00:16 <suser> ------------ 12:00:19 <suser> .. class:: lead 12:00:21 <suser> `Get help here! <https://getnikola.com/contact.html>`_ 12:00:24 <suser> TL;DR: 12:00:26 <suser> * You can file bugs at `the issue tracker <https://github.com/getnikola/nikola/issues>`__ 12:00:29 <suser> * You can discuss Nikola at the `nikola-discuss google group <http://groups.google.com/group/nikola-discuss>`_ 12:00:32 <suser> * You can subscribe to `the Nikola Blog <https://getnikola.com/blog>`_ 12:00:35 <suser> * You can follow `Nikola on Twitter <https://twitter.com/GetNikola>`_ 12:00:37 <suser> Why Static? 12:00:40 <suser> ----------- 12:00:42 <suser> Most "modern" websites are *dynamic* in the sense that the contents of the site 12:00:45 <suser> live in a database, and are converted into presentation-ready HTML only when a 12:00:47 <suser> user wants to see the page. That's great. However, it presents some minor issues 12:00:50 <suser> that static site generators try to solve. 12:00:52 <suser> In a static site, the whole site, every page, *everything*, is created before 12:00:55 <suser> the first user even sees it and uploaded to the server as a simple folder full 12:00:57 <suser> of HTML files (and images, CSS, etc). 12:01:00 <suser> So, let's see some reasons for using static sites: 12:01:02 <suser> Security 12:01:05 <suser> Dynamic sites are prone to experience security issues. The solution for that 12:01:07 <suser> is constant vigilance, keeping the software behind the site updated, and 12:01:10 <suser> plain old good luck. The stack of software used to provide a static site, 12:01:12 <suser> like those Nikola generates, is much smaller (Just a web server). 12:01:15 <suser> A smaller software stack implies less security risk. 12:01:17 <suser> Obsolescence 12:01:20 <suser> If you create a site using (for example) WordPress, what happens when WordPress 12:01:23 <suser> releases a new version? You have to update your WordPress. That is not optional, 12:01:26 <suser> because of security and support issues. If I release a new version of Nikola, and 12:01:29 <suser> you don't update, *nothing* happens. You can continue to use the version you 12:01:31 <suser> have now forever, no problems. 12:01:34 <suser> Also, in the longer term, the very foundations of dynamic sites shift. Can you 12:01:37 <suser> still deploy a blog software based on Django 0.96? What happens when your 12:01:39 <suser> host stops supporting the PHP version you rely on? And so on. 12:01:42 <suser> You may say those are long term issues, or that they won't matter for years. Well, 12:01:45 <suser> I believe things should work forever, or as close to it as we can make them. 12:01:47 <suser> Nikola's static output and its input files will work as long as you can install 12:01:50 <suser> Python 3.5 or newer under Linux, Windows, or macOS and can find a server 12:01:53 <suser> that sends files over HTTP. That's probably 10 or 15 years at least. 12:01:55 <suser> Also, static sites are easily handled by the Internet Archive. 12:01:58 <suser> Cost and Performance 12:02:00 <suser> On dynamic sites, every time a reader wants a page, a whole lot of database 12:02:03 <suser> queries are made. Then a whole pile of code chews that data, and HTML is 12:02:05 <suser> produced, which is sent to the user. All that requires CPU and memory. 12:02:08 <suser> On a static site, the highly optimized HTTP server reads the file from disk 12:02:10 <suser> (or, if it's a popular file, from disk cache), and sends it to the user. You could 12:02:13 <suser> probably serve a bazillion (technical term) page views from a phone using 12:02:16 <suser> static sites. 12:02:18 <suser> Lock-in 12:02:21 <suser> On server-side blog platforms, sometimes you can't export your own data, or 12:02:23 <suser> it's in strange formats you can't use in other services. I have switched 12:02:26 <suser> blogging platforms from Advogato to PyCs to two homebrew systems, to Nikola, 12:02:28 <suser> and have never lost a file, a URL, or a comment. That's because I have *always* 12:02:31 <suser> had my own data in a format of my choice. 12:02:34 <suser> oh sorry 12:02:36 <suser> is there a way to delete my spam? 13:40:38 <gour> suser: why you copy all this stuff here? 16:43:31 <suser> Was a mistake. Thought I had a simple command for a question in the clipboard. 19:09:01 <gour> :-)