Bolt: Save Time Coding Using This Agentic AI Tool

Coding web pages by hand is time-consuming. I’ve tried a few AI-based coding tools like Claude.ai, Ninja AI, and Bolt. Bolt seemed to produce the best results. It’s not perfect, but it definitely can serve as a good starting point. To demonstrate, let’s see how each of these AI tools generate code for this simple section.

For each tool, I’ll upload the same screenshot of the section and provide the same prompt, namely:

Write plain HTML and Tailwind CSS code to create the uploaded screenshot exactly.

Claude.ai (using Claude 3.5 Sonnet)

Here’s the output.

Claude can’t show a preview, so I copied and pasted the code into Codepen. Here’s how it looked.

That’s actually not bad. The image is missing because it’s a placeholder image to a relative path that doesn’t exist.

Ninja AI

For the models, I chose Claude 3.5 Sonnet for the external model. Ninja AI will combine it with its own internal models. Here’s the input.

And here’s the output.

Like Claude, Ninja AI can’t show me a preview, so I copied and pasted the code into CodePen. Here’s what it showed.

Not bad, but it’s not as good as Claude even though I chose Claude as the external model. The main issue is the vertical spacing between the elements on the right.

Bolt.new

Here’s the input.

Bolt can show a visual of what the code would produce. Here’s the code output.

Note that Bold will install a Vite and a bunch of dependencies like Tailwind CSS, Autoprefixer, PostCSS, etc. Here’s the visual preview output.

Conclusion

I’ve run a bunch of other tests comparing all 3 AI tools. Bolt is better than the other tool for code generation.

Bolt.diy

The problem with all of the above AI coding tools is they can become expensive. Luckily, there’s an open-source version of Bolt called Bolt.diy. It can be used with any LLM, including the free, experimental version of Google Gemini Pro 2.0 and DeepSeek. You can install bolt.diy by following the simple instructions at https://github.com/stackblitz-labs/bolt.diy. When you run bolt.diy, it will open in a local browser.

Let’s try a couple of LLMs with bolt.diy to code the same section above.

Google Gemini Pro 2.0 Experimental

To use Google Gemini Pro 2.0 Experimental, you’ll need to get an API key. Go to OpenRouter.ai, search for the LLM, and get a free API key.

Here’s the input.

While writing the code, bolt.diy returned an error.

I clicked “Ask Bolt”, it Bolt self-corrected. Here’s the code output.

And here’s the visual preview.

This does not look good at all. Let’s try DeepSeek Coder.

DeepSeek Coder

We’ll need an API key. Go to the DeepSeek platform, sign up, and get a key.

Here’s the input in bolt.diy with DeepSeek selected.

And here’s the output.

Pinegrow: Save Time Coding With This Low-Code Editor

Some of the things that consume too much time as a web developer are manually typing HTML and CSS and looking up documentation. For example, when creating a list, it takes much longer to type <ul><li></li>….</ul> than it is to just click a button and start typing the content like you do in MS Word or Google Docs. Another example is when I don’t remember the syntax for a Tailwind CSS class and I have to look it up in the online documentation. After searching for a low-code editor that allows me to have both a WYSIWYG editor alongside a code editor alongside a list of controls, I have only found one that meets that criteria. Pinegrow offers both a desktop and a web-based low-code editor that supports plain HTML/CSS/JS, Tailwind CSS, Bootstrap, and much more. For now, just using it for plain HTML/CSS and Tailwind CSS saves me a lot of time. Following is a screenshot of how I have the UI.

Due to the large amount of information and my preferences for not having to scroll a lot, I expand the window full size on a 32″ 4K monitor. The screenshot above shows the following panes:

  • top left = WYSIWYG editor
  • bottom left = code editor
  • middle = element properties
  • right = DOM tree

You can edit code and see the changes in the visual editor. You can also insert elements into the visual editor and edit text visually. When you click on an element in the visual editor or the DOM tree, you can edit its properties using the various controls in the middle pane. For example, if I want to add bottom margin to an element, I don’t have to remember the possible Tailwind CSS preset values. Instead, I can just click a dropdown and choose a value. As I hover over the various dropdown values, I can visually see the margin change size. This is much easier than trying different values in a code editor and then reloading your browser to see the change. If I want to enter a custom value, I just type it in the field and choose a unit (px, em, etc).

When you want to insert an element, e.g. a list, just drag the corresponding button in the “+ Insert” dropdown over to the location in the visual editor where you want to place the new element.

Editing an element’s properties is super easy thanks to the complete controls with pre-populated Tailwind CSS values.

For example, if I want to vertically or horizontally align an element in a flexbox or CSS grid container, I can just visually see which button depicts the alignment I want and then click on it. Pinegrow will automatically update the code and the visual preview.

This is so much easier than typing “items-stretch”, “items-center”, “items-start”, etc.

If you’re having a hard time selecting an element in the visual preview, just click on it in the DOM tree. You can then edit the element’s properties in the middle pane.

If you are using the online version of Pinegrow and you want to export your code, just copy it from the code editor into your other editor (I use VS Code). Or, you can use the desktop version of Pinegrow and edit your local files directly.

Set Up a Simple and Reliable Static Site Generator Using 11ty (Eleventy) + Tailwind CSS

1. Install NodeJS

https://nodejs.org/en/download

2. Install Git

https://git-scm.com/downloads

3. Set Up a New Website Project Folder

mkdir test-website
cd test-website

4. Create a package.json file

npm init -y

5. Install Eleventy (11ty) Static Site Generator

npm install @11ty/eleventy

6. Verify Eleventy Runs

