Home >
Technical & Creative Skills >
Programming, Servers & Scripts
The Quickest Way To Create Entire Mini-Sites For Adwords, Native or Other Campaigns (14)
02-14-2017 10:28 AM
#1
caurmen (Administrator)
The Quickest Way To Create Entire Mini-Sites For Adwords, Native or Other Campaigns
With the expansion of affiliate marketing into whiter-hat areas these days, a lot of people are finding the old single-page lander doesn't cut it.
Actually, that's been a problem for huge, but quiet, sectors of the industry for a while.
Anyone relying on Google Adwords, for example, is used to having to deploy entire mini-sites rather than single-pagers in order to comply with their terms and conditions.
But as things like ecommerce and leadgen become bigger, many people are starting to hit the issue that their "landers" need to be entire multi-page websites. And that can really kill your creation speed.
Here's a solution to that.
If you need to be able to go from "hey, cool idea" to "and I've now deployed a 15-page site including contact form, FAQ, terms and conditions and privacy policy" inside 7 minutes, this article's for you.
If you need you or your team to be able to do that a hundred times a day, this article's even more for you.
Why not Wordpress?
You might be expecting me to use the word "Wordpress" round about now.
Wordpress isn't actually a great solution to this problem. Sure, it works as a solution, with a bunch of custom plugins to clone sites, but it's still comparatively heavyweight.
Believe it or not, the process of cloning a WP installation and changing the copy on key pages is waaaay slower than it needs to be. You can easily improve on that process threefold. In addition, as usual, Wordpress is slow unless it's very carefully set up, and it's also a security nightmare.
Wordpress is great, but for setting up a lot of static mini-sites it's way over-engineered. You need something light and fast.
You need Hugo.
(No relation to me.)
So what's Hugo?
Hugo is a Static Site Generator. It takes in content written in a text-like format called Markdown, and produces an entire ready-to-go HTML website in seconds.
- It's incredibly fast to use. All content is stored on your computer so there's literally no load time, and you use your regular text editor to create it.
- The sites it creates load stupidly fast, because they're static HTML.
- Because they're static HTML, you don't need a dedicated server or Wordpress instance - you can just throw them up on Amazon S3.
- And that also means no security hassles, no updating a hundred WP installs, and no need to worry about caching.
OK, lovely - so what are the downsides?
- The biggest one: you'll have to use the command line. Hugo doesn't have a GUI. You need to know about 3 commands, though!
- Hugo can't use Wordpress themes. Although converting them, particularly for a simple site, is not hard, they don't work out of the box.
How To Get Started
This might look like more than 7 minutes' work - and it is, a bit. But you only need to do it once - after that, it's copy-paste time! And after you've done it once, you can use it to build a thousand sites or more!
Installation
First, you'll need to install Hugo.
Hugo's install documentation is a bit techie, but just follow the steps and you'll be fine. If you have any problems, feel free to ask below!
Here's the link to download it for Mac, Linux or Windows
Setting Up Your First Site
Once you've downloaded it, you'll have to use the first command line command. Open up Terminal or the Command Prompt in the directory where you put the Hugo program, and type
You can call the site whatever you like.
Hugo will create a directory structure that you'll store your files in. Use the cd command to move into that directory:
Now, you need a template. Just type
Once again, you can call it whatever you want.
Finally, create your pages. Use the command
once for each page you want to create. Don't worry if you forget one - you can always add it later.
Make sure you've got a page named "index" in there! That'll be your domain name homepage.
Setting Up Your Theme
The
Hugo theme docs are huge and scary. Don't worry about them: for a minimal site, assuming you want to use the same basic design for each page, all you need to do is:
- Copy your single-page design - with placeholder text, images, etc - and paste it as /themes/layouts/_default/single.html
- Make sure that all menu links that you intend to link to pages in your site link to the page names you set up above, with no path. So - http://www.yoursite.com/pagename/
- Copy any Javascript, CSS, or images you want to use to the /static directory. Within that directory, put them in the locations your design will expect them - so if it's looking for /css/main.css, copy your main.css to /static/css/main.css
- Within the single-page design, replace:
- The title (both in the <head> and any h1 or similar tags) with {{ .Title }}
- The area where the main page text should be with {{ .Content }}
- The image you want to use with {{ .Params.image }} .
- If you want one, the subhead / description should be replaced with {{ .Description }}
- In the root directory of your site, edit config.toml and add a line reading "theme=THEMENAME" where THEMENAME is the name you gave your theme.
That's it - you just created a new Hugo theme.
Setting Up Your Content
Firstly, edit config.toml and change the baseURL parameter to be the URL this site will live at to whatever domain name you're using.
Now, edit each of the pages you set up. There are two sections to this: the front matter and the main content.
The front matter looks like this:
Code:
+++
date = "2017-02-09T17:02:09Z"
title = "testingpage"
draft = true
+++
Change the title to the title you want each page to have. If you like, add a new line with a description, like:
description = "This is the description of this page"
Change "draft" to "false".
Finally, add
where IMAGEPATH should be the path to the image starting from /static (so if it's in /static/img/, the path should start "img/") including the filename.
Now, under the bottom row of plus signs, add whatever content you want on your page, using
Markdown formatting. If that looks familiar - it's the same formatting you use when writing content on Reddit and many other popular sites.
OK, you're done!
Testing And Creating Your Site
Type
and go to localhost:1313 to check your site. It should be fully functional.
Now type
Within 200ms or so, your site should be ready in /public. Upload everything in that folder to the S3 bucket for the domain you want it to occupy, and you're good to go!
It'll load fast as hell, and all menus and pages should be immediately accessible.
Using This Site Again
The good news is that's the hard work done.
If you want to set up other sites with the same theme but different names, images, and body content for key pages, just copy-paste the entire directory, then change the URL in the config.toml and change the things you need to change in your Markdown files in the Content directory.
You can usually just drop the entire lot into a multi-file text editor and do a find-and-replace for things like site names.
If you want to change images, just add the images to your images directory and then change the image=line on the pages you want to change images for. Then delete the /public directory and run "hugo" again.
If you want to split-test themes, you can just set up a second theme by using the "hugo new theme BLAH" command, then after setting up the new theme, change the themename in config.toml, run "hugo" again, and you've got the site with a new theme.
Extending This Tutorial
If you want to do more with Hugo, you can. It's extremely useful for rapidly setting up blogs for native ads or SEO, for example, just by using a few more of the features in the theming system.
Here's a
tutorial on the theming system which should take you through most of that.
And that's it! Any questions, thoughts, comments? Put 'em in below!
02-14-2017 10:44 AM
#2
jessejames (Member)
The Quickest Way To Create Entire Mini-Sites For Adwords, Native or Other Campaigns
Thanks! I've been using pelican a lot earlier (Python based).
My new landers for my SEO biz are actually made in Pelican. With Google NGX Pagespeed and Route53/Cloudfront they're FAST.
02-15-2017 10:18 AM
#3
caurmen (Administrator)
Yeah, one of the major reasons I like using static site generators for this sort of thing is that the sites they produce are insanely fast. Say goodbye to days of tweaking WP caches to get under 1s load time...
02-15-2017 01:03 PM
#4
barman ()
Agreed that Wordpress is a huge pain in the ass for this use case. Sure it's easy to maintain the actual content of the pages, but the actual setup (hosting and installation), maintenance (plugins, upgrades, upgrades to plugins) and the overall bloat is just overkill for simple static sites.
I'm definitely gonna checkout what Hugo and Pelican (even though i know no python) can do
02-15-2017 01:24 PM
#5
jessejames (Member)
Yeah, I only use Wordpress on sites where I have writers to log in -- as I don't expect them to write in Markdown. 
You actually don't need to know any python to run Pelican. It's just that it's coded in python, the generator itself, but you just run it from the command line and feed it a folder of .md or HTML files.
You just need to have Python running on your machine (any OSX or Linux setup will have this), or you can run it from the command line on your hosting VPS (as long as you can SSH in).
I haven't tried Hugo though, but I'll give it a try. Jekyll is another popular one written in Ruby.
02-15-2017 01:33 PM
#6
gunnar (Member)
We are churning out XXXX Wordpress domains per year, but you are absolutely right regarding the security concerns.
The last Wordpress vulnerabilities got a few hundred of our blogs hacked, although we are updating everything via WP-CLI and cronjobs.
I'll try HUGO for sure.
02-15-2017 01:37 PM
#7
jessejames (Member)
This is also good, masspagecreator.com. If you're doing lead-gen, local or cloaking doorway pages in SERPs. It takes variables 9 levels deep, php includes for rotating offer, advanced templating with spintax and conditionals and has a cloaking module with IP db (not sure about the source). A whole different topic though, but if someone is chunrnig out 10k-1m pages this is far better, faster and less resource intensive than WP.
02-16-2017 09:37 AM
#8
caurmen (Administrator)
@jessejames - on the "writers logging in" point, you might be interested to know that there are quite a few CMSes for Hugo popping up. Caddy, a very extensible web server /CMS, is probably the most intriguing, although I slightly fear its security.
There are also some excellent Markdown editors out there for non-techies (or just people who want a nicer environment than Visual Studio Code to write in) - my preferred option is MarkdownPad 2.
(I actually write all my articles for STM in Markdown, then run them through a preprocessor to convert to BBCode.)
BTW - good recommendations on other static generators! I've heard very good things about Pelican, and Jekyll's great, and very well supported.
02-16-2017 08:49 PM
#9
barman ()
I stumbled on this motherfucker of a gem today: https://www.staticgen.com/
02-16-2017 09:18 PM
#10
porridge (Member)
Gold advice; definitely looking into it for future white-hat leadgen campaigns!
It even has a name that reminds me about joyful past times...

02-17-2017 12:57 AM
#11
freddyfortunes (Member)
great advice thanks!
04-04-2017 04:12 PM
#12
elskafreya (AMC Alumnus)
You might be expecting me to use the word "Wordpress" round about now.
I laughed my ass off. I spent so much time in SEO & Local that this was like a breath of fresh air, I don't know how to explain the amount and multiple ways of worship that go towards Wordpress in the local marketing community here. And sure it's good for a lot of things, but I get sick of hearing about it.
Hugo def looks like something I want to try.
04-05-2017 09:57 AM
#13
caurmen (Administrator)
Heh!
Yeah, I've done my share of time down the Wordpress mines too
I'm really excited about static site generators these days - they solve a lot of the problems that the Wordpress ecosystem generates.
Ironically, of course, this is where blogging started - things like Moveable Type used to generate static content back when WP was getting started, and before that we all just edited our HTML on the server.
But it seems like static site generators have hit the inflection point of being Actually Useful now!
04-05-2017 12:13 PM
#14
jessejames (Member)
Also now, with all them fancy JS frameworks you can build some cool stuff in "static old html". I've made mass pages that have a proper comparison/product filter table that pulls from API, and for the user it looks dynamic, and then I just loaded it into a mass generator and made 10k different copies with text-kw combinations.
Home >
Technical & Creative Skills >
Programming, Servers & Scripts