The following steps are here to help you initialize your new website. If you don’t know Hugo at all, we strongly suggest you learn more about it by following this great documentation for beginners. Or if you already know Hugo, you can start directly with a template:
title="My Hugo FixIt Site"baseURL="http://example.org/"# determines default content language ["en", "zh-cn", "fr", "pl", ...]defaultContentLanguage="en"# language code ["en", "zh-CN", "fr", "pl", ...]languageCode="en"# Change the default theme to be use when building the site with Hugotheme="FixIt"[params]# FixIt theme versionversion="0.2.X"[menu][[menu.main]]identifier="posts"name="Posts"url="/posts/"weight=1[[menu.main]]identifier="categories"name="Categories"url="/categories/"title=""weight=2[[menu.main]]identifier="tags"name="Tags"url="/tags/"weight=3# Markup related configuration in Hugo[markup]# Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)[markup.highlight]# false is a necessary configuration (https://github.com/hugo-fixit/FixIt/issues/43)noClasses=false
Here is the way to create your first post:
hugo new posts/first_post.md
Hugo created the post file in the content/posts directory.
Open it with your editor and feel free to edit it by adding some sample content and replacing the title value in the beginning of the file.
title: My First Post
A blog (a truncation of "weblog") is an informational website published on the World Wide Web consisting of discrete, often informal diary-style text entries (posts). Posts are typically displayed in reverse chronological order so that the most recent post appears first, at the top of the web page. Until 2009, blogs were usually the work of a single individual, occasionally of a small group, and often covered a single subject or topic. In the 2010s, "multi-author blogs" (MABs) emerged, featuring the writing of multiple authors and sometimes professionally edited. MABs from newspapers, other media outlets, universities, think tanks, advocacy groups, and similar institutions account for an increasing quantity of blog traffic. The rise of Twitter and other "microblogging" systems helps integrate MABs and single-author blogs into the news media. Blog can also be used as a verb, meaning to maintain or add content to a blog.
By default all posts and pages are created as a draft. If you want to render these pages, remove the property draft: true from the metadata, set the property draft: false or add -D/--buildDrafts parameter to hugo command in the following steps.
Launching the Site
Save the file, then launch the website locally by using the following command:
When you run hugo server, when the contents of the files change, the page automatically refreshes with the changes.
Since the theme use .Scratch in Hugo to implement some features,
it is highly recommended that you add --disableFastRender parameter to hugo server command for the live preview of the page you are editing.
hugo server --disableFastRender
Go to http://localhost:1313.
Build the Site
When your site is ready to deploy, run the following command:
A public folder will be generated, containing all static content and assets for your website. It can now be deployed on any web server.