npx @11ty/eleventy

7. Install Tailwind and Tailwind CLI

npm install tailwindcss @tailwindcss/cli

Tailwind CSS will compile Tailwind CSS classes to CSS and Tailwind CLI will allow us to run Tailwind CSS from the command line.

https://tailwindcss.com/docs/installation/tailwind-cli

8. Create a Tailwind Config File

Create a file called tailwind.config.js in the project root and put the following started config. The “content” key tells Tailwind CSS which files to process.

export default {
    theme: {
      extend: {
        colors: {
          'primary': '#ff49db',
        },
        fontFamily: {
          'sans': ['Helvetica', 'Arial', 'sans-serif'],
        },
      },
    },
    plugins: [],
    content: ["./src/**/*.{njk,md,html}", "./src/**/*.svg",]
  }

9. Tailwind CSS Input and Output Files

Tailwind CSS will also process input files and output the results where we want. There are 2 Tailwind inputs:

  1. a CSS input file
  2. Tailwind CSS classes in HTML

Let’s put the Tailwind CSS input file at /src/css/tailwind-input.css and let’s have Tailwind CSS put the output file at /dist/src/tailwind-output.css.

10. Eleventy Input and Output Folders and Files

By default, Eleventy will build source files that are in the “src” folder and output them to a “_site” folder. If you want the output to go to a different folder, create an Eleventy config file and specify the output folder name there. By default, Eleventy will not copy static assets like CSS, JS and images to the output folder. Create an Eleventy config file (.eleventy.js) in the project root and add the following code to

  1. tell Eleventy to copy certain files to the output folder (note that we are telling Eleventy to not copy the source Tailwind CSS input file)
  2. tell Eleventy to put the output in a folder called “dist”
module.exports = function(eleventyConfig) {
	eleventyConfig.addPassthroughCopy("src", {
		//debug: true,
		filter: [
			"404.html",
			"**/*.css",
            "!**/*tailwind-input.css",
			"**/*.js",
			"**/*.json",
			"!**/*.11ty.js",
			"!**/*.11tydata.js",
		]
	});
  
	// Copy img folder
	eleventyConfig.addPassthroughCopy("src/img");

	eleventyConfig.setServerPassthroughCopyBehavior("copy");

	// tell 11ty which files to process and which files to copy while maintaining directory structure
	// eleventyConfig.setTemplateFormats(["md","html","njk"]);

	return {
		dir: {
			input: "src",
			output: "dist",
			// ⚠️ These values are both relative to your input directory.
			includes: "_includes",
			layouts: "_layouts",
		}
	}
};

11. Install npm-run-all

In order to have Eleventy build static pages AND process Tailwind CSS, we need to run both Eleventy and Tailwind CSS in parallel. To do that, install npm-run-all.

npm install npm-run-all --save-dev

12. Update Scripts

To run Eleventy and Tailwind CSS concurrently, let’s add some scripts. Open package.json and add the following scripts.

"start": "npm-run-all -p dev:*",
"build": "run-s build:*",
"dev:11ty": "eleventy --serve",
"dev:css": "tailwindcss -i src/css/tailwind-input.css -o dist/css/tailwind-output.css --watch --postcss", 
"build:11ty": "eleventy",
"build:css": "tailwindcss -i src/css/tailwind-input.css -o dist/css/tailwind-output.css --postcss"

The tailwindcss line has a reference to the input Tailwind CSS file (src/css/tailwind.css) and where the output CSS would go (dist/css/tailwind.css).

Your package.json file should look like this.

13. Create a “src” folder

The src folder will contain your source website files. Your folder structure should look like this now.

14. Create some files

Here’s an example folder structure for your website files.

The source files are all in the “src” folder. The “img” folder is where images can go and the “js” folder is where JavaScript files can go.

Tailwind CSS

In the “css” folder, there is a tailwind-input.css file. To start, just add this line to it.

@import "tailwindcss";

Non-Tailwind CSS (Optional)

The “css” folder can optionally contain non-Tailwind CSS files.

  • The CSS files in a “partials” folder group CSS by component, e.g. button.css, header.csss, etc.
  • The global.css file can contain CSS that applies to all pages on the site.
  • The index.css file can contain CSS that applies to just one or a few pages, e.g. the home page.

In this example, there is only one page – the home page (index.html) in the document root.

15. Write Code

Here is example code for the home page. Note the way the local CSS and JS files are referenced.

Tailwind CSS will compile the input Tailwind CSS file (/src/css/tailwind-input.css) and the Tailwind CSS classes in the HTML (e.g. on lines 18 and 19 of index.html) and output it at /dist/css/tailwind-output.css. That’s why on line 12 there is a reference to the path to the Tailwind output file.

16. Run Eleventy (and Tailwind CSS)

npm start

You will see a “dist” folder get created along with the css/tailwind-output.css file.

Eleventy will launch a local web server at http://localhost:8080/. Go to that URL to view the site and verify the site looks as correct.

17. Add Git

Put the project folder in version control by running

git init

Then, create a .gitignore file in the project root and enter the names of folders you want to exclude from version control, like these folders:

node_modules
dist
.cache

Add and commit all files to version control

git add *
git commit -m "first commit"

18. Set Up SSH Keys to Publish to GitHub

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

If you are on Windows, use Git Bash, which by default is located at C:\Program Files\Git\git-bash.exe.

19. Push Files to GitHub

  1. create a new repo in GitHub (mine is called eleventy-tailwind)
  2. push your files to GitHub
git remote add origin git@github.com:javanigus/eleventy-tailwind.git
git branch -M main
git push -u origin main

20. Publish to GitHub Pages

To publish your static site to GitHub Pages, install gh-pages.

npm install gh-pages –save-dev

Update package.json to include

"deploy": "gh-pages -d dist"

Deploy by running

npm run deploy

Your site will be live at https://<username>.github.io/<repository>/.

Optional

Add PostCSS, Autoprefixer, and other PostCSS plugins to further optimize your build output.

Get Started with Elementor Page Builder for WordPress

Initial WordPress Setup

Once you’re logged in to WordPress,

  1. delete all posts (move to trash and empty trash)
  2. delete all pages (move to trash and empty trash)

Purchase Elementor Pro

Go to Elementor.com and buy a license for the Elementor Pro website builder plugin.

Once you’ve paid, click the Download button to download Elementor Pro.

Install Hello Theme

In WordPress,

  1. go to Appearance > Themes
  2. click “Add New Theme”
  3. search for “Hello Elementor”
  4. hover over it and click “Install”
  5. when installation is complete, click the “Activate” button

You will see a message offering to install the free version of Elementor. Click “Install Elementor” and then click “Activate Plugin”.

Install Elementor Pro

Go to Plugins. You will see the free version of the Elementor plugin installed.

Click “Add New Plugin” > “Upload Plugin”, choose the Elementor zip file you download previously, then click “Install Now”.

Click “Activate Plugin”.

In the list of plugins, click “Connect & Activate”.

You will taken to Elementor’s website to log in.

Click “Activate my license”. Once activated, you will see…

If you visit your website, it will look similar to this.

Delete All Other Themes

Go to Appearance > Themes. For each theme besides “Hello Elementor”, click “Theme Details” > “Delete”.

WP Admin > Elementor > Settings

Now that Elementor has been activated, you’ll see 2 new menu items in the WordPress admin: “Elementor” and “Templates”, each with submenus. Click on Element > Settings to optionally change any general settings, integrations, performance settings, and features.

To create mega menus, go to Elementor > Settings > Features and beside “Menu”, select “Active”. Scroll down and click “Save”.

WP Admin > Elementor > Submissions

When someone submits a form, Elementor will store form submissions here.

WP Admin > Elementor > Custom Fonts

You can upload some custom fonts here to use in your website. For example, you can browse free fonts on Google Fonts, download them, and then upload them here.

WP Admin > Elementor > Custom Icons

You can upload custom icon sets here from Fontello, IcoMoon, and Fontastic as zip files to use in your website.

WP Admin > Elementor > Custom Code

You can add custom code like pixels, meta tags and any other scripts to your site from here.

WP Admin > Elementor > Role Manager

The Role Manager lets you specify what your users can edit in Elementor.

WP Admin > Elementor > Element Manager

The Element Manager lets you enable/disable various Elementor, Elementor Pro, and native WordPress widgets when you are building pages with the Elementor page builder.

WP Admin > Elementor > Tools

Under Tools, you can do various things like regenerate CSS and data files, replace URLs, roll back to an older version of Elementor, put your site in maintenance mode, and import/export a template kit.

WP Admin > Elementor > System Info

Under System Info, you see details of your server environment, WordPress environment, theme, user, active plug-ins, must-use plugins, features, integrations, Elementor experiments, error log, and more.

WP Admin > Appearance > Customize > Site Identity

To add your logo and favicon to your website, go to Appearance > Customize > Site Identity and then click the “Select Logo” button and the “Select Site Icon”, respectively. You can also enter a name and tagline for your website. For demo purposes, I’ll enter “ABC Company” and leave the tagline blank.

WP Admin > Appearance > Customize > Homepage Settings

Since WordPress started as a CMS to create blogs, the default home page was an index of blog posts. Since we want our home page to be a custom page, let’s change the home page type to “static”. Go to Appearances > Customize > Homepage Settings and choose “A static page”. For “Homepage”, since we haven’t created one yet, add a new one titled “Home” and click the “Add” button. You can leave “Posts page” empty for now.

WP Admin > Appearance > Customize > Menu

Decide what pages you want linked from your website’s main menu. You can have a multi-level menu, e.g. top-level links with a drop-down on hover to show a submenu of links. For demo purposes, let’s say we want our menu to be as follows:

  • Products
    • Product A
    • Product B
    • Product C
  • Services
    • Service A
    • Service B
    • Service C
  • About
  • Contact

To create this menu, go to Appearance > Customize > Menus > Create New Menu. Then, give the menu a name, e.g. Header Menu, and choose a location.

Click Next > Add Items and start adding the names of the links under “Pages”. You can then drag menu items to nest them the way you want to create submenus.

You can see a live preview of the menu in the Hello Elementor starter theme we’re using. Click “Publish” to save your changes.

Note that you can create multiple menus, e.g. one for the header and one for the footer.

Edit Home Page

When you click “Pages” in the WordPress admin panel, you’ll see a list of pages you created when you added menu items. Note that the “Home” page is labeled as the “Front Page”.

That’s why when you click on a menu item, a page that uses the “page” template will appear with a page title that matches the menu item text. For example, when I click “Product A” in the menu, I see this.

If you click on “Home” in the list of pages, you’ll see the WordPress Gutenberg block editor showing the page title “Home”.

We don’t want to edit the page using the native WordPress editor. Click the blue “Edit with Elementor” button at the top. We’ll be taken to the same page but in Elementor, which is a much better WYSIWYG editor.

If you need to go back to the WordPress admin panel, click the Elementor button in the top left corner and then “Exit to WordPress”.

Elementor > Site Settings > Global Colors

Here, you can specify primary, secondary, text, and accent colors as well as additional optional colors.

Elementor > Site Settings > Global Fonts

Here, you can specify primary, secondary, text, and access font family and styles as well as additional custom fonts.

Elementor > Site Settings > Typography

Here, you can specify font family and style for body text and H1 – H5 headings.

Elementor > Site Settings > Button Style

Here, you can specify how your buttons should look.

Elementor > Site Settings > Image Style

Here, you can specify how your images should look.

Elementor > Site Settings > Form Fields

Here, you can edit the style of form fields.

Elementor > Site Settings > Header

Here, you can edit the header of the active theme (in this case, Hello Elementor). If you scroll down, you can optionally create a custom header using the Theme Builder.

You can also access the Theme Builder from the Elementor menu in the top left corner.

The Theme Builder allows you to create a template for various parts of your site (header, footer, single post, single page, etc).

For example, under Header, when you click to “Add New”, a popup will appear with premade header blocks to insert into your site.

The library has many types of content blocks to choose from.

For example, here are “About” blocks.

If you click the “Pages” tab in the Library, you’ll see a bunch of premade pages to insert into your website.

And if you click the “My Templates” tab, you’ll see any custom block or page templates you’ve created and saved. For example, once you’re done creating a page, you can click the down arrow in the top right corner and then click “Save as Template”.

Elementor > Site Settings > Footer

Like the header, here, you can edit the footer of the active theme (in this case, Hello Elementor). If you scroll down, you can optionally create a custom header using the Theme Builder.

Elementor > Site Settings > Site Identity

Here, you can specify a site name, description, logo, and favicon.

Elementor > Site Settings > Background

Here, you can set a background for your website. It could be a solid color, a gradient, a video, etc.

Elementor > Site Settings > Layout Settings

Here, you can specify the width of your websites content area, default container padding, the gap size between widgets, breakpoints, etc.

Elementor > Site Settings > Layout Settings

Here, you can enable image lightbox, which opens all image links in a popup window. You can edit the style of the lightbox here.

Elementor > Site Settings > Page Transitions

Here, you can specify how a page transitions from one to another, e.g. fade in, zoom in, slide, etc.

Elementor > Site Settings > Custom CSS

Here, you can enter any custom global CSS.

Elementor > Add Element > Widgets

To start building a page from scratch, you’ll click on the + icon to open the widget library. There are

  • layout widgets (flexbox and grid),
  • basic widgets (text, image, etc)
  • Pro widgets (loop grid, loop carousel, etc)
  • general widgets (tabs, accordion, etc)
  • link in bio widgets (minimalist, classic, etc)
  • site widgets (site logo, site title, etc)
  • single widgets (these are widgets for single posts, e.g. post title, post excerpt, etc)
  • WordPress widgets (pages, calendar, etc)

Add Widgets to a Page

To start building a page, drag a widget from the widget library to the location in the page where you want the widget to appear. Most of the time, you will start with a container layout widget. The default container is “Flexbox”, which is used for any type of layout. If you are created a symmetrical layout, you can choose “Grid”. Note that for each widget, there are 3 tabs with controls to configure various settings of the widget:

  • Layout
  • Style
  • Advanced

As you can see below. I’ve added a simple flexbox container to the page.

Now, let’s add some text on the left and an image on the right. Drag the text widget to the container. There is placeholder text.

Now, drag the image widget to the container. By default, we see a huge placeholder image and it appears below the text.

In the Content tab of the image widget settings, let’s replace the image with any test image.

Our page now looks like this.

Since we want the text and image to be in a row, we need to click on the container (6 dots)

and then click “Row” (right arrow) under “Items”.

The page now looks like this.

Tablet Preview

In the top center of the Elementor editor, you will see which page you are editing with a dropdown of other pages you can edit. There are also buttons for desktop, tablet, and mobile to preview how your site looks in each device. Clicking the tablet button shows us how the page looks on table.

Mobile Preview

Similarly, we can see a preview of the page on mobile.

Elementor > Structure

If you click the Structure button in the top left, a popup will appear showing the structure of the various elements on the page except for the header and footer. Since we added a container with nested text and image blocks, we see that structure in the Structure popup.

Elementor > Preview

To preview the page, click the eye icon next to the Publish button.

Insert a Block

Below the section we just added, let’s add a premade block. Click the folder icon to add a template.

Browse the premade blocks, choose one, hover over it, and click “Insert”.

You’ll see that the block has been added to our page.

Publish

Right now, our home page still looks like this.

Click the pink Publish button in the top right and then reload your site. Your changes will be live.

Insert a Page Template

Go back to the WordPress admin and click on another page to edit, e.g. the About page.

In the WordPress editor, click the “Edit with Elementor” button to edit the page in Elementor.

Now, click the folder icon to open the template library.

Click the “Pages” tab, browse the page templates, hover over one, and click “Insert” to insert it into our About page.

We now see that page template inserted into our About page. We can edit the content and then publish it.

Browsing the premade templates, inserting them into your pages, and inspecting how they are set up is one way to learn how to create pages from scratch

Last but not least, if you need any help, you can read the Elementor docs at https://elementor.com/help/elementor-editor/

Fast and Secure Marketing Website Tech Stack Options

Before I list some common options for marketing website options, it’s worth going over a few topics first.

Speed

No matter what type of website you are building, you want it to be a fast as possible. Speed is critically important for SEO and a good UX. To achieve the fastest speed, you need the following:

  • a static website (dynamic sites like WordPress that render PHP files with each request are slower)
  • hosting the website files on a content delivery network (CDN)
  • optimized and compressed images, preferably using a dedicated CDN like ImageKit or Cloudinary)
  • optimized and minified CSS, e.g. using Tailwind CSS to build only the CSS that is needed)
  • optimized and minified JavaScript
  • other techniques such as lazy-loading of images and infinite caching with unique (e.g. with a timestamp) asset filenames whenever a file changes

Security

Having a secure website is critical, especially for businesses. Some best practices for website security are

  • delivering a static website since dynamic ones, e.g. WordPress powered by PHP and numerous plugins by different authors are much easier to hack
  • multi-factor Authentication (MFA) (If you are using a CMS like WordPress, you can add 2FA to each user’s login. You can also restrict access to the admin panel to just a block of IP addresses for your company and requiring VPN access)
  • implementing a Zero Trust policy, where you assume everyone who has access is a potential threat and proceeding accordingly
  • applying a principle of least privilege (POLP) by limited user access to the minimum needed
  • requiring complex passwords
  • rotating passwords by forcing users to change their password regularly
  • keeping all dependencies up to date, including WordPress plugins
  • deleting using WordPress plugins rather than just deactivating them (yes, it’s possible to hack a WordPress site even via a deactivated plugin)
  • having regular backups
  • implement a Content Security Policy (CSP), which limits which resources can be loaded and from what domain
  • add SSL/TLS to transfer data encrypted (check SSL Labs and Hardenize for configuration recommendations)
  • use a code-scanning service to regularly check version control for sensitive data
  • rename default file / folder names, e.g. wp-admin for WordPress
  • disable unused features, e.g. WordPress’ REST API URLs

Content Management System

WordPress with or without a builder

WordPress is the #1 most popular CMS. If you use the default WYSIWYG editor (Gutenberg), you can create simple web pages, but if you want to more design and layout customization options without coding, you’ll need to use a website builder plugin like Elementor, Oxygen Builder, and WPBakery. With so many plugins, you can easily add website features like a hero carousel without coding by just installing a plugin and using it. However, it’s important to know WordPress’ limitations:

  • slower than a static site because the live site has to be dynamically rendered from PHP files first
  • less secure than a static site
  • development and customizations are somewhat limited or come with a learning curve as you have to work within the WordPress’ ecosystem
  • content is stored in a database, which is less user-friendly to work with for developers
  • version control uses WordPress’ custom versioning system rather than industry-standard git

Webflow

Webflow is a popular website builder that provides a WYSIWYG interface for creating very custom-looking websites. Its UI is powerful, but the many options may make it overwhelming for non-technical users. Websites are either hosting on Webflow’s servers or you can manually export a static version of the site each time you want it.

Headless CMS like Contentful

Contentful is a headless CMS. It allows you to create custom content models. Content is stored in Contentful and then fetched using the Contentful API. Note that you can also use WordPress in a headless manner via the REST API and WPGraphQL.

Content Contributors

Some marketing leaders will insist that many or all members of marketing, most of whom are non-technical, should be able to update the website. From my experience, most marketers don’t want to update the website themselves, even if they knew how to. They prefer to just open a ticket, like in Asana, or worse yet, send an email or a chat message asking for an update to be made. If non-technical

Having said that, from my experience, the one section of a website that is updated very frequently is the blog by many different authors. Unlike product pages, which are created once in a while, and tend to have fancy designs with animation, blog posts are very simple and they follow the same simple template. As such, it would make sense for non-technical people to be able to stage blog posts using a CMS.

Development Time

React

Even though React is the most popular JavaScript library for building user interfaces (UIs) with reusable components, that doesn’t mean it’s the best (I prefer Svelte) nor is it needed for all types of websites. I think most developers would agree with me that React is better suited for interactive web applications rather than primarily static marketing websites. Though you can create a static marketing website with React and a framework like Next.js, it makes no sense to because there will be a lot of unnecessary overhead that will slow down development and updates.

Dynamic functionality

You might argue that you need React for some dynamic functionality in your marketing website, like a page to filter resources. First of all, unlike SaaS web apps, where each company’s app have different requirements, most marketing websites have more or less the same functionality. For example, if you need a page to filter resources, you can use the Hushly Content Hub. Not only does it provide fully customizable filtering functionality and design, it allows non–technical marketers to log in and upload resources themselves, so web developers don’t have to waste time doing non-development work. Another common type of dynamic functionality is an ROI calculator. There are many services that provide this and which are easily customizable, e.g. grid.is.

Of course, there may be a time when you need a custom solution, but it doesn’t make sense to have your entire website depend on React or Svelte or some other JavaScript library just for a few edge cases. In this case, developers can use React and Svelte to create a frontend-only app.

Image Optimization

You really don’t need to waste time manually optimizing images anymore. Not only is that time-consuming, you can mostly get better results by using a dedicated image optimizer and CDN like ImageKit and Cloudinary.

Now that that’s out of the way, here are some options I’d recommend for a marketing website.

Marketing Website Tech Stack Options

Option 1

If non-technical people will only update certain parts of the website, e.g. press releases and blog posts, and if there are sufficient and skilled developer resources, then I recommend the following stack:

  • Eleventy or similar (for static site generation)
  • GitHub or similar (for version control – text files only)
  • Netlify or similar (for CI/CD and hosting)
  • Contentful or similar (a headless CMS for custom content models)
  • WordPress (used in a headless manner via the REST API or GraphQL for blog posts)
  • WPengine or similar (for WordPress hosting)
  • Tailwind CSS (for optimized CSS)
  • Tailwind UI or similar (component library – optional)

Option 2

If non-technical people will update most of the site and the site and/or there are limited developer resources, then I recommend the following stack:

  • WordPress (used in a headless manner)
  • WPengine or similar (for WordPress CMS hosting)
  • Simply Static (a WordPress static site generator plugin)
  • Github or similar (for storing static files and for version control)
  • Netlify or similar (for CI/CD and production website hosting)
  • ShortPixel (for image optimization)
  • Advanced Custom Fields / ACF (for if you need custom fields)
  • Elementor or similar (website builder – optional)

In both cases, I recommend the following as well.

  • Cloudflare (for at-cost domain registration and DNS management)
  • AWS S3 or similar (for hosting binaries – images, PDFs, etc)
  • AWS Cloudfront or similar (for delivering non-image binaries, e.g. PDFs)
  • ImageKit, Cloudinary or similar (for automatic image optimization)

Easily Create a Website Using Pre-made Components

In this tutorial, I’ll explain how you can easily create a website using pre-made components.

Note that the following is just one of many ways you can do this.

1. Install Parcel

Parcel in a simple, zero-configuration build tool. Here are some of its features.

  • It works with static HTML files, but it can also work with React and many other file types.
  • Parcel includes a development server out of the box with auto-reload.
  • Clear error messages and diagnostics
  • Fast build times
  • HTML, CSS, JS modification and compression using Gzip and Brotli
  • Image optimization (although I prefer an image CDN like ImageKit for that)
  • Parcel automatically includes content hashes in the names of all output files. This enables long-term browser caching.

2. Install Tailwind CSS

Tailwind CSS is a utility-first CSS framework.

Instructions on how to install both Parcel and Tailwind CSS.

If you will have CSS files separate from Tailwind CSS, in your tailwind.config.js file, make sure to add “css” as a file option.

3. Update Configs, Set Up Git, and Test Locally

Add a source and scripts to your package.json by copying the source and scripts to it so that it looks like below. Remove the “main”: “index.js” if it exists. Note that we’re using the glob ./src/**/*/index.html to tell Parcel to build all HTML files in all directories.

Run npm run build to test building the pages.

Run npm start to start a local dev server.

Open a browser and go to the server URL provided to verify the test page loads. Make a change to the HTML and Tailwind CSS classes to verify that changes are processed and the page auto-refreshes in the browser.

4. Set Up Git and Push to GitHub

  • Run git init to initialize a new local git repo.
  • Create a .gitignore file with the following contents
node_modules
.parcel-cache
.env
dist
  • Create a repo in GitHub and push your local changes to it, e.g.
git add *
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:javanigus/test-tailwind-site.git
git push -u origin main

All files in your GitHub repo should be there except for the ones in the .gitignore file.

5. Set Up Deployments to GitHub Pages

Install the gh-pages package by running npm install gh-pages --save-dev.

Add the following scripts to your package.json file:

"predeploy": "rm -rf dist .parcel-cache && parcel './src/**/*.html' build --public-url ./",
"deploy": "gh-pages -d dist"

The predeploy script will run the npm run build command before deploying to ensure that the latest production-ready files are used. You need to clear the cache by deleting the .parcel-cache folder first. Also, since GitHub Pages publishes your website in a folder below the root domain, you need to add a “public-url” flag to tell Parcel to remove the slash (/) for relative dependencies like CSS and JS files to avoid getting a 404 error.

Run npm run predeploy

The deploy script will use the gh-pages package to deploy the contents of the dist directory to the gh-pages branch of your GitHub repository.

Run npm run deploy

View your site at https://<username>.github.io/<repository>/. In my case, that’s https://javanigus.github.io/test-tailwind-ui-site/.

In GitHub, if you go to Settings > Pages, you’ll see that the commands above configure GitHub Pages for you.

6. Add Pre-made Sections to Your HTML Pages

You can use Tailwind UI to copy and paste a bunch of sections like header, footer, hero, contact us, etc.

https://tailwindui.com/components

You can also get Tailwind components from

7. Add Pre-made UI Elements to Your HTML Pages

You can use Material Tailwind to copy and paste a bunch of elements like buttons, cards, accordions, lists, tables, etc. You’ll first need to add the Material Tailwind CSS and JS to your HTML pages first.

Ripple Effect

<!-- from node_modules -->
<script src="node_modules/@material-tailwind/html@latest/scripts/ripple.js"></script>
 
<!-- from cdn -->
<script src="https://unpkg.com/@material-tailwind/html@latest/scripts/ripple.js"></script>

Icons

<!-- Material Icons Link -->
<link
  href="https://fonts.googleapis.com/icon?family=Material+Icons"
  rel="stylesheet"
/>
 
<!-- Font Awesome Link -->
<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css"
  integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w=="
  crossorigin="anonymous"
/>

8. Add Icons

Easily add icons from FontAwesome or SVG Repo.

9. Add Fonts

Find and load fonts for free from Google Fonts.

10. Add Backgrounds

Your page sections will look boring if they are just plain white. Here are some background ideas:

For example, I use this gradient background animation for the announcement banner commonly found stuck to the top of websites. You can find free images at Unsplash. You can find SVG backgrounds from svgbackgrounds.com. I also used one of the button styles from here. I also used one of the button styles from here. You can also use AI to create abstract backgrounds.

11. Add Animation

I like anime.js. The documentation is clear and integration is simple. Just add a reference to the animeJS library on a cdn like CDNJS. Then, add write some JavaScript that uses animeJS in your main JavaScript file. If you want your animations to run when users scroll to a particular section of your site, you can add the Waypoints library from a CDN as well. In my example website, I first hide all elements by setting their opacity to 0. Then, I use Waypoints + AnimeJS to animate different elements. Here’s my code. I ended up loading jQuery, animeJS and Waypoints along with my main JS file at the bottom of the <body> element.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.2/anime.min.js" integrity="sha512-aNMyYYxdIxIaot0Y1/PLuEu3eipGCmsEUBrUq+7aVyPGMFH8z0eTP0tkqAvv34fzN6z+201d3T8HPb1svWSKHQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/noframework.waypoints.min.js" integrity="sha512-fHXRw0CXruAoINU11+hgqYvY/PcsOWzmj0QmcSOtjlJcqITbPyypc8cYpidjPurWpCnlB8VKfRwx6PIpASCUkQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="main.js"></script>

12. Deploy

Whenever you’re done making a change, just run the following deployment commands.

npm run predeploy
npm run deploy

Here’s a test site I created. Not too bad for a day’s work.

https://javanigus.github.io/test-tailwind-ui-site

Next steps:

Additional Resources

GA4: Find Previous Page Path in Google Analytics

Things have definitely moved around and look different in the UI for GA4 (Google Analytics v4) vs UA (Universal Analytics). If you’re looking how to find pages that link to a particular page (previous page path), then you need to use Path Exploration.

Explore > Path Exploration

If you see an existing path exploration, click “Start Over”. Then, click “Ending Point” and choose an option. I prefer to choose “Page path and screen class” since page paths are easy and unique to get.

You can then choose one of the available paths or click the magnifying glass to type in a path, e.g. /resources/.

You will then see how often people click on a link on a page that takes them to your ending point (page) within a particular time range.

In the Variables section on the left, you can change the date range and other variables.

Web Designer Interview Questions

  1. From a web design point of view, what do you think of  
    1. Are you currently employed? If so, why are you looking for another job? 
    1. What have been your key responsibilities as a web designer? 
    1. Describe your experience designing websites. 
    1. How familiar are you with HTML and CSS? 
    1. Do you have a portfolio of web designs? 
    1. Have you created any websites yourself, whether from scratch or from WYSIWYG tools like Webflow? 
    1. On a scale of 1-10, with 10 being the most proficient, rate your proficiency in Photoshop. 
    1. On a scale of 1-10, with 10 being the most proficient, rate your proficiency in Figma. 
    1. Do you have a portfolio of websites you’ve designed? 
    1. Do you use a grid system when you create designs? 
    1. What is a responsive web design? 
    1. Are you familiar with website breakpoints? 
    1. What are some bad examples of web design? 
    • An outdated or inadequate web design. 
    • Poor website navigation. 
    • Convoluted or unclear user journeys. 
    • Excessive use of images, icons, colors, and textures. 
    • Poor quality images. 
    • Mobile optimization is not available. 
              1. What’s the web design project you’re most proud of? 
              1. Describe your end-to-end process when working on a web design task. 
              1. Have you ever been involved in a complete website redesign project? 
              1. Describe what UX is and why it is important. 
              1. Describe your experience with website animation. 
              1. Do you have experience designing icons from scratch or editing existing icons or do you rely solely on a library of premade icons? 
              1. Do you have experience creating vector images from scratch, e.g. using Adobe Illustrator? 
              1. Have you created any animations using Adobe AfterEffects? 
              1. When designing for web, have you leveraged any website component libraries like Tailwind UI and Flowbite? 
              1. A common workflow we have is to take a Word document containing web page content and turn it into a web design in Figma. Is this something you can do? 
              1. Unlike print designs, websites are living documents, meaning that the content, whether text or images, often changes. As such web designs need to be versatile to accommodate such changes. For example, if a design calls for a box containing paragraph with 5 lines of text, e.g. a customer quote, that same design may not look good the customer was replaced with one spanning 10 lines of text. Do you have experience facing such web designs issues? 
              1. Have you worked with any website templates before? 
              1. Describe your level of passion for web design. 
              1. How do you keep abreast of web design trends, e.g. do you follow certain groups, attend conferences, read certain blogs, etc? 
              1. The marketing department at Qualys is very fast-paced with many last-minute requests. Do you have experience in and would you be comfortable in such an environment? 
              1. Do you have experience designing marketing websites and/or landing pages to drive signups? 
              1. Do you have experience designing websites with SEO in mind?  
              1. Qualys is a multi-national company with offices around the world. Sometimes, you may need to work outside of normal business hours. Is that okay for you or do you have a strict 9-5 schedule? 
              1. Where do you go for design inspiration? 
              1. Are there certain websites that you particularly like the design of, e.g. apple.com, yahoo.com, etc? 
              1. Please take 15 mins to make a list of design choices you like and dislike on www.qualys.com and explain why.
              1. Describe a web design project you worked on that didn’t go as planned. What could you have done better? 
              1. Do you have experience with ADA compliance as it pertains to web design, e.g. 
              • Color contrast 
              • Accessibility of web forms 
              • Etc  
                  1. What tools do you use the most when designing? 
                  1. Some designs are full-width. How do you handle such designs if a user’s monitor is very wide? 
                  1. When designing for web, do you prefer to start with a mobile design (mobile-first design) or a desktop design? 

                  Programmatically Convert a Large Static HTML Website Into One with Header and Footer Partials

                  Let’s say you’ve inherited a large website that uses some home-grown static site generator (SSG) and there’s no documentation. Your build and release infrastructure is fragile and also custom. Your git repo is massive with content from two decades, including lots of binary files. You want to migrate this massive piece of shit to a popular SSG like Eleventy and you want to use a reliable deployment system like GitHub + Netlify. Let’s say you can’t migrate all source files because there’s no easy way to do so between your custom SSG and Eleventy. If you’re willing to sacrifice most of your layouts and partials (includes) and just migrate everything all of the built static files to Eleventy with one partial for the header and one for the footer, then here’s one way to do it.

                  1. Copy Your Static Site to a New Folder

                  If you don’t have access to the SSG and the web servers, you can download the whole website from the internet using wget.

                  2. Copy the Header and Footer Code Blocks to Separate Files

                  Let’s say your HTML looks something like this.

                  <html>
                  <head>
                  	...
                  </head>
                  <body>
                  <header class="header">
                  	<div>Logo</div>
                  	<ul>
                  		<li>Link 1</li>
                  		<li>Link 2</li>
                  	</ul>
                  </header>
                  <section>
                  	<p>Hello, World!</p>
                  </section>
                  <footer class="footer">
                  	<p>Copyright 2024</p>
                  	<div>blah blah blah</div>
                  </footer>
                  </body>
                  </html>

                  In this case, you can create separate files like this:

                  /includes/header.njk

                  <header class="header">
                  	<div>Logo</div>
                  	<ul>
                  		<li>Link 1</li>
                  		<li>Link 2</li>
                  	</ul>
                  </header>

                  /includes/footer.njk

                  <footer class="footer">
                  	<p>Copyright 2024</p>
                  	<div>blah blah blah</div>
                  </footer>

                  3. Search and Replace the Header Code Block with a Include

                  For simplicity, let’s say that your HTML looks something like this:

                  <html>
                  <head>
                  	...
                  </head>
                  <body>
                  <div class="header">
                  	<div>Logo</div>
                  	<ul>
                  		<li>Link 1</li>
                  		<li>Link 2</li>
                  	</ul>
                  </div>
                  <section>
                  	<p>Hello, World!</p>
                  </section>
                  <div class="footer">
                  	<p>Copyright 2024</p>
                  	<div>blah blah blah</div>
                  </div>
                  </body>
                  </html>

                  If your header and footer code blocks don’t use unique HTML tags like “header” and “footer”, then you may have a problem searching and replacing these code blocks. For example, in VS Code, if I try to select the header block beginning with <div class="header">, I can’t do so due to the nested div tag.

                  Using the regex

                  <div class="header"(.|\n)*?</div>

                  notice how the selection ends prematurely at the closing nested div tag. In this situation, you can update your source code to replace the open and closing div tags with the standard <header> tag. You can do the same with the footer by using the <footer> tag. After updating the source code, you can rebuild your static HTML pages and then use a regex like

                  <header class="header"(.|\n)*?</header>
                  <footer class="footer"(.|\n)*?</footer>

                  to search and replace the header and footer code blocks with a code reference that includes those code blocks using whatever template engine you want to use.

                  If you want to use the Nunjucks template engine, for example, then you can replace those code blocks with something like

                  {% include "header.njk" %}
                  {% include "footer.njk" %}

                  4. Rename file extensions

                  Rename all HTML files so their extensions are .njk instead of .html.

                  5. Install an SSG

                  Create a new folder and install an SSG. In this case, I’ll install Eleventy.

                  mkdir mysite 
                  cd mysite
                  npm init -y
                  npm install --save-dev @11ty/eleventy

                  Move your website files to your new Eleventy project. To follow Eleventy’s default conventions, your folder structure should look something like this.

                  Note that we put the header and include partials in the “_includes” folder under the “src” folder. Therefore, our header and footer include references should be updated to look like this

                  <html>
                  <head>
                  	<title>Home Page</title>
                  </head>
                  <body>
                  {% include "src/_includes/header.njk" %}
                  <section>
                  	<p>Hello, World!</p>
                  </section>
                  {% include "src/_includes/footer.njk" %}
                  </body>
                  </html>

                  6. Test

                  If you don’t create an Eleventy config file, then Eleventy will use all of its defaults and output built files to a “_site” folder and it will build the partials as well.

                  Since we don’t want to build the partials, let’s create an Eleventy config file.

                  7. Create an Eleventy config file

                  In the project root, create a file called .eleventy.js with the following content.

                  module.exports = function(eleventyConfig) {
                  	eleventyConfig.addPassthroughCopy("src", {
                  		//debug: true,
                  		filter: [
                  			"404.html",
                  			"**/*.css",
                  			"**/*.js",
                  			"**/*.json",
                  			"!**/*.11ty.js",
                  			"!**/*.11tydata.js",
                  		]
                  	});
                    
                  	// Copy img folder
                  	eleventyConfig.addPassthroughCopy("src/img");
                  
                  	eleventyConfig.setServerPassthroughCopyBehavior("copy");
                  
                  	return {
                  		dir: {
                  			input: "src",
                  			// ⚠️ These values are both relative to your input directory.
                  			includes: "_includes",
                  			layouts: "_layouts",
                  		}
                  	}
                  };

                  If you rerun Eleventy, you’ll see that the partials are not built and copied to the output folder.

                  8. Create a layout (optional)

                  If you want your page content to be wrapped in other content, you can create a layout. This is called template inheritance. Both Nunjucks and 11ty have their own template inheritance mechanism. With Nunjucks, you inherit a parent template using 

                  {% extends "parent.njk" %}. 

                  With 11ty, you inherit a parent template using front matter, e.g.

                  ---
                  layout: parent.njk
                  ---

                  Nunjucks supports template blocks natively, but it doesn’t support front matter. 11ty supports front matter, but it doesn’t support template blocks natively. Learn more about creating a layout using 11ty’s template inheritance mechanism.