<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Knowledge Basement</title>
  <subtitle>Practical Linux, Java, DevOps, security, and open source tutorials for developers and system administrators.</subtitle>
  <link href="https://www.knowledgebasement.com/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="https://www.knowledgebasement.com/" rel="alternate" type="text/html"/>
  <updated>2026-08-01T08:00:00Z</updated>
  <id>https://www.knowledgebasement.com/</id>
  <author>
    <name>Knowledge Basement Team</name>
    <email>tollodim@gmail.com</email>
  </author>
  <entry>
    <title>AI Agents Are the New Attack Surface: How to Secure Tool-Using LLM Apps in 2026</title>
    <link href="https://www.knowledgebasement.com/ai-agents-new-attack-surface-secure-llm-apps/" rel="alternate" type="text/html" title="AI Agents Are the New Attack Surface: How to Secure Tool-Using LLM Apps in 2026"/>
    <published>2026-08-01T08:00:00Z</published>
    <updated>2026-08-01T08:00:00Z</updated>
    <id>https://www.knowledgebasement.com/ai-agents-new-attack-surface-secure-llm-apps/</id>
    <summary>Learn how to secure AI agents, tool-calling LLM apps, MCP servers, and RAG workflows against prompt injection, data leakage, tool abuse, and AI supply-chain risks.</summary>
    <content type="html">&lt;h1&gt;AI Agents Are the New Attack Surface: How to Secure Tool-Using LLM Apps in 2026&lt;/h1&gt;
&lt;p&gt;AI security is moving fast because AI applications are no longer just chat boxes. Modern LLM apps can search private documents, call internal APIs, create tickets, send emails, write code, browse websites, run workflows, and connect to Model Context Protocol (MCP) servers. That makes them useful, but it also makes them a new security boundary.&lt;/p&gt;
&lt;p&gt;The most important shift is this: &lt;strong&gt;an AI agent is not just a model. It is a model plus tools, data, permissions, memory, prompts, plugins, connectors, and users.&lt;/strong&gt; Every one of those pieces can become an attack surface.&lt;/p&gt;
&lt;p&gt;If you are building or operating an AI feature in 2026, the question is no longer &amp;quot;Is the model smart enough?&amp;quot; The question is: &lt;strong&gt;what can the model reach, what can it change, and what happens when untrusted input influences it?&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Why AI agent security matters now&lt;/h2&gt;
&lt;p&gt;For the first wave of LLM adoption, many teams used AI for low-risk tasks: summarizing public text, drafting documentation, or helping developers brainstorm. The risk was real, but the blast radius was limited.&lt;/p&gt;
&lt;p&gt;Now the trend is agentic AI:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;customer-support agents that can refund orders or update records&lt;/li&gt;
&lt;li&gt;developer agents that can read repositories and open pull requests&lt;/li&gt;
&lt;li&gt;security copilots that can inspect logs and trigger workflows&lt;/li&gt;
&lt;li&gt;enterprise search assistants connected to internal documents&lt;/li&gt;
&lt;li&gt;MCP servers that expose tools and data to LLM clients&lt;/li&gt;
&lt;li&gt;AI browser agents that interact with third-party websites&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This changes the risk profile. A prompt injection that only caused a silly answer in 2023 can become a workflow manipulation issue in 2026 if the agent can call privileged tools.&lt;/p&gt;
&lt;h2&gt;The core problem: LLMs mix instructions with data&lt;/h2&gt;
&lt;p&gt;Traditional applications try to keep instructions and data separate. Code defines what should happen. Data is input.&lt;/p&gt;
&lt;p&gt;LLM applications blur that boundary. The model receives system instructions, developer prompts, user messages, retrieved documents, tool results, website content, email text, and chat history in one context window. Some of that content is trusted. Some of it is not. The model must infer what to follow and what to ignore.&lt;/p&gt;
&lt;p&gt;That is why prompt injection is such a persistent problem. It is not just a funny prompt trick. It is an architectural weakness that appears when untrusted text is allowed to influence an AI system that has access to tools, secrets, or sensitive data.&lt;/p&gt;
&lt;p&gt;A safer mindset is simple:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Treat every external document, webpage, email, ticket, PDF, chat message, and tool result as untrusted input.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;The 7 AI agent security risks to watch&lt;/h2&gt;
&lt;h3&gt;1. Prompt injection&lt;/h3&gt;
&lt;p&gt;Prompt injection happens when untrusted content attempts to override the agent&#39;s intended instructions. It can appear in a user message, a webpage, a document in a RAG index, or a tool response.&lt;/p&gt;
&lt;p&gt;The goal is usually to make the model ignore rules, reveal hidden data, call a tool incorrectly, or produce a response that benefits the attacker.&lt;/p&gt;
&lt;p&gt;The defense is not one magic prompt. You need layered controls: scoped tools, approval gates, output filtering, retrieval hygiene, and least privilege.&lt;/p&gt;
&lt;h3&gt;2. Tool abuse&lt;/h3&gt;
&lt;p&gt;Tool calling turns an LLM from a text generator into an actor. If an agent can send email, update a database, run a script, or call an internal API, a bad instruction can become a real action.&lt;/p&gt;
&lt;p&gt;The safest approach is to treat tool calls like privileged operations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;give each tool a narrow purpose&lt;/li&gt;
&lt;li&gt;validate every argument server-side&lt;/li&gt;
&lt;li&gt;require confirmation for destructive actions&lt;/li&gt;
&lt;li&gt;log all tool calls&lt;/li&gt;
&lt;li&gt;separate read-only tools from write tools&lt;/li&gt;
&lt;li&gt;use short-lived credentials&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;3. Data leakage through context&lt;/h3&gt;
&lt;p&gt;LLM apps often collect more context than they need. They may pass internal documents, chat history, API responses, or user profile data into a prompt. If the agent later summarizes or transforms that data for the wrong user, sensitive information can leak.&lt;/p&gt;
&lt;p&gt;The fix is boring but effective: minimize context. Retrieve only what is necessary, enforce authorization before retrieval, and never rely on the model to decide whether a user is allowed to see a document.&lt;/p&gt;
&lt;h3&gt;4. RAG poisoning&lt;/h3&gt;
&lt;p&gt;Retrieval-Augmented Generation (RAG) systems can be poisoned when malicious or low-quality content enters the knowledge base. If the model trusts retrieved text too much, poisoned content can manipulate answers or tool calls.&lt;/p&gt;
&lt;p&gt;For enterprise RAG, security starts before embedding:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;verify content sources&lt;/li&gt;
&lt;li&gt;track document ownership and sensitivity&lt;/li&gt;
&lt;li&gt;preserve access-control metadata&lt;/li&gt;
&lt;li&gt;scan newly indexed content&lt;/li&gt;
&lt;li&gt;separate public, internal, confidential, and regulated data&lt;/li&gt;
&lt;li&gt;expire stale documents&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;5. MCP and plugin supply-chain risk&lt;/h3&gt;
&lt;p&gt;MCP is becoming popular because it makes it easier to connect AI clients to tools and data sources. That convenience creates a new supply-chain problem: every MCP server or plugin can expose capabilities to an agent.&lt;/p&gt;
&lt;p&gt;Before connecting a new MCP server, ask:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Who maintains it?&lt;/li&gt;
&lt;li&gt;What tools does it expose?&lt;/li&gt;
&lt;li&gt;Does it read files, environment variables, tokens, or network resources?&lt;/li&gt;
&lt;li&gt;Can it perform write operations?&lt;/li&gt;
&lt;li&gt;How is it authenticated?&lt;/li&gt;
&lt;li&gt;Are calls logged and reviewable?&lt;/li&gt;
&lt;li&gt;Can it be sandboxed?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Treat MCP servers like dependencies with runtime permissions, not like harmless configuration.&lt;/p&gt;
&lt;h3&gt;6. Insecure memory&lt;/h3&gt;
&lt;p&gt;Agent memory can improve user experience, but it can also preserve sensitive information, wrong assumptions, or injected instructions. Long-term memory should not become a hidden prompt that nobody audits.&lt;/p&gt;
&lt;p&gt;Good memory design includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;explicit user consent&lt;/li&gt;
&lt;li&gt;clear retention limits&lt;/li&gt;
&lt;li&gt;sensitivity filtering&lt;/li&gt;
&lt;li&gt;easy deletion&lt;/li&gt;
&lt;li&gt;tenant isolation&lt;/li&gt;
&lt;li&gt;audit trails&lt;/li&gt;
&lt;li&gt;separation between facts, preferences, and instructions&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;7. Over-trusting AI output&lt;/h3&gt;
&lt;p&gt;Even when there is no attacker, LLMs can hallucinate. In security-sensitive systems, a confident wrong answer can still cause damage.&lt;/p&gt;
&lt;p&gt;Use deterministic checks where accuracy matters. For example, let the AI propose a configuration change, but validate it with tests, policy checks, and human review before deployment.&lt;/p&gt;
&lt;h2&gt;A practical architecture for safer AI agents&lt;/h2&gt;
&lt;p&gt;A safer agent architecture looks less like &amp;quot;LLM connected to everything&amp;quot; and more like a controlled workflow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;User request enters the application&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Application authenticates and authorizes the user&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retriever fetches only documents the user can access&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Policy layer decides which tools are available for this user and task&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LLM plans or drafts an action&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool gateway validates arguments and permissions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High-risk actions require confirmation or approval&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Outputs are filtered for sensitive data and unsafe content&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;All prompts, retrievals, tool calls, and decisions are logged&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The key idea: &lt;strong&gt;the model should not be the security boundary.&lt;/strong&gt; Your application, identity system, policy engine, and tool gateway should enforce the rules.&lt;/p&gt;
&lt;h2&gt;The AI agent security checklist&lt;/h2&gt;
&lt;p&gt;Use this checklist before shipping an AI agent to production.&lt;/p&gt;
&lt;h3&gt;Identity and access control&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Does the app authenticate every user?&lt;/li&gt;
&lt;li&gt;Does retrieval enforce document-level authorization?&lt;/li&gt;
&lt;li&gt;Are tool permissions based on user role and task context?&lt;/li&gt;
&lt;li&gt;Are service accounts scoped to the minimum required permissions?&lt;/li&gt;
&lt;li&gt;Are credentials short-lived and rotated?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Prompt and context safety&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Are system prompts stored and versioned?&lt;/li&gt;
&lt;li&gt;Is untrusted content clearly separated from trusted instructions?&lt;/li&gt;
&lt;li&gt;Do prompts tell the model to treat retrieved content as data, not commands?&lt;/li&gt;
&lt;li&gt;Is sensitive data minimized before it enters the context window?&lt;/li&gt;
&lt;li&gt;Are secrets blocked from prompts and logs?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Tool safety&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Are tools narrow and purpose-built?&lt;/li&gt;
&lt;li&gt;Are tool inputs validated with schemas and server-side checks?&lt;/li&gt;
&lt;li&gt;Are destructive actions gated by confirmation?&lt;/li&gt;
&lt;li&gt;Are read and write tools separated?&lt;/li&gt;
&lt;li&gt;Are tool calls logged with user, timestamp, arguments, and result?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;RAG safety&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Are documents classified by sensitivity?&lt;/li&gt;
&lt;li&gt;Is source metadata preserved with embeddings?&lt;/li&gt;
&lt;li&gt;Is stale or untrusted content removed from indexes?&lt;/li&gt;
&lt;li&gt;Can users only retrieve documents they are allowed to access?&lt;/li&gt;
&lt;li&gt;Are citations shown so users can verify answers?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Monitoring and response&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Do you log prompt injection attempts?&lt;/li&gt;
&lt;li&gt;Can you trace an answer back to retrieved documents and tool calls?&lt;/li&gt;
&lt;li&gt;Are anomalous tool-call patterns detected?&lt;/li&gt;
&lt;li&gt;Is there a way to revoke an agent&#39;s permissions quickly?&lt;/li&gt;
&lt;li&gt;Do you have an incident response plan for AI data leakage?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What to log without creating a privacy problem&lt;/h2&gt;
&lt;p&gt;Logging is essential for AI security, but logging everything can create another sensitive-data store. A good logging strategy captures enough for investigation without storing unnecessary secrets.&lt;/p&gt;
&lt;p&gt;Useful fields include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;user ID or tenant ID&lt;/li&gt;
&lt;li&gt;model and prompt version&lt;/li&gt;
&lt;li&gt;retrieval source IDs, not full confidential documents&lt;/li&gt;
&lt;li&gt;tool name and validated arguments&lt;/li&gt;
&lt;li&gt;policy decisions&lt;/li&gt;
&lt;li&gt;approval events&lt;/li&gt;
&lt;li&gt;safety filter results&lt;/li&gt;
&lt;li&gt;error codes and latency&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Avoid logging raw secrets, full private documents, authentication tokens, and unnecessary personal data. If raw prompt logging is needed for debugging, restrict access and apply retention limits.&lt;/p&gt;
&lt;h2&gt;How to handle prompt injection realistically&lt;/h2&gt;
&lt;p&gt;You cannot solve prompt injection with a single instruction like &amp;quot;ignore malicious prompts.&amp;quot; That instruction may help, but it is not enough.&lt;/p&gt;
&lt;p&gt;A realistic defense uses layers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Design for least privilege&lt;/strong&gt; so a compromised prompt has limited power.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep untrusted content away from privileged tools&lt;/strong&gt; where possible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Classify tools by risk&lt;/strong&gt; and require confirmation for high-impact actions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validate tool calls outside the model&lt;/strong&gt; with schemas and business rules.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Show citations&lt;/strong&gt; so users can inspect where answers came from.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run adversarial tests&lt;/strong&gt; using realistic malicious documents and webpages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor production behavior&lt;/strong&gt; for suspicious tool use or repeated policy violations.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The goal is not to make prompt injection impossible. The goal is to make it difficult to exploit and low-impact when it happens.&lt;/p&gt;
&lt;h2&gt;A simple 30-day hardening plan&lt;/h2&gt;
&lt;p&gt;If your team already has an AI feature in production, start with the controls that reduce blast radius quickly.&lt;/p&gt;
&lt;h3&gt;Week 1: Inventory&lt;/h3&gt;
&lt;p&gt;List every AI feature, model, prompt, data source, tool, plugin, MCP server, and credential. Identify which agents can perform write actions.&lt;/p&gt;
&lt;h3&gt;Week 2: Least privilege&lt;/h3&gt;
&lt;p&gt;Remove unnecessary tools. Split broad tools into narrow tools. Reduce service-account permissions. Add confirmation for high-impact actions.&lt;/p&gt;
&lt;h3&gt;Week 3: Retrieval and data controls&lt;/h3&gt;
&lt;p&gt;Verify authorization before retrieval. Add sensitivity labels. Remove stale documents. Ensure confidential data is not mixed with public indexes.&lt;/p&gt;
&lt;h3&gt;Week 4: Monitoring and testing&lt;/h3&gt;
&lt;p&gt;Add structured logs. Create prompt injection test cases. Review suspicious tool calls. Document an AI-specific incident response process.&lt;/p&gt;
&lt;p&gt;This plan will not make your AI system perfect, but it will make it noticeably harder to abuse.&lt;/p&gt;
&lt;h2&gt;What developers should remember&lt;/h2&gt;
&lt;p&gt;AI security is not only a model problem. It is application security, cloud security, data governance, identity, supply-chain security, and product design combined.&lt;/p&gt;
&lt;p&gt;The safest AI products usually share the same traits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the agent has limited permissions&lt;/li&gt;
&lt;li&gt;every sensitive action is verified outside the model&lt;/li&gt;
&lt;li&gt;untrusted content is treated as hostile until proven otherwise&lt;/li&gt;
&lt;li&gt;retrieval respects access control&lt;/li&gt;
&lt;li&gt;logs make behavior explainable&lt;/li&gt;
&lt;li&gt;users can see sources and approve risky actions&lt;/li&gt;
&lt;li&gt;teams test the AI system like they test any other exposed application&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Final thoughts&lt;/h2&gt;
&lt;p&gt;AI agents are powerful because they can reason over data and take action through tools. That is also why they need security engineering from day one.&lt;/p&gt;
&lt;p&gt;The winning teams in 2026 will not be the teams that connect an LLM to the most tools as quickly as possible. They will be the teams that build useful AI systems with clear boundaries, narrow permissions, auditable actions, and resilient workflows.&lt;/p&gt;
&lt;p&gt;If you are building an AI agent, start with one principle: &lt;strong&gt;never give a model more access than you are prepared to monitor, validate, and revoke.&lt;/strong&gt;&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Security"/>
    <category term="AI Security"/>
  </entry>
  <entry>
    <title>GitHub Pages vs Netlify: Comparing Free Static Site Hosting</title>
    <link href="https://www.knowledgebasement.com/github-pages-vs-netlify-free-hosting/" rel="alternate" type="text/html" title="GitHub Pages vs Netlify: Comparing Free Static Site Hosting"/>
    <published>2026-02-05T15:00:00Z</published>
    <updated>2026-02-05T15:00:00Z</updated>
    <id>https://www.knowledgebasement.com/github-pages-vs-netlify-free-hosting/</id>
    <summary>GitHub Pages vs Netlify: Comparing Free Static Site Hosting When it comes to hosting static websites for free, GitHub Pages and Netlify are the two most…</summary>
    <content type="html">&lt;h1&gt;GitHub Pages vs Netlify: Comparing Free Static Site Hosting&lt;/h1&gt;
&lt;p&gt;When it comes to hosting static websites for free, GitHub Pages and Netlify are the two most popular options. Both platforms offer generous free tiers, automatic deployments, and custom domain support. However, they differ significantly in features, flexibility, and use cases.&lt;/p&gt;
&lt;p&gt;This guide provides a detailed comparison to help you choose the right platform for your project.&lt;/p&gt;
&lt;h2&gt;Overview&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;GitHub Pages is a free static site hosting service provided by GitHub. It serves websites directly from a GitHub repository and is tightly integrated with the GitHub ecosystem. It&#39;s particularly popular for project documentation, personal portfolios, and Jekyll-based blogs.&lt;/p&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;p&gt;Netlify is a dedicated web hosting and automation platform built specifically for modern static sites and serverless applications. It offers a broader feature set than GitHub Pages, including serverless functions, form handling, and advanced deployment options.&lt;/p&gt;
&lt;h2&gt;Feature Comparison&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;GitHub Pages&lt;/th&gt;
&lt;th&gt;Netlify&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Price&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Free tier available&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Custom domains&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;HTTPS/SSL&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes (Let&#39;s Encrypt)&lt;/td&gt;
&lt;td&gt;Yes (Let&#39;s Encrypt)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CDN&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fastly&lt;/td&gt;
&lt;td&gt;Netlify Edge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Build minutes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10 builds/hour&lt;/td&gt;
&lt;td&gt;300 minutes/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Bandwidth&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100 GB/month&lt;/td&gt;
&lt;td&gt;100 GB/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Serverless functions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes (125k requests/month)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Form handling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes (100 submissions/month)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deploy previews&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No (manual setup)&lt;/td&gt;
&lt;td&gt;Yes (automatic)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Split testing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Instant rollbacks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Build plugins&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Identity/Auth&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes (1,000 users)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Deployment and Build Process&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;GitHub Pages offers two deployment methods:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Direct deployment&lt;/strong&gt;: Serve files directly from a branch (usually &lt;code&gt;main&lt;/code&gt; or &lt;code&gt;gh-pages&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt;: Custom build workflows with more control&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Native Jekyll support without configuration&lt;/li&gt;
&lt;li&gt;Seamless integration with GitHub repositories&lt;/li&gt;
&lt;li&gt;Simple setup for basic sites&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Limited to Jekyll for automatic builds (without Actions)&lt;/li&gt;
&lt;li&gt;No built-in build environment for other frameworks&lt;/li&gt;
&lt;li&gt;Requires GitHub Actions for custom build processes&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# GitHub Actions workflow for non-Jekyll sites&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy
&lt;span class=&quot;token key atrule&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;branches&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;build-and-deploy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/checkout@v4
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/setup&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;node@v4
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;node-version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;20&#39;&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; npm ci &lt;span class=&quot;token important&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm run build
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/deploy&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;p&gt;Netlify provides automatic builds for virtually any static site generator:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Auto-detects frameworks and configures builds&lt;/li&gt;
&lt;li&gt;Built-in support for Hugo, Eleventy, Next.js, Gatsby, and more&lt;/li&gt;
&lt;li&gt;No need to write CI/CD pipelines&lt;/li&gt;
&lt;li&gt;Build plugins extend functionality&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build minutes are limited on the free tier&lt;/li&gt;
&lt;li&gt;Complex builds may consume minutes quickly&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# netlify.toml - simple configuration&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;npm run build&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;publish&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_site&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Winner: Netlify&lt;/strong&gt; — More flexible build system with automatic framework detection.&lt;/p&gt;
&lt;h2&gt;Custom Domains and SSL&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Supports custom domains via CNAME file or repository settings&lt;/li&gt;
&lt;li&gt;Automatic HTTPS via Let&#39;s Encrypt&lt;/li&gt;
&lt;li&gt;DNS configuration required at your registrar&lt;/li&gt;
&lt;li&gt;No built-in DNS management&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Supports custom domains with easy configuration&lt;/li&gt;
&lt;li&gt;Automatic HTTPS via Let&#39;s Encrypt&lt;/li&gt;
&lt;li&gt;Optional Netlify DNS for simplified management&lt;/li&gt;
&lt;li&gt;Automatic certificate renewal and provisioning&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Winner: Tie&lt;/strong&gt; — Both offer free SSL and custom domain support. Netlify&#39;s DNS management is a convenience, not a necessity.&lt;/p&gt;
&lt;h2&gt;Deploy Previews&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;GitHub Pages does not offer built-in deploy previews. To preview pull requests:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set up a separate staging branch&lt;/li&gt;
&lt;li&gt;Use GitHub Actions to deploy to a preview URL&lt;/li&gt;
&lt;li&gt;Requires manual configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;p&gt;Netlify automatically creates deploy previews for every pull request:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unique URL for each preview (e.g., &lt;code&gt;deploy-preview-42--yoursite.netlify.app&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Preview link posted as a comment on the pull request&lt;/li&gt;
&lt;li&gt;No configuration required&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Winner: Netlify&lt;/strong&gt; — Automatic deploy previews are invaluable for team collaboration.&lt;/p&gt;
&lt;h2&gt;Serverless Functions&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;GitHub Pages does not support serverless functions. For backend functionality, you must use external services:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AWS Lambda&lt;/li&gt;
&lt;li&gt;Cloudflare Workers&lt;/li&gt;
&lt;li&gt;Vercel Functions&lt;/li&gt;
&lt;li&gt;Third-party APIs&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;p&gt;Netlify Functions provide built-in serverless capabilities:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// netlify/functions/hello.js&lt;/span&gt;
exports&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;handler&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;event&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; context&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;statusCode&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Hello from Netlify!&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Access at: &lt;code&gt;/.netlify/functions/hello&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Free tier includes 125,000 function invocations per month.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Winner: Netlify&lt;/strong&gt; — Built-in serverless functions eliminate the need for external services.&lt;/p&gt;
&lt;h2&gt;Form Handling&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;No built-in form handling. Options include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Formspree&lt;/li&gt;
&lt;li&gt;Google Forms&lt;/li&gt;
&lt;li&gt;Netlify Forms (even when hosted elsewhere)&lt;/li&gt;
&lt;li&gt;Custom backend&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;p&gt;Built-in form handling with spam protection:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;form&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;contact&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;method&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;POST&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;data-netlify&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;name&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;required&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;email&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;email&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;required&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;textarea&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;message&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;required&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;textarea&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;button&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;submit&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Send&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Free tier includes 100 form submissions per month.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Winner: Netlify&lt;/strong&gt; — Native form handling simplifies contact forms and surveys.&lt;/p&gt;
&lt;h2&gt;Performance&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Served via Fastly CDN&lt;/li&gt;
&lt;li&gt;Generally fast and reliable&lt;/li&gt;
&lt;li&gt;Limited control over caching headers&lt;/li&gt;
&lt;li&gt;No edge functions or optimization features&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Served via Netlify Edge (global CDN)&lt;/li&gt;
&lt;li&gt;Automatic asset optimization&lt;/li&gt;
&lt;li&gt;Configurable caching headers&lt;/li&gt;
&lt;li&gt;Edge functions for personalization&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# netlify.toml - custom headers&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/assets/*&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;headers.values&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;token key property&quot;&gt;Cache-Control&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;public, max-age=31536000, immutable&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Winner: Netlify&lt;/strong&gt; — More control over performance optimization.&lt;/p&gt;
&lt;h2&gt;Redirects and Rewrites&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;Limited redirect capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Jekyll plugins for redirects&lt;/li&gt;
&lt;li&gt;Client-side JavaScript redirects&lt;/li&gt;
&lt;li&gt;No server-side redirect configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;p&gt;Comprehensive redirect and rewrite support:&lt;/p&gt;
&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# netlify.toml&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;redirects&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/old-page&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/new-page&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;301&lt;/span&gt;

&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;redirects&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/api/*&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/.netlify/functions/:splat&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;200&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# SPA fallback&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;redirects&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/*&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/index.html&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;200&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Winner: Netlify&lt;/strong&gt; — Essential for SPAs and URL management.&lt;/p&gt;
&lt;h2&gt;Version Control Integration&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Exclusive to GitHub repositories&lt;/li&gt;
&lt;li&gt;Deep integration with GitHub ecosystem&lt;/li&gt;
&lt;li&gt;Works with GitHub Actions for CI/CD&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Supports GitHub, GitLab, and Bitbucket&lt;/li&gt;
&lt;li&gt;Also supports manual deploys and CLI&lt;/li&gt;
&lt;li&gt;More flexible for teams using different platforms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Winner: Netlify&lt;/strong&gt; — Supports multiple Git providers.&lt;/p&gt;
&lt;h2&gt;Ease of Use&lt;/h2&gt;
&lt;h3&gt;GitHub Pages&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Setup complexity:&lt;/strong&gt; Low for Jekyll, moderate for other frameworks&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Developers already using GitHub&lt;/li&gt;
&lt;li&gt;Simple Jekyll blogs&lt;/li&gt;
&lt;li&gt;Project documentation&lt;/li&gt;
&lt;li&gt;Personal portfolios&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Netlify&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Setup complexity:&lt;/strong&gt; Low for all frameworks&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Teams needing deploy previews&lt;/li&gt;
&lt;li&gt;Sites requiring forms or functions&lt;/li&gt;
&lt;li&gt;Single-page applications&lt;/li&gt;
&lt;li&gt;Projects needing advanced features&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Winner: Tie&lt;/strong&gt; — Both are easy to use; the winner depends on your needs.&lt;/p&gt;
&lt;h2&gt;Use Case Recommendations&lt;/h2&gt;
&lt;h3&gt;Choose GitHub Pages If:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;You&#39;re building a simple Jekyll blog&lt;/li&gt;
&lt;li&gt;You want minimal configuration&lt;/li&gt;
&lt;li&gt;Your project is already on GitHub&lt;/li&gt;
&lt;li&gt;You don&#39;t need serverless functions or forms&lt;/li&gt;
&lt;li&gt;You prefer staying within the GitHub ecosystem&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Choose Netlify If:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;You need deploy previews for pull requests&lt;/li&gt;
&lt;li&gt;You want built-in form handling&lt;/li&gt;
&lt;li&gt;You need serverless functions&lt;/li&gt;
&lt;li&gt;You&#39;re using a non-Jekyll static site generator&lt;/li&gt;
&lt;li&gt;You need advanced redirects or rewrites&lt;/li&gt;
&lt;li&gt;You want instant rollbacks&lt;/li&gt;
&lt;li&gt;You&#39;re working with a team&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Migration Considerations&lt;/h2&gt;
&lt;h3&gt;From GitHub Pages to Netlify&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Connect your GitHub repository to Netlify&lt;/li&gt;
&lt;li&gt;Configure build settings&lt;/li&gt;
&lt;li&gt;Update DNS records to point to Netlify&lt;/li&gt;
&lt;li&gt;Remove GitHub Pages configuration&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;From Netlify to GitHub Pages&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Ensure your site can build with GitHub Actions&lt;/li&gt;
&lt;li&gt;Create a deployment workflow&lt;/li&gt;
&lt;li&gt;Update DNS records to point to GitHub Pages&lt;/li&gt;
&lt;li&gt;Remove Netlify configuration&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Cost Comparison for Scaling&lt;/h2&gt;
&lt;p&gt;When you outgrow the free tier:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Plan&lt;/th&gt;
&lt;th&gt;GitHub Pages&lt;/th&gt;
&lt;th&gt;Netlify&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro/Team&lt;/td&gt;
&lt;td&gt;N/A (stays free)&lt;/td&gt;
&lt;td&gt;$19/member/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise&lt;/td&gt;
&lt;td&gt;GitHub Enterprise&lt;/td&gt;
&lt;td&gt;Custom pricing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;GitHub Pages remains free regardless of scale (within limits). Netlify&#39;s paid tiers add team features, more build minutes, and higher limits.&lt;/p&gt;
&lt;h2&gt;Final Verdict&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;GitHub Pages&lt;/strong&gt; is ideal for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple sites with minimal requirements&lt;/li&gt;
&lt;li&gt;Jekyll users&lt;/li&gt;
&lt;li&gt;Budget-conscious individuals&lt;/li&gt;
&lt;li&gt;Projects that don&#39;t need backend features&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Netlify&lt;/strong&gt; is ideal for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Modern web applications&lt;/li&gt;
&lt;li&gt;Teams requiring collaboration features&lt;/li&gt;
&lt;li&gt;Sites needing forms or serverless functions&lt;/li&gt;
&lt;li&gt;Developers wanting maximum flexibility&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For most modern static site projects, &lt;strong&gt;Netlify offers a superior developer experience&lt;/strong&gt; with features like deploy previews, serverless functions, and form handling. However, &lt;strong&gt;GitHub Pages remains an excellent choice&lt;/strong&gt; for straightforward sites, especially if you&#39;re already invested in the GitHub ecosystem.&lt;/p&gt;
&lt;p&gt;Both platforms are production-ready and trusted by millions of developers. You can&#39;t go wrong with either choice.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;If you need help deciding between GitHub Pages and Netlify, or require assistance migrating your site, contact us at &lt;a href=&quot;mailto:assist@knowledgebasement.com&quot;&gt;assist@knowledgebasement.com&lt;/a&gt;. We offer consulting services for a small fee to help you choose and configure the right hosting solution.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Web Development"/>
  </entry>
  <entry>
    <title>How to Choose a Programming Language as a Beginner in 2026</title>
    <link href="https://www.knowledgebasement.com/choose-programming-language-beginner/" rel="alternate" type="text/html" title="How to Choose a Programming Language as a Beginner in 2026"/>
    <published>2026-02-05T14:00:00Z</published>
    <updated>2026-02-05T14:00:00Z</updated>
    <id>https://www.knowledgebasement.com/choose-programming-language-beginner/</id>
    <summary>How to Choose a Programming Language as a Beginner in 2026 Choosing your first programming language is one of the most common dilemmas for aspiring…</summary>
    <content type="html">&lt;h1&gt;How to Choose a Programming Language as a Beginner in 2026&lt;/h1&gt;
&lt;p&gt;Choosing your first programming language is one of the most common dilemmas for aspiring developers. With hundreds of languages available, the decision can feel overwhelming. However, the choice matters less than you might think—what matters more is starting and building consistent practice. This guide helps you make an informed decision based on your goals, interests, and career aspirations.&lt;/p&gt;
&lt;h2&gt;The Truth About Your First Language&lt;/h2&gt;
&lt;p&gt;Before diving into specific recommendations, understand these principles:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Your first language won&#39;t be your last&lt;/strong&gt;: Most professional developers work with multiple languages throughout their careers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fundamentals transfer&lt;/strong&gt;: Core concepts like variables, loops, conditionals, and functions exist in nearly every language.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Starting is more important than optimizing&lt;/strong&gt;: Analysis paralysis is the biggest obstacle for beginners.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;There is no &amp;quot;best&amp;quot; language&lt;/strong&gt;: Each language excels in different domains.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Choose Based on Your Goals&lt;/h2&gt;
&lt;p&gt;The most practical approach is to select a language based on what you want to build.&lt;/p&gt;
&lt;h3&gt;Web Development&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Frontend (what users see):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JavaScript&lt;/strong&gt; is essential and unavoidable for frontend web development&lt;/li&gt;
&lt;li&gt;Learn HTML and CSS alongside JavaScript&lt;/li&gt;
&lt;li&gt;Frameworks like React, Vue, and Angular all use JavaScript&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Backend (server-side):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JavaScript (Node.js)&lt;/strong&gt;: Use one language for both frontend and backend&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python&lt;/strong&gt;: Clean syntax, excellent for beginners, widely used&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PHP&lt;/strong&gt;: Powers WordPress and many legacy systems&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Go&lt;/strong&gt;: Growing in popularity for high-performance backends&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Java&lt;/strong&gt;: Enterprise standard, extensive job market&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Start with &lt;strong&gt;JavaScript&lt;/strong&gt;. It&#39;s the only language that runs in browsers, and with Node.js, you can build full-stack applications.&lt;/p&gt;
&lt;h3&gt;Mobile App Development&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Cross-platform (iOS and Android):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JavaScript/TypeScript&lt;/strong&gt; with React Native or Expo&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dart&lt;/strong&gt; with Flutter (growing rapidly)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Native iOS:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Swift&lt;/strong&gt;: Apple&#39;s modern language for iOS and macOS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Native Android:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Kotlin&lt;/strong&gt;: Google&#39;s preferred language for Android&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Java&lt;/strong&gt;: Still widely used in Android development&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Start with &lt;strong&gt;JavaScript&lt;/strong&gt; and React Native for the broadest reach, or &lt;strong&gt;Dart&lt;/strong&gt; with Flutter for excellent developer experience.&lt;/p&gt;
&lt;h3&gt;Data Science and Machine Learning&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python&lt;/strong&gt;: Industry standard with libraries like NumPy, Pandas, TensorFlow, and PyTorch&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;R&lt;/strong&gt;: Statistical computing and data visualization&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Julia&lt;/strong&gt;: High-performance scientific computing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Start with &lt;strong&gt;Python&lt;/strong&gt;. It dominates data science and machine learning with the most comprehensive ecosystem.&lt;/p&gt;
&lt;h3&gt;Game Development&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;C#&lt;/strong&gt;: Unity game engine (most popular for indie games)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C++&lt;/strong&gt;: Unreal Engine and AAA game development&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GDScript/C#&lt;/strong&gt;: Godot engine&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lua&lt;/strong&gt;: Scripting in many game engines&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Start with &lt;strong&gt;C#&lt;/strong&gt; and Unity for the most accessible entry point with extensive learning resources.&lt;/p&gt;
&lt;h3&gt;Systems Programming and Performance-Critical Applications&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rust&lt;/strong&gt;: Memory safety without garbage collection, growing rapidly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C++&lt;/strong&gt;: Performance-critical applications, game engines, operating systems&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C&lt;/strong&gt;: Operating systems, embedded systems, foundational understanding&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Go&lt;/strong&gt;: Concurrent systems, cloud infrastructure, DevOps tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Start with &lt;strong&gt;Go&lt;/strong&gt; for a gentler learning curve, or &lt;strong&gt;Rust&lt;/strong&gt; if you want to invest in a language with a bright future.&lt;/p&gt;
&lt;h3&gt;DevOps and Automation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python&lt;/strong&gt;: Scripting, automation, infrastructure tools&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Go&lt;/strong&gt;: Cloud-native tools (Docker, Kubernetes)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bash&lt;/strong&gt;: Shell scripting on Linux/macOS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PowerShell&lt;/strong&gt;: Windows automation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Start with &lt;strong&gt;Python&lt;/strong&gt; for versatility across automation, scripting, and tool development.&lt;/p&gt;
&lt;h3&gt;Enterprise and Corporate Jobs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Java&lt;/strong&gt;: Banking, insurance, large corporations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C#&lt;/strong&gt;: Microsoft ecosystem, enterprise software&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python&lt;/strong&gt;: Growing enterprise adoption&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SQL&lt;/strong&gt;: Database querying (essential regardless of other languages)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Start with &lt;strong&gt;Java&lt;/strong&gt; or &lt;strong&gt;C#&lt;/strong&gt; for the most traditional corporate career path.&lt;/p&gt;
&lt;h2&gt;Language Comparison for Beginners&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;th&gt;Learning Curve&lt;/th&gt;
&lt;th&gt;Job Market&lt;/th&gt;
&lt;th&gt;Versatility&lt;/th&gt;
&lt;th&gt;Community&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Python&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JavaScript&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Java&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C#&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Growing&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;td&gt;Steep&lt;/td&gt;
&lt;td&gt;Growing&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C++&lt;/td&gt;
&lt;td&gt;Steep&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Swift&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kotlin&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Growing&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Recommended Starting Points by Persona&lt;/h2&gt;
&lt;h3&gt;&amp;quot;I have no idea what I want to do&amp;quot;&lt;/h3&gt;
&lt;p&gt;Start with &lt;strong&gt;Python&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Python has the gentlest learning curve, reads almost like English, and allows you to explore multiple domains:&lt;/p&gt;
&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# Python is readable and beginner-friendly&lt;/span&gt;
name &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;World&quot;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string-interpolation&quot;&gt;&lt;span class=&quot;token string&quot;&gt;f&quot;Hello, &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;name&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;!&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Simple list operations&lt;/span&gt;
numbers &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
doubled &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;n &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; n &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; numbers&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;doubled&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;token comment&quot;&gt;# [2, 4, 6, 8, 10]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&amp;quot;I want to build websites&amp;quot;&lt;/h3&gt;
&lt;p&gt;Start with &lt;strong&gt;JavaScript&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;JavaScript is the language of the web and enables both frontend and backend development:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// JavaScript runs in browsers and on servers&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; name &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;World&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;Hello, &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;name&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;// Modern JavaScript features&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; numbers &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; doubled &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; numbers&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; n &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;doubled&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// [2, 4, 6, 8, 10]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&amp;quot;I want a stable corporate job&amp;quot;&lt;/h3&gt;
&lt;p&gt;Start with &lt;strong&gt;Java&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Java remains the backbone of enterprise software with excellent job security:&lt;/p&gt;
&lt;pre class=&quot;language-java&quot;&gt;&lt;code class=&quot;language-java&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// Java is verbose but explicit&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Hello&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; args&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token class-name&quot;&gt;String&lt;/span&gt; name &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;World&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token class-name&quot;&gt;System&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;out&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Hello, &quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; name &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;!&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&amp;quot;I want to work with AI and data&amp;quot;&lt;/h3&gt;
&lt;p&gt;Start with &lt;strong&gt;Python&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Python dominates data science and machine learning:&lt;/p&gt;
&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; pandas &lt;span class=&quot;token keyword&quot;&gt;as&lt;/span&gt; pd
&lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; sklearn&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;model_selection &lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; train_test_split

&lt;span class=&quot;token comment&quot;&gt;# Load and explore data&lt;/span&gt;
data &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; pd&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;read_csv&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;dataset.csv&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;data&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;describe&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Prepare for machine learning&lt;/span&gt;
X_train&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; X_test&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; y_train&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; y_test &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; train_test_split&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    data&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;features&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; data&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;target&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; test_size&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0.2&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&amp;quot;I want to build mobile apps&amp;quot;&lt;/h3&gt;
&lt;p&gt;Start with &lt;strong&gt;Dart&lt;/strong&gt; (Flutter) or &lt;strong&gt;JavaScript&lt;/strong&gt; (React Native).&lt;/p&gt;
&lt;p&gt;Both allow you to build for iOS and Android from a single codebase:&lt;/p&gt;
&lt;pre class=&quot;language-dart&quot;&gt;&lt;code class=&quot;language-dart&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// Dart with Flutter&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&#39;package:flutter/material.dart&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;HelloApp&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;StatelessWidget&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token metadata function&quot;&gt;@override&lt;/span&gt;
  &lt;span class=&quot;token class-name&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;BuildContext&lt;/span&gt; context&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;MaterialApp&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
      home&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Scaffold&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
        body&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Center&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
          child&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Text&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string-literal&quot;&gt;&lt;span class=&quot;token string&quot;&gt;&#39;Hello, World!&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Factors to Consider&lt;/h2&gt;
&lt;h3&gt;Learning Resources&lt;/h3&gt;
&lt;p&gt;Choose a language with abundant, high-quality learning materials:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python&lt;/strong&gt;: Extensive tutorials, courses, and documentation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;: Countless free resources, active community&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Java&lt;/strong&gt;: Well-established curriculum, university courses&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Community and Support&lt;/h3&gt;
&lt;p&gt;A strong community means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More answered questions on Stack Overflow&lt;/li&gt;
&lt;li&gt;Active forums and Discord servers&lt;/li&gt;
&lt;li&gt;Regular meetups and conferences&lt;/li&gt;
&lt;li&gt;Maintained libraries and frameworks&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Job Market in Your Region&lt;/h3&gt;
&lt;p&gt;Research job postings in your area:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Search job boards for entry-level developer positions&lt;/li&gt;
&lt;li&gt;Note which languages appear most frequently&lt;/li&gt;
&lt;li&gt;Consider remote work opportunities (broader language options)&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Long-term Viability&lt;/h3&gt;
&lt;p&gt;Consider languages with staying power:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Established languages&lt;/strong&gt; (Python, JavaScript, Java): Stable, not going anywhere&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Growing languages&lt;/strong&gt; (Rust, Go, Kotlin): Increasing adoption, good investment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Declining languages&lt;/strong&gt; (Perl, ColdFusion): Avoid for new projects&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Common Mistakes to Avoid&lt;/h2&gt;
&lt;h3&gt;Chasing Trends&lt;/h3&gt;
&lt;p&gt;Don&#39;t switch languages every month based on what&#39;s &amp;quot;hot.&amp;quot; Depth beats breadth for beginners.&lt;/p&gt;
&lt;h3&gt;Over-Optimizing the Decision&lt;/h3&gt;
&lt;p&gt;Spending months researching the &amp;quot;perfect&amp;quot; language is time better spent learning any language.&lt;/p&gt;
&lt;h3&gt;Starting with Low-Level Languages&lt;/h3&gt;
&lt;p&gt;C and C++ are powerful but have steep learning curves. They&#39;re better as second or third languages.&lt;/p&gt;
&lt;h3&gt;Ignoring Fundamentals&lt;/h3&gt;
&lt;p&gt;Frameworks and libraries change; fundamentals don&#39;t. Focus on core programming concepts regardless of language.&lt;/p&gt;
&lt;h3&gt;Learning in Isolation&lt;/h3&gt;
&lt;p&gt;Join communities, contribute to open source, and build projects. Programming is learned by doing.&lt;/p&gt;
&lt;h2&gt;A Practical Learning Path&lt;/h2&gt;
&lt;p&gt;Regardless of which language you choose:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Learn the basics&lt;/strong&gt; (2-4 weeks)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Variables, data types, operators&lt;/li&gt;
&lt;li&gt;Conditionals and loops&lt;/li&gt;
&lt;li&gt;Functions and scope&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Build small projects&lt;/strong&gt; (4-8 weeks)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Calculator, to-do list, simple games&lt;/li&gt;
&lt;li&gt;Focus on applying what you&#39;ve learned&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Learn intermediate concepts&lt;/strong&gt; (4-8 weeks)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Object-oriented programming&lt;/li&gt;
&lt;li&gt;Error handling&lt;/li&gt;
&lt;li&gt;Working with files and APIs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Build larger projects&lt;/strong&gt; (ongoing)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Clone existing applications&lt;/li&gt;
&lt;li&gt;Create original projects for your portfolio&lt;/li&gt;
&lt;li&gt;Contribute to open source&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Specialize or expand&lt;/strong&gt; (after 6+ months)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Learn frameworks relevant to your goals&lt;/li&gt;
&lt;li&gt;Pick up a second language&lt;/li&gt;
&lt;li&gt;Deepen expertise in your chosen domain&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;The best programming language to start with is one that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Aligns with your goals&lt;/li&gt;
&lt;li&gt;Has strong learning resources&lt;/li&gt;
&lt;li&gt;You will actually use consistently&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For most beginners, &lt;strong&gt;Python&lt;/strong&gt; or &lt;strong&gt;JavaScript&lt;/strong&gt; are excellent choices due to their versatility, gentle learning curves, and robust job markets. However, any mainstream language will serve you well if you commit to learning it thoroughly.&lt;/p&gt;
&lt;p&gt;Remember: the goal isn&#39;t to pick the perfect language—it&#39;s to start programming. You can always learn additional languages later, and the skills you develop will transfer.&lt;/p&gt;
&lt;p&gt;Choose a language, build projects, and iterate. The best time to start is now.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;If you need guidance on choosing a programming language or creating a personalized learning path, contact us at &lt;a href=&quot;mailto:assist@knowledgebasement.com&quot;&gt;assist@knowledgebasement.com&lt;/a&gt;. We offer consulting services for a small fee to help you begin your programming journey on the right foot.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Programming"/>
  </entry>
  <entry>
    <title>How to Host Your Site for Free on Netlify</title>
    <link href="https://www.knowledgebasement.com/host-site-free-netlify/" rel="alternate" type="text/html" title="How to Host Your Site for Free on Netlify"/>
    <published>2026-02-05T13:00:00Z</published>
    <updated>2026-02-05T13:00:00Z</updated>
    <id>https://www.knowledgebasement.com/host-site-free-netlify/</id>
    <summary>How to Host Your Site for Free on Netlify Netlify is a powerful platform for hosting static websites and modern web applications. It offers a generous…</summary>
    <content type="html">&lt;h1&gt;How to Host Your Site for Free on Netlify&lt;/h1&gt;
&lt;p&gt;Netlify is a powerful platform for hosting static websites and modern web applications. It offers a generous free tier that includes continuous deployment, custom domains, HTTPS, serverless functions, and form handling. This guide walks you through deploying your site on Netlify and configuring automated deployments.&lt;/p&gt;
&lt;h2&gt;Why Choose Netlify?&lt;/h2&gt;
&lt;p&gt;Netlify offers several advantages over traditional hosting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Continuous deployment&lt;/strong&gt;: Automatic builds and deploys on every Git push&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Global CDN&lt;/strong&gt;: Fast content delivery worldwide&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Free SSL certificates&lt;/strong&gt;: Automatic HTTPS for all sites&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Serverless functions&lt;/strong&gt;: Run backend code without managing servers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Form handling&lt;/strong&gt;: Process form submissions without a backend&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Split testing&lt;/strong&gt;: A/B test different branches&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deploy previews&lt;/strong&gt;: Preview changes before merging pull requests&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before proceeding, ensure you have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A static website ready for deployment (HTML, Jekyll, Eleventy, Hugo, Next.js, etc.)&lt;/li&gt;
&lt;li&gt;A GitHub, GitLab, or Bitbucket account (recommended for continuous deployment)&lt;/li&gt;
&lt;li&gt;A Netlify account (free to create)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Method 1: Deploy via Git Integration (Recommended)&lt;/h2&gt;
&lt;p&gt;This method provides automatic deployments whenever you push changes to your repository.&lt;/p&gt;
&lt;h3&gt;Step 1: Push Your Site to a Git Repository&lt;/h3&gt;
&lt;p&gt;If your site isn&#39;t already in a Git repository:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;cd&lt;/span&gt; your-site-directory
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; init
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;token builtin class-name&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; commit &lt;span class=&quot;token parameter variable&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Initial commit&quot;&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; remote &lt;span class=&quot;token function&quot;&gt;add&lt;/span&gt; origin https://github.com/&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;username&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;/&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;repository&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;.git
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; push &lt;span class=&quot;token parameter variable&quot;&gt;-u&lt;/span&gt; origin main&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 2: Create a Netlify Account&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;a href=&quot;https://www.netlify.com/&quot;&gt;netlify.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Sign up&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Sign up with your GitHub, GitLab, or Bitbucket account for seamless integration&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Step 3: Connect Your Repository&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;From the Netlify dashboard, click &lt;strong&gt;Add new site&lt;/strong&gt; → &lt;strong&gt;Import an existing project&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Select your Git provider (GitHub, GitLab, or Bitbucket)&lt;/li&gt;
&lt;li&gt;Authorize Netlify to access your repositories&lt;/li&gt;
&lt;li&gt;Select the repository containing your site&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Step 4: Configure Build Settings&lt;/h3&gt;
&lt;p&gt;Netlify will attempt to detect your site&#39;s framework automatically. Verify or configure:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For Jekyll sites:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build command: &lt;code&gt;jekyll build&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Publish directory: &lt;code&gt;_site&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For Eleventy sites:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build command: &lt;code&gt;npm run build&lt;/code&gt; or &lt;code&gt;npx @11ty/eleventy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Publish directory: &lt;code&gt;_site&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For Hugo sites:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build command: &lt;code&gt;hugo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Publish directory: &lt;code&gt;public&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For Next.js static export:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build command: &lt;code&gt;npm run build&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Publish directory: &lt;code&gt;out&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For plain HTML sites:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build command: (leave empty)&lt;/li&gt;
&lt;li&gt;Publish directory: &lt;code&gt;.&lt;/code&gt; or the folder containing your HTML files&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 5: Deploy Your Site&lt;/h3&gt;
&lt;p&gt;Click &lt;strong&gt;Deploy site&lt;/strong&gt;. Netlify will:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clone your repository&lt;/li&gt;
&lt;li&gt;Run the build command&lt;/li&gt;
&lt;li&gt;Deploy the output to its global CDN&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Your site will be available at a random subdomain like &lt;code&gt;random-name-123456.netlify.app&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Method 2: Deploy via Drag and Drop&lt;/h2&gt;
&lt;p&gt;For quick deployments without Git integration:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;a href=&quot;https://app.netlify.com/drop&quot;&gt;app.netlify.com/drop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Drag your site folder onto the page&lt;/li&gt;
&lt;li&gt;Your site will be deployed immediately&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This method is useful for testing but doesn&#39;t provide continuous deployment.&lt;/p&gt;
&lt;h2&gt;Method 3: Deploy via Netlify CLI&lt;/h2&gt;
&lt;p&gt;The Netlify CLI provides command-line control over your deployments.&lt;/p&gt;
&lt;h3&gt;Install the CLI&lt;/h3&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-g&lt;/span&gt; netlify-cli&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Authenticate&lt;/h3&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;netlify login&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Initialize Your Site&lt;/h3&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;cd&lt;/span&gt; your-site-directory
netlify init&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Follow the prompts to connect to an existing site or create a new one.&lt;/p&gt;
&lt;h3&gt;Deploy Manually&lt;/h3&gt;
&lt;p&gt;For a draft deployment (preview URL):&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;netlify deploy&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For a production deployment:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;netlify deploy &lt;span class=&quot;token parameter variable&quot;&gt;--prod&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Deploy with Build&lt;/h3&gt;
&lt;p&gt;To run your build command before deploying:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;netlify deploy &lt;span class=&quot;token parameter variable&quot;&gt;--build&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;--prod&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Configuring Your Site with netlify.toml&lt;/h2&gt;
&lt;p&gt;Create a &lt;code&gt;netlify.toml&lt;/code&gt; file in your repository root for advanced configuration:&lt;/p&gt;
&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;npm run build&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;publish&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_site&quot;&lt;/span&gt;

&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;build.environment&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;NODE_VERSION&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;20&quot;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Redirects&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;redirects&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/old-page&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/new-page&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;301&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Headers&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;headers&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/*&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;headers.values&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;token key property&quot;&gt;X-Frame-Options&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;DENY&quot;&lt;/span&gt;
    &lt;span class=&quot;token key property&quot;&gt;X-XSS-Protection&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;1; mode=block&quot;&lt;/span&gt;
    &lt;span class=&quot;token key property&quot;&gt;Content-Security-Policy&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;default-src &#39;self&#39;&quot;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Branch-specific settings&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;context.production&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;npm run build&quot;&lt;/span&gt;

&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;context.deploy-preview&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;npm run build:preview&quot;&lt;/span&gt;

&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;context.branch-deploy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;npm run build:branch&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Setting Up a Custom Domain&lt;/h2&gt;
&lt;h3&gt;Step 1: Add Your Domain in Netlify&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Site settings&lt;/strong&gt; → &lt;strong&gt;Domain management&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add custom domain&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Enter your domain (e.g., &lt;code&gt;example.com&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Verify&lt;/strong&gt; and then &lt;strong&gt;Add domain&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Step 2: Configure DNS&lt;/h3&gt;
&lt;p&gt;You have two options:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Option A: Use Netlify DNS (Recommended)&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Domain management, click &lt;strong&gt;Options&lt;/strong&gt; → &lt;strong&gt;Set up Netlify DNS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Update your domain&#39;s nameservers at your registrar to:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;dns1.p01.nsone.net&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dns2.p01.nsone.net&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dns3.p01.nsone.net&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dns4.p01.nsone.net&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Option B: Use External DNS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Add these DNS records at your registrar:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;@&lt;/td&gt;
&lt;td&gt;75.2.60.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CNAME&lt;/td&gt;
&lt;td&gt;www&lt;/td&gt;
&lt;td&gt;&lt;code&gt;your-site.netlify.app&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Step 3: Enable HTTPS&lt;/h3&gt;
&lt;p&gt;Netlify provides free SSL certificates via Let&#39;s Encrypt:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Site settings&lt;/strong&gt; → &lt;strong&gt;Domain management&lt;/strong&gt; → &lt;strong&gt;HTTPS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Verify DNS configuration&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Once verified, click &lt;strong&gt;Provision certificate&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;HTTPS is automatically enabled and renewed.&lt;/p&gt;
&lt;h2&gt;Configuring Build Hooks&lt;/h2&gt;
&lt;p&gt;Build hooks allow you to trigger deployments from external services.&lt;/p&gt;
&lt;h3&gt;Create a Build Hook&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Site settings&lt;/strong&gt; → &lt;strong&gt;Build &amp;amp; deploy&lt;/strong&gt; → &lt;strong&gt;Build hooks&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add build hook&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Name your hook (e.g., &amp;quot;CMS Update&amp;quot;)&lt;/li&gt;
&lt;li&gt;Select the branch to build&lt;/li&gt;
&lt;li&gt;Copy the generated URL&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Trigger a Build&lt;/h3&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;curl&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-X&lt;/span&gt; POST &lt;span class=&quot;token parameter variable&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; https://api.netlify.com/build_hooks/your-hook-id&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use build hooks to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Trigger builds from a headless CMS&lt;/li&gt;
&lt;li&gt;Schedule builds with cron jobs&lt;/li&gt;
&lt;li&gt;Integrate with other services via webhooks&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Setting Up Deploy Notifications&lt;/h2&gt;
&lt;p&gt;Configure notifications for deployment events:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Site settings&lt;/strong&gt; → &lt;strong&gt;Build &amp;amp; deploy&lt;/strong&gt; → &lt;strong&gt;Deploy notifications&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add notification&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Choose a notification type:
&lt;ul&gt;
&lt;li&gt;Email&lt;/li&gt;
&lt;li&gt;Slack&lt;/li&gt;
&lt;li&gt;Webhook&lt;/li&gt;
&lt;li&gt;GitHub commit status&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Example webhook notification for successful deploys:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;deploy-id&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;site_id&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;site-id&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;build_id&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;build-id&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;state&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;ready&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;your-site&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;url&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;https://your-site.netlify.app&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;ssl_url&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;https://your-site.netlify.app&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;admin_url&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;https://app.netlify.com/sites/your-site&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;deploy_url&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;https://deploy-id--your-site.netlify.app&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;published_at&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;2026-02-05T15:00:00.000Z&quot;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Using Netlify Functions&lt;/h2&gt;
&lt;p&gt;Netlify Functions allow you to run serverless backend code.&lt;/p&gt;
&lt;h3&gt;Create a Function&lt;/h3&gt;
&lt;p&gt;Create &lt;code&gt;netlify/functions/hello.js&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;exports&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;handler&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;event&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; context&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;statusCode&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token literal-property property&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Hello from Netlify Functions!&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Access Your Function&lt;/h3&gt;
&lt;p&gt;Your function is available at:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;https://your-site.netlify.app/.netlify/functions/hello
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Configure Functions Directory&lt;/h3&gt;
&lt;p&gt;In &lt;code&gt;netlify.toml&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;functions&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;directory&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;netlify/functions&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Handling Forms&lt;/h2&gt;
&lt;p&gt;Netlify can process form submissions without a backend.&lt;/p&gt;
&lt;h3&gt;Add a Form to Your Site&lt;/h3&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;form&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;contact&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;method&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;POST&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;data-netlify&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;hidden&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;form-name&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;contact&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Name: &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;name&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;required&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Email: &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;email&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;email&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;required&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Message: &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;textarea&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;message&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;required&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;textarea&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;button&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;submit&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Send&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;View Submissions&lt;/h3&gt;
&lt;p&gt;Form submissions are available in the Netlify dashboard under &lt;strong&gt;Forms&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;Add Spam Protection&lt;/h3&gt;
&lt;p&gt;Enable reCAPTCHA or honeypot fields:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;form&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;contact&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;method&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;POST&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;data-netlify&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;data-netlify-honeypot&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;bot-field&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;hidden&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;form-name&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;contact&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;hidden&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Don&#39;t fill this out: &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;bot-field&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;&amp;lt;!-- rest of form --&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Environment Variables&lt;/h2&gt;
&lt;p&gt;Store sensitive data securely using environment variables.&lt;/p&gt;
&lt;h3&gt;Add Variables in Netlify&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Site settings&lt;/strong&gt; → &lt;strong&gt;Environment variables&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add a variable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Enter the key and value&lt;/li&gt;
&lt;li&gt;Choose the scope (all deploys, production, or deploy previews)&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Access in Build&lt;/h3&gt;
&lt;p&gt;Environment variables are available during build:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// In your build script&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; apiKey &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; process&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;env&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token constant&quot;&gt;API_KEY&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Access in Functions&lt;/h3&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;exports&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;handler&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;event&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; context&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; apiKey &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; process&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;env&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token constant&quot;&gt;API_KEY&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;// Use apiKey securely&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Deploy Previews for Pull Requests&lt;/h2&gt;
&lt;p&gt;Netlify automatically creates deploy previews for pull requests:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open a pull request on your repository&lt;/li&gt;
&lt;li&gt;Netlify builds the branch and creates a unique preview URL&lt;/li&gt;
&lt;li&gt;The preview URL is posted as a comment on the pull request&lt;/li&gt;
&lt;li&gt;Review changes before merging&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Configure in &lt;code&gt;netlify.toml&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;context.deploy-preview&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;npm run build:preview&quot;&lt;/span&gt;

&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;context.deploy-preview.environment&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;PREVIEW_MODE&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Netlify Free Tier Limits&lt;/h2&gt;
&lt;p&gt;The free tier includes generous limits:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Limit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Bandwidth&lt;/td&gt;
&lt;td&gt;100 GB/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build minutes&lt;/td&gt;
&lt;td&gt;300 minutes/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sites&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Team members&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Serverless functions&lt;/td&gt;
&lt;td&gt;125,000 requests/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Form submissions&lt;/td&gt;
&lt;td&gt;100/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Identity (auth)&lt;/td&gt;
&lt;td&gt;1,000 users&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Troubleshooting Common Issues&lt;/h2&gt;
&lt;h3&gt;Build Fails&lt;/h3&gt;
&lt;p&gt;Check the build logs in the Netlify dashboard:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Deploys&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click on the failed deploy&lt;/li&gt;
&lt;li&gt;Review the build log for errors&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Common issues:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing dependencies in &lt;code&gt;package.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Incorrect Node.js version (specify in &lt;code&gt;netlify.toml&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Build command typos&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;404 Errors on Page Refresh (SPAs)&lt;/h3&gt;
&lt;p&gt;For single-page applications, add a redirect rule:&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;netlify.toml&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-toml&quot;&gt;&lt;code class=&quot;language-toml&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token table class-name&quot;&gt;redirects&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/*&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/index.html&quot;&lt;/span&gt;
  &lt;span class=&quot;token key property&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;200&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or create a &lt;code&gt;_redirects&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/*    /index.html   200
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Assets Not Loading&lt;/h3&gt;
&lt;p&gt;Ensure your publish directory is correct and all assets are included in the build output.&lt;/p&gt;
&lt;h3&gt;Custom Domain Not Working&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Verify DNS records have propagated&lt;/li&gt;
&lt;li&gt;Check that the domain is verified in Netlify&lt;/li&gt;
&lt;li&gt;Ensure HTTPS certificate is provisioned&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Netlify provides a robust, free hosting solution for static sites and modern web applications. Its seamless Git integration, automatic deployments, and built-in features like functions and forms make it an excellent choice for developers.&lt;/p&gt;
&lt;p&gt;Key takeaways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Connect your Git repository for continuous deployment&lt;/li&gt;
&lt;li&gt;Configure build settings in &lt;code&gt;netlify.toml&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Set up a custom domain with free SSL&lt;/li&gt;
&lt;li&gt;Use build hooks for external triggers&lt;/li&gt;
&lt;li&gt;Leverage serverless functions for backend logic&lt;/li&gt;
&lt;li&gt;Enable form handling without a backend&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For assistance with Netlify deployments or complex configurations, contact us at &lt;a href=&quot;mailto:assist@knowledgebasement.com&quot;&gt;assist@knowledgebasement.com&lt;/a&gt;. We offer consulting services for a small fee to help you get your site deployed and running smoothly.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Web Development"/>
  </entry>
  <entry>
    <title>How to Host Your Site for Free on GitHub Pages</title>
    <link href="https://www.knowledgebasement.com/host-site-free-github-pages/" rel="alternate" type="text/html" title="How to Host Your Site for Free on GitHub Pages"/>
    <published>2026-02-05T12:00:00Z</published>
    <updated>2026-02-05T12:00:00Z</updated>
    <id>https://www.knowledgebasement.com/host-site-free-github-pages/</id>
    <summary>How to Host Your Site for Free on GitHub Pages GitHub Pages provides free hosting for static websites directly from a GitHub repository. Whether you&#39;re…</summary>
    <content type="html">&lt;h1&gt;How to Host Your Site for Free on GitHub Pages&lt;/h1&gt;
&lt;p&gt;GitHub Pages provides free hosting for static websites directly from a GitHub repository. Whether you&#39;re running a personal blog, project documentation, or a portfolio site, GitHub Pages offers a reliable and cost-effective solution with automatic deployments via GitHub Actions.&lt;/p&gt;
&lt;p&gt;This guide covers setting up GitHub Pages, configuring custom domains, and creating deployment workflows for both Jekyll and other static site generators.&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before proceeding, ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A GitHub account&lt;/li&gt;
&lt;li&gt;Git installed on your local machine&lt;/li&gt;
&lt;li&gt;A static website ready for deployment (HTML, Jekyll, Eleventy, Hugo, etc.)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Step 1: Create a GitHub Repository&lt;/h2&gt;
&lt;p&gt;Create a new repository on GitHub to host your site.&lt;/p&gt;
&lt;h3&gt;For a User/Organization Site&lt;/h3&gt;
&lt;p&gt;Create a repository named &lt;code&gt;&amp;lt;username&amp;gt;.github.io&lt;/code&gt;, where &lt;code&gt;&amp;lt;username&amp;gt;&lt;/code&gt; is your GitHub username. This repository will be accessible at &lt;code&gt;https://&amp;lt;username&amp;gt;.github.io&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;For a Project Site&lt;/h3&gt;
&lt;p&gt;Create a repository with any name. The site will be accessible at &lt;code&gt;https://&amp;lt;username&amp;gt;.github.io/&amp;lt;repository-name&amp;gt;/&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# Clone your new repository&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; clone https://github.com/&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;username&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;/&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;repository-name&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;.git
&lt;span class=&quot;token builtin class-name&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;repository-name&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 2: Add Your Site Files&lt;/h2&gt;
&lt;p&gt;Add your static site files to the repository:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# Add all files&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;token builtin class-name&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Commit the changes&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; commit &lt;span class=&quot;token parameter variable&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Initial site setup&quot;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Push to GitHub&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;git&lt;/span&gt; push origin main&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 3: Enable GitHub Pages&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to your repository on GitHub&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;Pages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Source&lt;/strong&gt;, select one of the following:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Deploy from a branch&lt;/strong&gt;: Select &lt;code&gt;main&lt;/code&gt; (or &lt;code&gt;gh-pages&lt;/code&gt;) and the folder (&lt;code&gt;/root&lt;/code&gt; or &lt;code&gt;/docs&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt;: For custom build workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For static HTML sites, selecting the &lt;code&gt;main&lt;/code&gt; branch is sufficient. For sites requiring a build step, GitHub Actions is recommended.&lt;/p&gt;
&lt;h2&gt;Step 4: Configure GitHub Actions for Automated Deployment&lt;/h2&gt;
&lt;p&gt;GitHub Actions enables automated builds and deployments whenever you push changes to your repository.&lt;/p&gt;
&lt;h3&gt;For Jekyll Sites&lt;/h3&gt;
&lt;p&gt;Jekyll is natively supported by GitHub Pages. However, for more control or to use unsupported plugins, create a custom workflow.&lt;/p&gt;
&lt;p&gt;Create &lt;code&gt;.github/workflows/deploy.yml&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy Jekyll Site

&lt;span class=&quot;token key atrule&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;branches&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;permissions&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; read
  &lt;span class=&quot;token key atrule&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write
  &lt;span class=&quot;token key atrule&quot;&gt;id-token&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write

&lt;span class=&quot;token key atrule&quot;&gt;concurrency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;pages&quot;&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;cancel-in-progress&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean important&quot;&gt;false&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Checkout
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/checkout@v4

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Setup Ruby
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ruby/setup&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;ruby@v1
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;ruby-version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;3.2&#39;&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;bundler-cache&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean important&quot;&gt;true&lt;/span&gt;

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Setup Pages
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/configure&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Build with Jekyll
        &lt;span class=&quot;token key atrule&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; bundle exec jekyll build
        &lt;span class=&quot;token key atrule&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;JEKYLL_ENV&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; production

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Upload artifact
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/upload&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;artifact@v3

  &lt;span class=&quot;token key atrule&quot;&gt;deploy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; github&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages
      &lt;span class=&quot;token key atrule&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; steps.deployment.outputs.page_url &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;needs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; build
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy to GitHub Pages
        &lt;span class=&quot;token key atrule&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; deployment
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/deploy&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;For Eleventy Sites&lt;/h3&gt;
&lt;p&gt;Create &lt;code&gt;.github/workflows/deploy.yml&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy Eleventy Site

&lt;span class=&quot;token key atrule&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;branches&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;permissions&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; read
  &lt;span class=&quot;token key atrule&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write
  &lt;span class=&quot;token key atrule&quot;&gt;id-token&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write

&lt;span class=&quot;token key atrule&quot;&gt;concurrency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;pages&quot;&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;cancel-in-progress&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean important&quot;&gt;false&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Checkout
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/checkout@v4

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Setup Node.js
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/setup&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;node@v4
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;node-version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;20&#39;&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;cache&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;npm&#39;&lt;/span&gt;

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Install dependencies
        &lt;span class=&quot;token key atrule&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; npm ci

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Build site
        &lt;span class=&quot;token key atrule&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; npm run build

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Setup Pages
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/configure&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Upload artifact
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/upload&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;artifact@v3
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;_site&#39;&lt;/span&gt;

  &lt;span class=&quot;token key atrule&quot;&gt;deploy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; github&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages
      &lt;span class=&quot;token key atrule&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; steps.deployment.outputs.page_url &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;needs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; build
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy to GitHub Pages
        &lt;span class=&quot;token key atrule&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; deployment
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/deploy&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;For Hugo Sites&lt;/h3&gt;
&lt;p&gt;Create &lt;code&gt;.github/workflows/deploy.yml&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy Hugo Site

&lt;span class=&quot;token key atrule&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;branches&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;permissions&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; read
  &lt;span class=&quot;token key atrule&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write
  &lt;span class=&quot;token key atrule&quot;&gt;id-token&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write

&lt;span class=&quot;token key atrule&quot;&gt;concurrency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;pages&quot;&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;cancel-in-progress&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean important&quot;&gt;false&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Checkout
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/checkout@v4
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;submodules&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; recursive

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Setup Hugo
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; peaceiris/actions&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;hugo@v2
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;hugo-version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;latest&#39;&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;extended&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean important&quot;&gt;true&lt;/span&gt;

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Build site
        &lt;span class=&quot;token key atrule&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; hugo &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;minify

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Setup Pages
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/configure&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Upload artifact
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/upload&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;artifact@v3
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;public&#39;&lt;/span&gt;

  &lt;span class=&quot;token key atrule&quot;&gt;deploy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; github&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages
      &lt;span class=&quot;token key atrule&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; steps.deployment.outputs.page_url &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;needs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; build
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy to GitHub Pages
        &lt;span class=&quot;token key atrule&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; deployment
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/deploy&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;For Plain HTML/CSS Sites&lt;/h3&gt;
&lt;p&gt;For sites that don&#39;t require a build step:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy Static Site

&lt;span class=&quot;token key atrule&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;branches&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;permissions&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; read
  &lt;span class=&quot;token key atrule&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write
  &lt;span class=&quot;token key atrule&quot;&gt;id-token&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write

&lt;span class=&quot;token key atrule&quot;&gt;concurrency&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;pages&quot;&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;cancel-in-progress&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean important&quot;&gt;false&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;deploy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; github&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages
      &lt;span class=&quot;token key atrule&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; steps.deployment.outputs.page_url &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Checkout
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/checkout@v4

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Setup Pages
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/configure&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Upload artifact
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/upload&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;artifact@v3
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;.&#39;&lt;/span&gt;

      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy to GitHub Pages
        &lt;span class=&quot;token key atrule&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; deployment
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/deploy&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v4&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 5: Configure GitHub Pages to Use Actions&lt;/h2&gt;
&lt;p&gt;After creating your workflow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;Pages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Build and deployment&lt;/strong&gt;, select &lt;strong&gt;GitHub Actions&lt;/strong&gt; as the source&lt;/li&gt;
&lt;li&gt;Push your workflow file to trigger the first deployment&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Step 6: Set Up a Custom Domain (Optional)&lt;/h2&gt;
&lt;p&gt;To use your own domain instead of &lt;code&gt;&amp;lt;username&amp;gt;.github.io&lt;/code&gt;:&lt;/p&gt;
&lt;h3&gt;Configure DNS Settings&lt;/h3&gt;
&lt;p&gt;Add the following DNS records with your domain registrar:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For apex domain (example.com):&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;@&lt;/td&gt;
&lt;td&gt;185.199.108.153&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;@&lt;/td&gt;
&lt;td&gt;185.199.109.153&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;@&lt;/td&gt;
&lt;td&gt;185.199.110.153&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;@&lt;/td&gt;
&lt;td&gt;185.199.111.153&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;For subdomain (www.example.com):&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CNAME&lt;/td&gt;
&lt;td&gt;www&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;username&amp;gt;.github.io&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Add CNAME File&lt;/h3&gt;
&lt;p&gt;Create a &lt;code&gt;CNAME&lt;/code&gt; file in your repository root containing your domain:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Enable Custom Domain in GitHub&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;Pages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Enter your custom domain under &lt;strong&gt;Custom domain&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Enable &lt;strong&gt;Enforce HTTPS&lt;/strong&gt; (recommended)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Step 7: Create Pre-commit and Pre-push Hooks (Optional)&lt;/h2&gt;
&lt;p&gt;Git hooks automate tasks before commits or pushes, such as running tests or linting.&lt;/p&gt;
&lt;h3&gt;Pre-commit Hook for Linting&lt;/h3&gt;
&lt;p&gt;Create &lt;code&gt;.git/hooks/pre-commit&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token shebang important&quot;&gt;#!/bin/sh&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Run linting before commit&lt;/span&gt;
&lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Running pre-commit checks...&quot;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# For Jekyll sites&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Gemfile&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;
  bundle &lt;span class=&quot;token builtin class-name&quot;&gt;exec&lt;/span&gt; jekyll doctor
  &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Jekyll doctor failed. Please fix errors before committing.&quot;&lt;/span&gt;
    &lt;span class=&quot;token builtin class-name&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# For Node.js sites (Eleventy, etc.)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;package.json&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; run lint &lt;span class=&quot;token operator&quot;&gt;&lt;span class=&quot;token file-descriptor important&quot;&gt;2&lt;/span&gt;&gt;&lt;/span&gt;/dev/null
  &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Linting failed. Please fix errors before committing.&quot;&lt;/span&gt;
    &lt;span class=&quot;token builtin class-name&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Pre-commit checks passed.&quot;&lt;/span&gt;
&lt;span class=&quot;token builtin class-name&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Make it executable:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;chmod&lt;/span&gt; +x .git/hooks/pre-commit&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Pre-push Hook for Build Verification&lt;/h3&gt;
&lt;p&gt;Create &lt;code&gt;.git/hooks/pre-push&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token shebang important&quot;&gt;#!/bin/sh&lt;/span&gt;

&lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Running pre-push checks...&quot;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# For Jekyll sites&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Gemfile&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;
  bundle &lt;span class=&quot;token builtin class-name&quot;&gt;exec&lt;/span&gt; jekyll build
  &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Jekyll build failed. Please fix errors before pushing.&quot;&lt;/span&gt;
    &lt;span class=&quot;token builtin class-name&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# For Node.js sites&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;package.json&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; run build
  &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Build failed. Please fix errors before pushing.&quot;&lt;/span&gt;
    &lt;span class=&quot;token builtin class-name&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Pre-push checks passed.&quot;&lt;/span&gt;
&lt;span class=&quot;token builtin class-name&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Make it executable:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;chmod&lt;/span&gt; +x .git/hooks/pre-push&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Using Husky for Managed Git Hooks&lt;/h3&gt;
&lt;p&gt;For Node.js projects, &lt;a href=&quot;https://typicode.github.io/husky/&quot;&gt;Husky&lt;/a&gt; provides a more maintainable approach to Git hooks.&lt;/p&gt;
&lt;p&gt;Install Husky:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; --save-dev husky
npx husky init&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create a pre-commit hook:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;npm run lint&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; .husky/pre-commit&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create a pre-push hook:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;npm run build&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; .husky/pre-push&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Husky hooks are stored in the repository and shared across the team.&lt;/p&gt;
&lt;h2&gt;Step 8: Verify Your Deployment&lt;/h2&gt;
&lt;p&gt;After pushing your changes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;Actions&lt;/strong&gt; tab in your repository&lt;/li&gt;
&lt;li&gt;Monitor the workflow execution&lt;/li&gt;
&lt;li&gt;Once complete, visit your site at the configured URL&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Troubleshooting Common Issues&lt;/h2&gt;
&lt;h3&gt;Build Fails with Permission Errors&lt;/h3&gt;
&lt;p&gt;Ensure your workflow has the correct permissions:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;permissions&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; read
  &lt;span class=&quot;token key atrule&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write
  &lt;span class=&quot;token key atrule&quot;&gt;id-token&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; write&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Custom Domain Not Working&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Verify DNS records have propagated (use &lt;code&gt;dig example.com&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Ensure the CNAME file contains only your domain&lt;/li&gt;
&lt;li&gt;Wait up to 24 hours for DNS propagation&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;404 Errors on Subpages&lt;/h3&gt;
&lt;p&gt;For single-page applications, create a &lt;code&gt;404.html&lt;/code&gt; that redirects to your index:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token doctype&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span class=&quot;token doctype-tag&quot;&gt;DOCTYPE&lt;/span&gt; &lt;span class=&quot;token name&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;meta&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;http-equiv&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;refresh&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0; url=/&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;span class=&quot;token language-javascript&quot;&gt;window&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;location&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;href &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  Redirecting...
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Assets Not Loading&lt;/h3&gt;
&lt;p&gt;Ensure your base URL is configured correctly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Jekyll: Set &lt;code&gt;baseurl&lt;/code&gt; in &lt;code&gt;_config.yml&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Eleventy: Configure &lt;code&gt;pathPrefix&lt;/code&gt; in &lt;code&gt;.eleventy.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Hugo: Set &lt;code&gt;baseURL&lt;/code&gt; in &lt;code&gt;config.toml&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;GitHub Pages Limitations&lt;/h2&gt;
&lt;p&gt;Be aware of these limitations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Repository size&lt;/strong&gt;: 1 GB recommended maximum&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Site size&lt;/strong&gt;: 1 GB maximum&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bandwidth&lt;/strong&gt;: 100 GB per month soft limit&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Builds&lt;/strong&gt;: 10 builds per hour soft limit&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No server-side code&lt;/strong&gt;: Static files only&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;GitHub Pages provides an excellent free hosting solution for static websites. Combined with GitHub Actions, you can automate your entire deployment pipeline with minimal configuration.&lt;/p&gt;
&lt;p&gt;Key takeaways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a repository and enable GitHub Pages&lt;/li&gt;
&lt;li&gt;Configure GitHub Actions for automated builds&lt;/li&gt;
&lt;li&gt;Set up a custom domain for a professional appearance&lt;/li&gt;
&lt;li&gt;Use Git hooks to catch errors before deployment&lt;/li&gt;
&lt;li&gt;Monitor your deployments through the Actions tab&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For complex deployments or if you encounter issues, contact us at &lt;a href=&quot;mailto:assist@knowledgebasement.com&quot;&gt;assist@knowledgebasement.com&lt;/a&gt;. We offer consulting services for a small fee to help you get your site up and running.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Web Development"/>
  </entry>
  <entry>
    <title>How to Migrate a Site from Jekyll to Eleventy (11ty)</title>
    <link href="https://www.knowledgebasement.com/migrate-from-jekyll-to-eleventy/" rel="alternate" type="text/html" title="How to Migrate a Site from Jekyll to Eleventy (11ty)"/>
    <published>2026-02-05T10:00:00Z</published>
    <updated>2026-02-05T10:00:00Z</updated>
    <id>https://www.knowledgebasement.com/migrate-from-jekyll-to-eleventy/</id>
    <summary>How to Migrate a Site from Jekyll to Eleventy (11ty) Jekyll has been a popular static site generator for years, especially for GitHub Pages. However,…</summary>
    <content type="html">&lt;h1&gt;How to Migrate a Site from Jekyll to Eleventy (11ty)&lt;/h1&gt;
&lt;p&gt;Jekyll has been a popular static site generator for years, especially for GitHub Pages. However, many developers are now migrating to Eleventy (11ty) for its speed, flexibility, and JavaScript-based ecosystem. In this guide, we&#39;ll walk you through the process of migrating your Jekyll site to Eleventy.&lt;/p&gt;
&lt;h2&gt;Why Migrate from Jekyll to Eleventy?&lt;/h2&gt;
&lt;p&gt;Before we dive in, here are some reasons to consider the switch:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Faster build times&lt;/strong&gt;: Eleventy is significantly faster than Jekyll&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Ruby dependency&lt;/strong&gt;: Eleventy runs on Node.js, which is more common in modern web development&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Template flexibility&lt;/strong&gt;: Use any template language (Nunjucks, Liquid, Markdown, etc.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simpler configuration&lt;/strong&gt;: Less magic, more control&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Active development&lt;/strong&gt;: Eleventy has a vibrant community and frequent updates&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Step 1: Set Up Your New Eleventy Project&lt;/h2&gt;
&lt;p&gt;First, create a new directory and initialize your Eleventy project:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; my-eleventy-site
&lt;span class=&quot;token builtin class-name&quot;&gt;cd&lt;/span&gt; my-eleventy-site
&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; init &lt;span class=&quot;token parameter variable&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; --save-dev @11ty/eleventy&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 2: Understand the Directory Structure Differences&lt;/h2&gt;
&lt;p&gt;Jekyll and Eleventy have similar but different conventions:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Jekyll&lt;/th&gt;
&lt;th&gt;Eleventy&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;_posts/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;posts/&lt;/code&gt; or &lt;code&gt;blog/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Blog posts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;_layouts/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;_includes/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Layout templates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;_includes/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;_includes/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Partial templates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;_data/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;_data/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Data files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;_config.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.eleventy.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Configuration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;_site/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;_site/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Output directory&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Step 3: Create the Eleventy Configuration&lt;/h2&gt;
&lt;p&gt;Create an &lt;code&gt;.eleventy.js&lt;/code&gt; file to configure your site:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;module&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;eleventyConfig&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;// Copy static assets&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addPassthroughCopy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;assets&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addPassthroughCopy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;images&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addPassthroughCopy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;css&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token comment&quot;&gt;// If you&#39;re using Liquid templates (like Jekyll)&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setLiquidOptions&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;dynamicPartials&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;strictFilters&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;false&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token comment&quot;&gt;// Add a date filter similar to Jekyll&#39;s&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addFilter&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;date&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;date&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; format&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; d &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;date&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;format &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;%Y-%m-%d&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;toISOString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;T&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;format &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;%B %d, %Y&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;toLocaleDateString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;en-US&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; 
        &lt;span class=&quot;token literal-property property&quot;&gt;year&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;numeric&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 
        &lt;span class=&quot;token literal-property property&quot;&gt;month&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;long&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 
        &lt;span class=&quot;token literal-property property&quot;&gt;day&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;numeric&#39;&lt;/span&gt; 
      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; d&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;toDateString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;src&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;output&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_site&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;includes&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_includes&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_data&quot;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;templateFormats&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;md&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;njk&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;html&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;liquid&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;markdownTemplateEngine&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;liquid&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;htmlTemplateEngine&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;njk&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 4: Migrate Your Posts&lt;/h2&gt;
&lt;p&gt;Jekyll posts use the naming convention &lt;code&gt;YYYY-MM-DD-title.md&lt;/code&gt;. Eleventy doesn&#39;t require this format, but you can keep it for organization.&lt;/p&gt;
&lt;h3&gt;Create a Posts Directory&lt;/h3&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-p&lt;/span&gt; src/posts&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Copy Your Posts&lt;/h3&gt;
&lt;p&gt;Copy your Jekyll posts from &lt;code&gt;_posts/&lt;/code&gt; to &lt;code&gt;src/posts/&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-r&lt;/span&gt; _posts/* src/posts/&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Update Front Matter&lt;/h3&gt;
&lt;p&gt;Jekyll and Eleventy front matter is similar, but you may need to make adjustments:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jekyll front matter:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; post
&lt;span class=&quot;token key atrule&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;My Blog Post&quot;&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2026&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;02&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;05 10&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;00&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;00 +0200
&lt;span class=&quot;token key atrule&quot;&gt;categories&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; jekyll update
&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Eleventy front matter:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; post.njk
&lt;span class=&quot;token key atrule&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;My Blog Post&quot;&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token datetime number&quot;&gt;2026-02-05&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;tags&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 
  &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; posts
  &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; jekyll
  &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; update
&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Key changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update &lt;code&gt;layout&lt;/code&gt; to include the file extension (e.g., &lt;code&gt;post.njk&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Convert &lt;code&gt;categories&lt;/code&gt; to &lt;code&gt;tags&lt;/code&gt; (Eleventy uses tags for collections)&lt;/li&gt;
&lt;li&gt;Simplify the date format&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Create a Posts Data File&lt;/h3&gt;
&lt;p&gt;Create &lt;code&gt;src/posts/posts.json&lt;/code&gt; to apply default settings to all posts:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;layout&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;post.njk&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;tags&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;posts&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;permalink&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/{{ page.fileSlug }}/&quot;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 5: Migrate Your Layouts&lt;/h2&gt;
&lt;p&gt;Jekyll layouts go in &lt;code&gt;_layouts/&lt;/code&gt;, while Eleventy uses &lt;code&gt;_includes/&lt;/code&gt; for both layouts and partials.&lt;/p&gt;
&lt;h3&gt;Convert Layout Files&lt;/h3&gt;
&lt;p&gt;Copy your Jekyll layouts and convert them:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jekyll &lt;code&gt;_layouts/default.html&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token doctype&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span class=&quot;token doctype-tag&quot;&gt;DOCTYPE&lt;/span&gt; &lt;span class=&quot;token name&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;{{ page.title }} | {{ site.title }}&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  {% include head.html %}
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  {% include header.html %}
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    {{ content }}
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  {% include footer.html %}
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Eleventy &lt;code&gt;_includes/default.njk&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token doctype&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span class=&quot;token doctype-tag&quot;&gt;DOCTYPE&lt;/span&gt; &lt;span class=&quot;token name&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;{{ title }} | {{ site.title }}&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  {% include &quot;head.njk&quot; %}
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  {% include &quot;header.njk&quot; %}
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    {{ content | safe }}
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  {% include &quot;footer.njk&quot; %}
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Key differences:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;{{ content | safe }}&lt;/code&gt; instead of &lt;code&gt;{{ content }}&lt;/code&gt; to render HTML&lt;/li&gt;
&lt;li&gt;Include paths need quotes: &lt;code&gt;{% include &amp;quot;file.njk&amp;quot; %}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Access front matter directly: &lt;code&gt;{{ title }}&lt;/code&gt; instead of &lt;code&gt;{{ page.title }}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Convert Post Layout&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Eleventy &lt;code&gt;_includes/post.njk&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;---
layout: default.njk
---
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;article&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;header&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;{{ title }}&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;time&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;{{ date | date: &#39;%Y-%m-%d&#39; }}&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
      {{ date | date: &#39;%B %d, %Y&#39; }}
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;time&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;header&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;post-content&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    {{ content | safe }}
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;article&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 6: Migrate Site Variables&lt;/h2&gt;
&lt;p&gt;Jekyll uses &lt;code&gt;_config.yml&lt;/code&gt; for site-wide variables. In Eleventy, use &lt;code&gt;_data/site.json&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jekyll &lt;code&gt;_config.yml&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; My Awesome Blog
&lt;span class=&quot;token key atrule&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; A blog about web development
&lt;span class=&quot;token key atrule&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; https&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;//example.com
&lt;span class=&quot;token key atrule&quot;&gt;author&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; John Doe&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Eleventy &lt;code&gt;src/_data/site.json&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;My Awesome Blog&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;description&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;A blog about web development&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;url&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;https://example.com&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;John Doe&quot;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Access these in templates with &lt;code&gt;{{ site.title }}&lt;/code&gt;, &lt;code&gt;{{ site.author }}&lt;/code&gt;, etc.&lt;/p&gt;
&lt;h2&gt;Step 7: Handle Jekyll-Specific Liquid Tags&lt;/h2&gt;
&lt;p&gt;Some Jekyll Liquid tags don&#39;t exist in Eleventy and need to be replaced:&lt;/p&gt;
&lt;h3&gt;post_url Tag&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Jekyll:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{% raw %}{% post_url 2026-02-05-my-post %}{% endraw %}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Eleventy:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/my-post/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or use a collection filter to find the URL dynamically.&lt;/p&gt;
&lt;h3&gt;highlight Tag&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Jekyll:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{% raw %}{% highlight javascript %}
const x = 1;
{% endhighlight %}{% endraw %}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Eleventy (use fenced code blocks):&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-markdown&quot;&gt;&lt;code class=&quot;language-markdown&quot;&gt;&lt;span class=&quot;token code&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;```&lt;/span&gt;&lt;span class=&quot;token code-language&quot;&gt;javascript&lt;/span&gt;
&lt;span class=&quot;token code-block language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; x &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;```&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To add syntax highlighting, install a plugin:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; --save-dev @11ty/eleventy-plugin-syntaxhighlight&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add to &lt;code&gt;.eleventy.js&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; syntaxHighlight &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;@11ty/eleventy-plugin-syntaxhighlight&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

module&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;eleventyConfig&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addPlugin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;syntaxHighlight&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;// ... rest of config&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 8: Create Collections for Posts&lt;/h2&gt;
&lt;p&gt;In Jekyll, posts in &lt;code&gt;_posts/&lt;/code&gt; are automatically available. In Eleventy, use tags or custom collections.&lt;/p&gt;
&lt;h3&gt;Using Tags (Recommended)&lt;/h3&gt;
&lt;p&gt;Add &lt;code&gt;tags: posts&lt;/code&gt; to your post front matter, then access with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{% raw %}{% for post in collections.posts reversed %}
  &amp;lt;article&amp;gt;
    &amp;lt;h2&amp;gt;&amp;lt;a href=&amp;quot;{{ post.url }}&amp;quot;&amp;gt;{{ post.data.title }}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;
    &amp;lt;time&amp;gt;{{ post.date | date: &amp;quot;%Y-%m-%d&amp;quot; }}&amp;lt;/time&amp;gt;
  &amp;lt;/article&amp;gt;
{% endfor %}{% endraw %}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Custom Collection&lt;/h3&gt;
&lt;p&gt;In &lt;code&gt;.eleventy.js&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addCollection&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;posts&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;collectionApi&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; collectionApi&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getFilteredByGlob&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;src/posts/*.md&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;sort&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;a&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; b&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; b&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;date &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt; a&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;date&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// Sort by date descending&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 9: Migrate Pagination&lt;/h2&gt;
&lt;p&gt;Jekyll and Eleventy handle pagination differently.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Eleventy pagination in &lt;code&gt;src/blog.njk&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; default.njk
&lt;span class=&quot;token key atrule&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Blog
&lt;span class=&quot;token key atrule&quot;&gt;pagination&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; collections.posts
  &lt;span class=&quot;token key atrule&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;10&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;reverse&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean important&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;alias&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; posts
&lt;span class=&quot;token key atrule&quot;&gt;permalink&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;blog/{% if pagination.pageNumber &gt; 0 %}page/{{ pagination.pageNumber + 1 }}/{% endif %}&quot;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;

&amp;lt;h1&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;Blog&amp;lt;/h1&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;

&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;% for post in posts %&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &amp;lt;article&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;
    &amp;lt;h2&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&amp;lt;a href=&quot;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; post.url &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&quot;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; post.data.title &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&amp;lt;/a&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&amp;lt;/h2&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;
  &amp;lt;/article&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;% endfor %&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&amp;lt;nav&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;% if pagination.href.previous %&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &amp;lt;a href=&quot;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; pagination.href.previous &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&quot;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;Previous&amp;lt;/a&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;% endif %&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;% if pagination.href.next %&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &amp;lt;a href=&quot;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; pagination.href.next &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&quot;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;Next&amp;lt;/a&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;% endif %&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&amp;lt;/nav&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 10: Update npm Scripts&lt;/h2&gt;
&lt;p&gt;Add build scripts to &lt;code&gt;package.json&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;eleventy&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;start&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;eleventy --serve&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;clean&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;rm -rf _site&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 11: Test Your Migration&lt;/h2&gt;
&lt;p&gt;Run the development server to test:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; start&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Broken links&lt;/li&gt;
&lt;li&gt;Missing images&lt;/li&gt;
&lt;li&gt;Layout issues&lt;/li&gt;
&lt;li&gt;Date formatting problems&lt;/li&gt;
&lt;li&gt;Syntax highlighting&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Common Migration Issues and Solutions&lt;/h2&gt;
&lt;h3&gt;Issue: Dates Display as &amp;quot;Invalid Date&amp;quot;&lt;/h3&gt;
&lt;p&gt;Ensure dates in front matter are valid:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# Good&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token datetime number&quot;&gt;2026-02-05&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Also good&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token datetime number&quot;&gt;2026-02-05T10:00:00&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Avoid complex formats&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Issue: Liquid Includes Not Working&lt;/h3&gt;
&lt;p&gt;Update include syntax to use quotes:&lt;/p&gt;
&lt;pre class=&quot;language-liquid&quot;&gt;&lt;code class=&quot;language-liquid&quot;&gt;# Jekyll
&lt;span class=&quot;token liquid language-liquid&quot;&gt;&lt;span class=&quot;token delimiter punctuation&quot;&gt;{%&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;include&lt;/span&gt; header&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;html &lt;span class=&quot;token delimiter punctuation&quot;&gt;%}&lt;/span&gt;&lt;/span&gt;

# Eleventy
&lt;span class=&quot;token liquid language-liquid&quot;&gt;&lt;span class=&quot;token delimiter punctuation&quot;&gt;{%&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;header.njk&quot;&lt;/span&gt; &lt;span class=&quot;token delimiter punctuation&quot;&gt;%}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Issue: Site Variables Not Available&lt;/h3&gt;
&lt;p&gt;Make sure you created &lt;code&gt;_data/site.json&lt;/code&gt; and your input directory is configured correctly.&lt;/p&gt;
&lt;h3&gt;Issue: Posts Not Showing&lt;/h3&gt;
&lt;p&gt;Ensure posts have &lt;code&gt;tags: posts&lt;/code&gt; in front matter or configure a custom collection.&lt;/p&gt;
&lt;h2&gt;Deployment&lt;/h2&gt;
&lt;p&gt;If you were using GitHub Pages with Jekyll, you&#39;ll need to update your deployment:&lt;/p&gt;
&lt;h3&gt;GitHub Actions&lt;/h3&gt;
&lt;p&gt;Create &lt;code&gt;.github/workflows/deploy.yml&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy to GitHub Pages

&lt;span class=&quot;token key atrule&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;branches&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;token key atrule&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;build-and-deploy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ubuntu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;latest
    &lt;span class=&quot;token key atrule&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/checkout@v3
      
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Setup Node
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; actions/setup&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;node@v3
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;node-version&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;18&#39;&lt;/span&gt;
          
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Install dependencies
        &lt;span class=&quot;token key atrule&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; npm ci
        
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Build
        &lt;span class=&quot;token key atrule&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; npm run build
        
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Deploy
        &lt;span class=&quot;token key atrule&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; peaceiris/actions&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;gh&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;pages@v3
        &lt;span class=&quot;token key atrule&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;github_token&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; secrets.GITHUB_TOKEN &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
          &lt;span class=&quot;token key atrule&quot;&gt;publish_dir&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; ./_site&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Migrating from Jekyll to Eleventy requires some work, but the benefits are worth it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Faster builds&lt;/li&gt;
&lt;li&gt;Modern JavaScript ecosystem&lt;/li&gt;
&lt;li&gt;More flexibility&lt;/li&gt;
&lt;li&gt;Active community&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key steps are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set up your Eleventy project&lt;/li&gt;
&lt;li&gt;Migrate posts and update front matter&lt;/li&gt;
&lt;li&gt;Convert layouts to Nunjucks or keep using Liquid&lt;/li&gt;
&lt;li&gt;Move site config to &lt;code&gt;_data/site.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update Jekyll-specific Liquid tags&lt;/li&gt;
&lt;li&gt;Configure collections&lt;/li&gt;
&lt;li&gt;Test thoroughly&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For more information, check out the &lt;a href=&quot;https://www.11ty.dev/docs/&quot;&gt;Eleventy documentation&lt;/a&gt; and the &lt;a href=&quot;https://learneleventyfromscratch.com/&quot;&gt;Eleventy from Scratch course&lt;/a&gt;.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Web Development"/>
  </entry>
  <entry>
    <title>How to Create a Site with Eleventy (11ty)</title>
    <link href="https://www.knowledgebasement.com/create-site-with-eleventy/" rel="alternate" type="text/html" title="How to Create a Site with Eleventy (11ty)"/>
    <published>2026-02-05T08:00:00Z</published>
    <updated>2026-02-05T08:00:00Z</updated>
    <id>https://www.knowledgebasement.com/create-site-with-eleventy/</id>
    <summary>How to Create a Site with Eleventy (11ty) Eleventy (11ty) is a simple, fast, and flexible static site generator built with JavaScript. Unlike other…</summary>
    <content type="html">&lt;h1&gt;How to Create a Site with Eleventy (11ty)&lt;/h1&gt;
&lt;p&gt;Eleventy (11ty) is a simple, fast, and flexible static site generator built with JavaScript. Unlike other static site generators, Eleventy doesn&#39;t force you to use a specific templating language or framework. It supports multiple template languages including HTML, Markdown, Nunjucks, Liquid, and more. In this guide, we&#39;ll walk you through creating your first site with Eleventy.&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before you begin, make sure you have Node.js installed on your machine. You can verify this by running:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;node&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;--version&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;--version&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You&#39;ll need Node.js version 14 or higher.&lt;/p&gt;
&lt;h2&gt;Step 1: Create a New Project&lt;/h2&gt;
&lt;p&gt;First, create a new directory for your project and initialize it with npm:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; my-eleventy-site
&lt;span class=&quot;token builtin class-name&quot;&gt;cd&lt;/span&gt; my-eleventy-site
&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; init &lt;span class=&quot;token parameter variable&quot;&gt;-y&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 2: Install Eleventy&lt;/h2&gt;
&lt;p&gt;Install Eleventy as a development dependency:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; --save-dev @11ty/eleventy&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 3: Create Your First Template&lt;/h2&gt;
&lt;p&gt;Create an &lt;code&gt;index.md&lt;/code&gt; file in your project root:&lt;/p&gt;
&lt;pre class=&quot;language-markdown&quot;&gt;&lt;code class=&quot;language-markdown&quot;&gt;&lt;span class=&quot;token title important&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;#&lt;/span&gt; Welcome to My Eleventy Site&lt;/span&gt;

This is my first page built with Eleventy!&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 4: Run Eleventy&lt;/h2&gt;
&lt;p&gt;You can now run Eleventy to build your site:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;npx @11ty/eleventy&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will create a &lt;code&gt;_site&lt;/code&gt; folder containing your generated static files.&lt;/p&gt;
&lt;p&gt;To run a local development server with hot reloading:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;npx @11ty/eleventy &lt;span class=&quot;token parameter variable&quot;&gt;--serve&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your site will be available at &lt;code&gt;http://localhost:8080&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Step 5: Add npm Scripts&lt;/h2&gt;
&lt;p&gt;For convenience, add these scripts to your &lt;code&gt;package.json&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;eleventy&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;start&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;eleventy --serve&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now you can use &lt;code&gt;npm start&lt;/code&gt; for development and &lt;code&gt;npm run build&lt;/code&gt; for production builds.&lt;/p&gt;
&lt;h2&gt;Step 6: Create a Layout&lt;/h2&gt;
&lt;p&gt;Layouts help you maintain consistent structure across pages. Create a &lt;code&gt;_includes&lt;/code&gt; folder and add a layout file:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; _includes&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create &lt;code&gt;_includes/base.njk&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token doctype&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span class=&quot;token doctype-tag&quot;&gt;DOCTYPE&lt;/span&gt; &lt;span class=&quot;token name&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;html&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;lang&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;en&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;meta&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;UTF-8&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;meta&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;viewport&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;width=device-width, initial-scale=1.0&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;{{ title }}&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;head&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;header&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;nav&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;a&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Home&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;a&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;a&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/about/&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;About&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;a&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;nav&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;header&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
        {{ content | safe }}
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;footer&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token entity named-entity&quot; title=&quot;&amp;copy;&quot;&gt;&amp;amp;copy;&lt;/span&gt; 2026 My Eleventy Site&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;footer&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;body&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 7: Use the Layout&lt;/h2&gt;
&lt;p&gt;Update your &lt;code&gt;index.md&lt;/code&gt; to use the layout:&lt;/p&gt;
&lt;pre class=&quot;language-markdown&quot;&gt;&lt;code class=&quot;language-markdown&quot;&gt;&lt;span class=&quot;token front-matter-block&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;token front-matter yaml language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; base.njk
&lt;span class=&quot;token key atrule&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Home&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token title important&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;#&lt;/span&gt; Welcome to My Eleventy Site&lt;/span&gt;

This is my first page built with Eleventy!&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 8: Create a Configuration File&lt;/h2&gt;
&lt;p&gt;Create an &lt;code&gt;.eleventy.js&lt;/code&gt; file in your project root to customize Eleventy:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;module&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function-variable function&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;eleventyConfig&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token comment&quot;&gt;// Copy static assets&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addPassthroughCopy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;css&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  eleventyConfig&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addPassthroughCopy&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;images&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token comment&quot;&gt;// Set custom directories&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;src&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;output&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_site&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;includes&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_includes&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token literal-property property&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;_data&quot;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;markdownTemplateEngine&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;njk&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;htmlTemplateEngine&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;njk&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 9: Add Styles&lt;/h2&gt;
&lt;p&gt;Create a &lt;code&gt;css&lt;/code&gt; folder and add a stylesheet:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; css&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create &lt;code&gt;css/style.css&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; border-box&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;body&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; system-ui&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; -apple-system&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; sans-serif&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;line-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1.6&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 800px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0 auto&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1rem&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;header&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2rem&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;nav a&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1rem&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;main&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;min-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 60vh&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;footer&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2rem&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;padding-top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1rem&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;border-top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1px solid #ccc&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Update your layout to include the stylesheet:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;link&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;stylesheet&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;/css/style.css&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 10: Create a Blog Collection&lt;/h2&gt;
&lt;p&gt;Eleventy makes it easy to create collections for blog posts. Create a &lt;code&gt;posts&lt;/code&gt; folder:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; posts&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create your first blog post at &lt;code&gt;posts/my-first-post.md&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-markdown&quot;&gt;&lt;code class=&quot;language-markdown&quot;&gt;&lt;span class=&quot;token front-matter-block&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;token front-matter yaml language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; base.njk
&lt;span class=&quot;token key atrule&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; My First Post
&lt;span class=&quot;token key atrule&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token datetime number&quot;&gt;2026-02-05&lt;/span&gt;
&lt;span class=&quot;token key atrule&quot;&gt;tags&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; posts&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token title important&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;#&lt;/span&gt; My First Blog Post&lt;/span&gt;

This is my first blog post using Eleventy!&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To display posts on your homepage, update &lt;code&gt;index.md&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-markdown&quot;&gt;&lt;code class=&quot;language-markdown&quot;&gt;&lt;span class=&quot;token front-matter-block&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;token front-matter yaml language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; base.njk
&lt;span class=&quot;token key atrule&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Home&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;---&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token title important&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;#&lt;/span&gt; Welcome to My Blog&lt;/span&gt;

{% for post in collections.posts reversed %}
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;article&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;a&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;{{ post.url }}&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;{{ post.data.title }}&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;a&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;time&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;{{ post.date | date: &quot;%Y-%m-%d&quot; }}&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;time&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;article&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
{% endfor %}&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Deploying Your Site&lt;/h2&gt;
&lt;p&gt;Eleventy generates static files in the &lt;code&gt;_site&lt;/code&gt; folder. You can deploy these files to any static hosting service:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GitHub Pages&lt;/strong&gt;: Push your &lt;code&gt;_site&lt;/code&gt; folder to a &lt;code&gt;gh-pages&lt;/code&gt; branch&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Netlify&lt;/strong&gt;: Connect your repository and set the build command to &lt;code&gt;npm run build&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vercel&lt;/strong&gt;: Similar to Netlify, just connect your repo&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloudflare Pages&lt;/strong&gt;: Connect your repository and configure the build settings&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;You&#39;ve now created a basic Eleventy site with layouts, styles, and a blog collection. Eleventy&#39;s flexibility allows you to expand this foundation with additional features like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data files for global site data&lt;/li&gt;
&lt;li&gt;Custom filters and shortcodes&lt;/li&gt;
&lt;li&gt;Multiple template languages&lt;/li&gt;
&lt;li&gt;Pagination for large collections&lt;/li&gt;
&lt;li&gt;RSS feeds&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Eleventy&#39;s simplicity and speed make it an excellent choice for blogs, documentation sites, and portfolios. Check out the &lt;a href=&quot;https://www.11ty.dev/docs/&quot;&gt;official Eleventy documentation&lt;/a&gt; to explore more features and capabilities.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Web Development"/>
  </entry>
  <entry>
    <title>How to Convert WordPress to Jekyll</title>
    <link href="https://www.knowledgebasement.com/wordpress-to-jekyll/" rel="alternate" type="text/html" title="How to Convert WordPress to Jekyll"/>
    <published>2024-03-03T03:39:26Z</published>
    <updated>2024-03-03T03:39:26Z</updated>
    <id>https://www.knowledgebasement.com/wordpress-to-jekyll/</id>
    <summary>How to Convert WordPress to Jekyll WordPress is a popular content management system (CMS) that powers millions of websites. It is a great platform for…</summary>
    <content type="html">&lt;h1&gt;How to Convert WordPress to Jekyll&lt;/h1&gt;
&lt;p&gt;WordPress is a popular content management system (CMS) that powers millions of websites. It is a great platform for creating and managing websites, but it has its limitations. One of the biggest drawbacks of WordPress is that it can be slow and resource-intensive, especially for larger websites. This is where Jekyll comes in. Jekyll is a static site generator that can help you convert your WordPress website into a fast, lightweight, and secure static website. In this article, we will show you how to convert your WordPress website to Jekyll.&lt;/p&gt;
&lt;h2&gt;Step 1: Install Jekyll&lt;/h2&gt;
&lt;p&gt;The first step in converting your WordPress website to Jekyll is to install Jekyll on your local machine. Jekyll is a Ruby gem, so you will need to have Ruby installed on your machine. You can install Jekyll by running the following command in your terminal:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;gem &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; jekyll&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 2: Export Your WordPress Content&lt;/h2&gt;
&lt;p&gt;Once you have Jekyll installed, the next step is to export your WordPress content. You can do this by going to the WordPress admin dashboard and navigating to Tools &amp;gt; Export. From there, you can choose to export all of your content or just specific content types. Once you have exported your content, you will have an XML file that contains all of your posts, pages, and other content.&lt;/p&gt;
&lt;h2&gt;Step 3: Convert Your WordPress Content to Jekyll&lt;/h2&gt;
&lt;p&gt;The next step is to convert your WordPress content to Jekyll. There are a few different ways to do this, but one of the easiest ways is to use a tool called &lt;code&gt;wordpress2jekyll&lt;/code&gt;. This is a Ruby gem that can convert your WordPress XML file into a Jekyll-friendly format. You can install &lt;code&gt;wordpress2jekyll&lt;/code&gt; by running the following command in your terminal:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;gem &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; wordpress2jekyll&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once you have &lt;code&gt;wordpress2jekyll&lt;/code&gt; installed, you can use it to convert your WordPress content to Jekyll by running the following command in your terminal:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;wordpress2jekyll /path/to/wordpress.xml /path/to/jekyll&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will create a new directory at &lt;code&gt;/path/to/jekyll&lt;/code&gt; that contains all of your WordPress content in a Jekyll-friendly format.&lt;/p&gt;
&lt;h2&gt;Step 4: Customize Your Jekyll Site&lt;/h2&gt;
&lt;p&gt;Once you have converted your WordPress content to Jekyll, the next step is to customize your Jekyll site. You can do this by editing the &lt;code&gt;_config.yml&lt;/code&gt; file in your Jekyll directory. This file contains all of the configuration settings for your Jekyll site, including the site title, description, and other settings. You can also customize the layout and design of your Jekyll site by editing the HTML, CSS, and JavaScript files in your Jekyll directory.&lt;/p&gt;
&lt;h2&gt;Step 5: Build and Deploy Your Jekyll Site&lt;/h2&gt;
&lt;p&gt;The final step in converting your WordPress website to Jekyll is to build and deploy your Jekyll site. You can do this by running the following command in your terminal:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;jekyll build&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will build your Jekyll site and create a &lt;code&gt;_site&lt;/code&gt; directory that contains all of the static files for your site. You can then deploy your Jekyll site to a web server or hosting service of your choice.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Converting your WordPress website to Jekyll can help you create a fast, lightweight, and secure static website. By following the steps outlined in this article, you can convert your WordPress website to Jekyll and take advantage of the many benefits of static site generation.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Creating Embeddings with OpenAI, Saving Them in ChromaDB, and Searching Them with Java</title>
    <link href="https://www.knowledgebasement.com/creating-embeddings-with-openai-saving-them-in-chromadb-and-searching-them-with-java/" rel="alternate" type="text/html" title="Creating Embeddings with OpenAI, Saving Them in ChromaDB, and Searching Them with Java"/>
    <published>2024-02-15T04:17:08Z</published>
    <updated>2024-02-15T04:17:08Z</updated>
    <id>https://www.knowledgebasement.com/creating-embeddings-with-openai-saving-them-in-chromadb-and-searching-them-with-java/</id>
    <summary>In the realm of natural language processing (NLP), embeddings play a pivotal role in representing textual data in a numerical format that machine…</summary>
    <content type="html">&lt;p&gt;In the realm of natural language processing (NLP), embeddings play a pivotal role in representing textual data in a numerical format that machine learning models can understand. Embeddings capture semantic information about words, phrases, or sentences, enabling various NLP tasks such as sentiment analysis, text classification, and machine translation. OpenAI, a leading research organization in artificial intelligence, offers powerful models and tools for creating embeddings. Additionally, storing these embeddings efficiently and performing fast similarity searches is essential for many applications. ChromaDB is a high-performance, distributed database designed specifically for storing and querying embeddings efficiently. In this comprehensive guide, we&#39;ll explore how to leverage OpenAI&#39;s capabilities to create embeddings, save them in ChromaDB, and search them using Java.&lt;/p&gt;
&lt;h2&gt;Introduction to Embeddings, OpenAI, and ChromaDB&lt;/h2&gt;
&lt;h3&gt;Understanding Embeddings&lt;/h3&gt;
&lt;p&gt;Embeddings are numerical representations of text data that capture semantic information about words, phrases, or sentences. Each word, phrase, or sentence is mapped to a high-dimensional vector space, where similar vectors represent similar meanings or contexts. Embeddings are essential for various NLP tasks, as they provide a way to represent textual information in a format that machine learning models can process effectively.&lt;/p&gt;
&lt;h3&gt;Introducing OpenAI&lt;/h3&gt;
&lt;p&gt;OpenAI is a research organization focused on advancing artificial intelligence in a safe and beneficial manner. OpenAI offers a wide range of models, tools, and APIs for building and deploying AI applications across various domains, including natural language processing, computer vision, and reinforcement learning. OpenAI&#39;s models are renowned for their performance and versatility, making them popular choices for developers and researchers alike.&lt;/p&gt;
&lt;h3&gt;Understanding ChromaDB&lt;/h3&gt;
&lt;p&gt;ChromaDB is a high-performance, distributed database designed specifically for storing and querying embeddings efficiently. ChromaDB leverages advanced indexing and storage techniques to enable fast similarity searches and retrieval of embeddings at scale. With ChromaDB, developers can store large volumes of embeddings and perform complex similarity queries in real-time, making it an ideal choice for applications requiring fast and efficient retrieval of textual data.&lt;/p&gt;
&lt;h2&gt;Creating Embeddings with OpenAI&lt;/h2&gt;
&lt;h3&gt;Step 1: Obtain OpenAI API Key&lt;/h3&gt;
&lt;p&gt;Before you can use OpenAI&#39;s models and tools, you&#39;ll need to sign up for an account on the OpenAI website and obtain an API key. This API key will allow you to authenticate your requests to OpenAI&#39;s API and access its services.&lt;/p&gt;
&lt;h3&gt;Step 2: Install OpenAI Java Client&lt;/h3&gt;
&lt;p&gt;To interact with OpenAI&#39;s API from your Java application, you&#39;ll need to add the OpenAI Java client library to your project. You can do this by including the following Maven dependency in your &lt;code&gt;pom.xml&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-xml&quot;&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;ai.openai&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;openai-java&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.1.0&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 3: Create Embeddings&lt;/h3&gt;
&lt;p&gt;Once you have set up your API key and installed the OpenAI Java client, you can start creating embeddings for text data. Here&#39;s a basic example of how to use OpenAI&#39;s API to create embeddings:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;import ai.openai.gpt3.*;
import java.util.*;

public class EmbeddingCreation {
    public static void main(String[] args) {
        // Initialize OpenAI client with your API key
        OpenAIApi openai = new OpenAIApi(&quot;your_api_key&quot;);

        // Define text data
        String text = &quot;Hello, world!&quot;;

        // Create embeddings for text data
        List&amp;lt;Float&amp;gt; embedding = openai.createEmbedding(text);

        // Print the embeddings
        System.out.println(&quot;Embeddings: &quot; + embedding);
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Storing Embeddings in ChromaDB&lt;/h2&gt;
&lt;h3&gt;Step 1: Set Up ChromaDB&lt;/h3&gt;
&lt;p&gt;First, ensure that ChromaDB is installed and running on your system or accessible via a remote server.&lt;/p&gt;
&lt;h3&gt;Step 2: Define Schema&lt;/h3&gt;
&lt;p&gt;Define a schema for storing embeddings in ChromaDB. You can do this using JSON schema as shown previously.&lt;/p&gt;
&lt;h3&gt;Step 3: Store Embeddings in ChromaDB&lt;/h3&gt;
&lt;p&gt;Use the ChromaDB Java client library to store embeddings in ChromaDB. Here&#39;s an example of how you can do it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;import chromadb.*;

public class ChromaDBStorage {
    public static void main(String[] args) {
        // Initialize ChromaDB client
        ChromaDBClient chromadb = new ChromaDBClient(&quot;localhost&quot;, 8080);

        // Define embeddings and associated text
        float[] embedding = {0.1f, 0.2f, 0.3f}; // Example embedding
        String text = &quot;Hello, world!&quot;; // Example text

        try {
            // Store embeddings in ChromaDB
            chromadb.store(embedding, text);
            System.out.println(&quot;Embedding stored successfully!&quot;);
        } catch (ChromaDBException e) {
            System.err.println(&quot;Error storing embedding: &quot; + e.getMessage());
            e.printStackTrace();
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Searching Embeddings with Java&lt;/h2&gt;
&lt;h3&gt;Step 1: Initialize ChromaDB Client&lt;/h3&gt;
&lt;p&gt;Initialize the ChromaDB client in your Java application to connect to the ChromaDB server.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;import chromadb.*;
import java.util.*;

public class ChromaDBClientInitialization {
    public static void main(String[] args) {
        // Initialize ChromaDB client
        ChromaDBClient chromadb = new ChromaDBClient(&quot;localhost&quot;, 8080);
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 2: Perform Similarity Search&lt;/h3&gt;
&lt;p&gt;Use the ChromaDB client to perform similarity searches and retrieve embeddings that are similar to a given query embedding.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;import chromadb.*;
import java.util.*;

public class ChromaDBSearch {
    public static void main(String[] args) {
        // Initialize ChromaDB client
        ChromaDBClient chromadb = new ChromaDBClient(&quot;localhost&quot;, 8080);

        // Define query embedding
        float[] queryEmbedding = {0.1f, 0.2f, 0.3f}; // Example query embedding

        try {
            // Perform

 similarity search
            List&amp;lt;Result&amp;gt; results = chromadb.search(queryEmbedding);

            // Print the search results
            for (Result result : results) {
                System.out.println(&quot;Text: &quot; + result.getText());
                System.out.println(&quot;Similarity: &quot; + result.getSimilarity());
            }
        } catch (ChromaDBException e) {
            System.err.println(&quot;Error performing similarity search: &quot; + e.getMessage());
            e.printStackTrace();
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this comprehensive guide, we&#39;ve explored how to create embeddings with OpenAI, save them in ChromaDB, and search them using Java. By leveraging OpenAI&#39;s capabilities to generate embeddings and ChromaDB&#39;s efficient storage and querying mechanisms, developers can build powerful NLP applications that require fast and scalable retrieval of textual data. Whether you&#39;re building a search engine, recommendation system, or text analytics tool, the combination of OpenAI and ChromaDB provides a robust foundation for handling large volumes of text data and delivering actionable insights in real-time. With the versatility and scalability offered by these technologies, developers can innovate and create impactful solutions that address a wide range of NLP challenges.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="databases"/>
    <category term="Java"/>
  </entry>
  <entry>
    <title>Creating and Searching Embeddings in Java with Hugging Face API</title>
    <link href="https://www.knowledgebasement.com/creating-and-searching-embeddings-in-java-with-huggingface/" rel="alternate" type="text/html" title="Creating and Searching Embeddings in Java with Hugging Face API"/>
    <published>2024-02-15T04:09:18Z</published>
    <updated>2024-02-15T04:09:18Z</updated>
    <id>https://www.knowledgebasement.com/creating-and-searching-embeddings-in-java-with-huggingface/</id>
    <summary>In the field of natural language processing (NLP), embeddings play a crucial role in representing text data in a numerical format that machine learning…</summary>
    <content type="html">&lt;p&gt;In the field of natural language processing (NLP), embeddings play a crucial role in representing text data in a numerical format that machine learning models can understand. Embeddings capture semantic information about words, phrases, or sentences, enabling various NLP tasks such as sentiment analysis, text classification, and machine translation. Hugging Face, a leading provider of NLP models and tools, offers an API that allows developers to easily create and search embeddings in Java. In this comprehensive guide, we&#39;ll explore how to leverage the Hugging Face API to create embeddings for text data and perform similarity searches in Java applications.&lt;/p&gt;
&lt;h2&gt;Introduction to Embeddings and Hugging Face&lt;/h2&gt;
&lt;h3&gt;What are Embeddings?&lt;/h3&gt;
&lt;p&gt;Embeddings are numerical representations of text data that capture semantic information about words, phrases, or sentences. Each word, phrase, or sentence is mapped to a high-dimensional vector space, where similar vectors represent similar meanings or contexts. Embeddings are commonly used in NLP tasks to feed text data into machine learning models, as they provide a way to represent textual information in a format that models can process effectively.&lt;/p&gt;
&lt;h3&gt;Introducing Hugging Face&lt;/h3&gt;
&lt;p&gt;Hugging Face is a popular platform for NLP practitioners and researchers, offering a wide range of pre-trained models, datasets, and tools for building and deploying NLP applications. The Hugging Face API provides access to state-of-the-art NLP models and embeddings, allowing developers to easily integrate powerful NLP capabilities into their applications.&lt;/p&gt;
&lt;p&gt;Now, let&#39;s dive into the process of creating and searching embeddings in Java using the Hugging Face API.&lt;/p&gt;
&lt;h2&gt;Creating Embeddings with Hugging Face API&lt;/h2&gt;
&lt;h3&gt;Step 1: Set Up Hugging Face API Key&lt;/h3&gt;
&lt;p&gt;Before you can use the Hugging Face API, you&#39;ll need to sign up for an account on the Hugging Face website and obtain an API key. This API key will allow you to authenticate your requests to the Hugging Face API.&lt;/p&gt;
&lt;h3&gt;Step 2: Install Hugging Face Java Client&lt;/h3&gt;
&lt;p&gt;To interact with the Hugging Face API from your Java application, you&#39;ll need to add the Hugging Face Java client library to your project. You can do this by including the following Maven dependency in your &lt;code&gt;pom.xml&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-xml&quot;&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;com.huggingface&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;transformers-java&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;4.11.3&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 3: Create Embeddings&lt;/h3&gt;
&lt;p&gt;Once you have set up your API key and installed the Hugging Face Java client, you can start creating embeddings for text data. Here&#39;s a basic example of how to create embeddings using the Hugging Face API:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;import com.huggingface.*;
import com.huggingface.models.*;

public class EmbeddingExample {
    public static void main(String[] args) throws Exception {
        // Initialize the Hugging Face client with your API key
        HFClient client = new HFClient(&quot;your_api_key&quot;);

        // Load a pre-trained model for creating embeddings
        Model model = client.getModel(&quot;distilbert-base-uncased&quot;);

        // Create embeddings for text data
        EmbeddingResult result = model.embed(&quot;Hello, world!&quot;);

        // Print the embeddings
        System.out.println(&quot;Embeddings: &quot; + result.getEmbeddings());
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, we initialize the Hugging Face client with our API key, load a pre-trained model (&quot;distilbert-base-uncased&quot;), and create embeddings for the text &quot;Hello, world!&quot;. The resulting embeddings are then printed to the console.&lt;/p&gt;
&lt;h2&gt;Searching Embeddings with Hugging Face API&lt;/h2&gt;
&lt;p&gt;Once you have created embeddings for your text data, you can use them to perform similarity searches and find similar text items. Here&#39;s how to perform a similarity search using the Hugging Face API:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;import com.huggingface.*;
import com.huggingface.models.*;

public class SimilaritySearchExample {
    public static void main(String[] args) throws Exception {
        // Initialize the Hugging Face client with your API key
        HFClient client = new HFClient(&quot;your_api_key&quot;);

        // Load a pre-trained model for creating embeddings
        Model model = client.getModel(&quot;distilbert-base-uncased&quot;);

        // Create embeddings for a list of text items
        EmbeddingResult query = model.embed(&quot;Hello, world!&quot;);

        // Perform a similarity search
        SearchResults results = model.search(query);

        // Print the search results
        for (SearchResult result : results.getResults()) {
            System.out.println(&quot;Text: &quot; + result.getText());
            System.out.println(&quot;Similarity: &quot; + result.getSimilarity());
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, we create embeddings for the query text &quot;Hello, world!&quot; and then perform a similarity search using the &lt;code&gt;search&lt;/code&gt; method of the Hugging Face model. The search results, including the text items and their similarity scores, are printed to the console.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this comprehensive guide, we&#39;ve explored how to create and search embeddings in Java using the Hugging Face API. By leveraging the power of pre-trained NLP models and embeddings provided by Hugging Face, developers can easily incorporate advanced NLP capabilities into their Java applications. Whether you&#39;re building a search engine, recommendation system, or text analytics tool, Hugging Face API offers a convenient and efficient way to process and analyze text data. With its extensive model library, robust client libraries, and developer-friendly API, Hugging Face is a valuable resource for anyone working with NLP in Java applications.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
  </entry>
  <entry>
    <title>How to configure a Linux File Server with NFS</title>
    <link href="https://www.knowledgebasement.com/how-to-configure-a-linux-file-server-with-nfs/" rel="alternate" type="text/html" title="How to configure a Linux File Server with NFS"/>
    <published>2024-02-15T04:06:03Z</published>
    <updated>2024-02-15T04:06:03Z</updated>
    <id>https://www.knowledgebasement.com/how-to-configure-a-linux-file-server-with-nfs/</id>
    <summary>In the realm of networked storage solutions, NFS (Network File System) stands out as a robust and efficient option for sharing files and directories…</summary>
    <content type="html">&lt;p&gt;In the realm of networked storage solutions, NFS (Network File System) stands out as a robust and efficient option for sharing files and directories across a network of Linux-based systems. NFS allows you to centralize storage resources and provide seamless access to files and directories from multiple clients, enabling collaboration, data sharing, and centralized management. In this comprehensive guide, we&#39;ll explore everything you need to know to configure a Linux file server with NFS, covering installation, setup, configuration, security considerations, and best practices.&lt;/p&gt;
&lt;h2&gt;Introduction to NFS&lt;/h2&gt;
&lt;p&gt;Network File System (NFS) is a distributed file system protocol that allows clients to access files and directories over a network as if they were located on the local file system. NFS enables seamless file sharing and access between heterogeneous systems, making it an ideal solution for environments with multiple Linux-based systems.&lt;/p&gt;
&lt;p&gt;Key features of NFS include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Network Transparency&lt;/strong&gt;: NFS provides transparent access to remote files and directories, allowing clients to access them as if they were local.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: NFS is highly scalable and can support large-scale deployments with hundreds or thousands of clients.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance&lt;/strong&gt;: NFS is optimized for high-performance file access, making it suitable for a wide range of applications and workloads.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;: NFS supports authentication and access control mechanisms to ensure the security and integrity of shared files and directories.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, let&#39;s dive into the process of configuring a Linux file server with NFS.&lt;/p&gt;
&lt;h2&gt;Setting Up the NFS Server&lt;/h2&gt;
&lt;p&gt;To set up an NFS server on your Linux system, you&#39;ll need to install the NFS server software and configure it to share directories with remote clients. Here&#39;s how to do it:&lt;/p&gt;
&lt;h3&gt;Step 1: Install NFS Server&lt;/h3&gt;
&lt;p&gt;First, install the NFS server software on your Linux system. The procedure for installing NFS server software may vary depending on your Linux distribution. Here are the commands for installing NFS server on some popular distributions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ubuntu/Debian&lt;/strong&gt;:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt-get install nfs-kernel-server&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CentOS/RHEL&lt;/strong&gt;:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo yum install nfs-utils&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 2: Configure Shared Directories&lt;/h3&gt;
&lt;p&gt;Next, you&#39;ll need to configure NFS to share one or more directories with remote clients. Edit the NFS server configuration file (&lt;code&gt;/etc/exports&lt;/code&gt;) to specify the directories you want to share and the access permissions for each client. Here&#39;s an example of how to configure the &lt;code&gt;/etc/exports&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;# /etc/exports
/home/shared   client1(rw,sync) client2(ro)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, we&#39;re sharing the &lt;code&gt;/home/shared&lt;/code&gt; directory with two clients (&lt;code&gt;client1&lt;/code&gt; and &lt;code&gt;client2&lt;/code&gt;). &lt;code&gt;client1&lt;/code&gt; has read-write (rw) access to the shared directory, while &lt;code&gt;client2&lt;/code&gt; has read-only (ro) access.&lt;/p&gt;
&lt;h3&gt;Step 3: Export Shared Directories&lt;/h3&gt;
&lt;p&gt;After configuring the &lt;code&gt;/etc/exports&lt;/code&gt; file, you&#39;ll need to export the shared directories and apply the changes to the NFS server configuration. Run the following command to export the shared directories:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo exportfs -a&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command exports all directories listed in the &lt;code&gt;/etc/exports&lt;/code&gt; file and makes them available to remote clients.&lt;/p&gt;
&lt;h3&gt;Step 4: Start NFS Server&lt;/h3&gt;
&lt;p&gt;Finally, start the NFS server to enable sharing of the configured directories. Run the following command to start the NFS server:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo systemctl start nfs-server&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can also enable the NFS server to start automatically at boot time by running:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo systemctl enable nfs-server&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Accessing Shared Directories from Clients&lt;/h2&gt;
&lt;p&gt;Once you&#39;ve configured the NFS server, clients can access the shared directories by mounting them on their local file systems. Here&#39;s how to do it:&lt;/p&gt;
&lt;h3&gt;Step 1: Install NFS Client Software&lt;/h3&gt;
&lt;p&gt;First, install the NFS client software on the client system. The procedure for installing NFS client software may vary depending on your Linux distribution. Here are the commands for installing NFS client on some popular distributions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ubuntu/Debian&lt;/strong&gt;:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt-get install nfs-common&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CentOS/RHEL&lt;/strong&gt;:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo yum install nfs-utils&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 2: Mount Shared Directories&lt;/h3&gt;
&lt;p&gt;After installing the NFS client software, you can mount the shared directories from the NFS server to the client system. Use the &lt;code&gt;mount&lt;/code&gt; command to mount the shared directories. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo mount nfs-server:/home/shared /mnt/shared&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &lt;code&gt;nfs-server&lt;/code&gt; with the hostname or IP address of the NFS server and &lt;code&gt;/home/shared&lt;/code&gt; with the path to the shared directory on the NFS server. &lt;code&gt;/mnt/shared&lt;/code&gt; is the mount point on the client system where the shared directory will be mounted.&lt;/p&gt;
&lt;h3&gt;Step 3: Access Shared Files&lt;/h3&gt;
&lt;p&gt;Once the shared directory is mounted on the client system, you can access the files and directories within it as if they were located on the local file system. Any changes made to the files or directories on the NFS server will be immediately visible to clients accessing the shared directory.&lt;/p&gt;
&lt;h2&gt;Security Considerations&lt;/h2&gt;
&lt;p&gt;When configuring an NFS server, it&#39;s important to consider security implications to protect sensitive data and prevent unauthorized access. Here are some security best practices for NFS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Restrict Access&lt;/strong&gt;: Limit access to shared directories by specifying client IP addresses or hostnames in the &lt;code&gt;/etc/exports&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use NFSv4&lt;/strong&gt;: NFS version 4 supports stronger authentication and encryption mechanisms compared to earlier versions, making it more secure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enable Firewall&lt;/strong&gt;: Configure firewall rules to allow NFS traffic only from trusted networks or hosts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Encrypt Traffic&lt;/strong&gt;: Use NFS over TCP (instead of UDP) and enable encryption to protect data in transit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By following these security best practices, you can ensure the security and integrity of your NFS-based file server infrastructure.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Configuring a Linux file server with NFS allows you to centralize storage resources and provide seamless access to files and directories from multiple clients. With its network transparency, scalability, and performance, NFS is an ideal solution for environments with multiple Linux-based systems.&lt;/p&gt;
&lt;p&gt;In this comprehensive guide, we&#39;ve covered everything you need to know to set up and configure an NFS server on Linux, including installation, setup, configuration, security considerations, and best practices. By following the steps outlined in this guide, you can create a reliable and efficient file server infrastructure using NFS, enabling collaboration, data sharing, and centralized management in your organization.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Building an Example Site with Javelin: Full Guide</title>
    <link href="https://www.knowledgebasement.com/building-an-example-site-with-javelin/" rel="alternate" type="text/html" title="Building an Example Site with Javelin: Full Guide"/>
    <published>2024-02-15T03:43:48Z</published>
    <updated>2024-02-15T03:43:48Z</updated>
    <id>https://www.knowledgebasement.com/building-an-example-site-with-javelin/</id>
    <summary>Javelin is a powerful static site generator that allows you to create fast, modern, and highly customizable websites with ease. With its intuitive…</summary>
    <content type="html">&lt;p&gt;Javelin is a powerful static site generator that allows you to create fast, modern, and highly customizable websites with ease. With its intuitive syntax, flexible templating system, and extensive plugin ecosystem, Javelin empowers developers to build beautiful and feature-rich websites quickly and efficiently. In this comprehensive guide, we&#39;ll walk you through the process of creating an example site with Javelin, covering everything from installation to deployment and beyond.&lt;/p&gt;
&lt;h2&gt;Introduction to Javelin&lt;/h2&gt;
&lt;p&gt;Javelin is a static site generator built with simplicity and performance in mind. It uses Markdown for content authoring and provides a powerful templating system based on Handlebars.js for building dynamic and reusable layouts. Javelin&#39;s modular architecture and plugin system make it easy to extend and customize, allowing developers to tailor their websites to meet specific requirements.&lt;/p&gt;
&lt;p&gt;Key features of Javelin include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Markdown Support&lt;/strong&gt;: Write content in Markdown format, allowing for easy authoring and formatting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Handlebars Templating&lt;/strong&gt;: Use Handlebars.js templates to create dynamic layouts and reusable components.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Live Reload&lt;/strong&gt;: Preview changes in real-time with Javelin&#39;s built-in live reload feature.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asset Pipeline&lt;/strong&gt;: Manage assets such as CSS, JavaScript, and images with Javelin&#39;s asset pipeline.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extensible Plugin System&lt;/strong&gt;: Extend Javelin&#39;s functionality with plugins for additional features and integrations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, let&#39;s dive into the process of building an example site with Javelin.&lt;/p&gt;
&lt;h2&gt;Setting Up Your Environment&lt;/h2&gt;
&lt;p&gt;Before we can start building our example site with Javelin, we need to set up our development environment. Here&#39;s what you&#39;ll need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Node.js and npm&lt;/strong&gt;: Javelin is built with Node.js, so make sure you have Node.js and npm installed on your system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text Editor or IDE&lt;/strong&gt;: Choose a text editor or integrated development environment (IDE) for writing code. Popular options include Visual Studio Code, Sublime Text, and Atom.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Terminal&lt;/strong&gt;: You&#39;ll need a terminal or command prompt to run commands and interact with Javelin.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once you have the necessary tools installed, you&#39;re ready to create your example site with Javelin.&lt;/p&gt;
&lt;h2&gt;Creating a New Javelin Project&lt;/h2&gt;
&lt;p&gt;To create a new Javelin project, use the Javelin CLI (Command Line Interface) to initialize a new project directory. Open your terminal and run the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npx javelin-cli init my-example-site&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command will create a new directory named &lt;code&gt;my-example-site&lt;/code&gt; and initialize a new Javelin project inside it. Follow the prompts to configure your project settings, such as the site name, author name, and default layout.&lt;/p&gt;
&lt;h2&gt;Writing Content with Markdown&lt;/h2&gt;
&lt;p&gt;With your Javelin project initialized, you can start writing content for your example site using Markdown. Create a new Markdown file inside the &lt;code&gt;content&lt;/code&gt; directory to represent each page of your site. For example, you might create a &lt;code&gt;home.md&lt;/code&gt; file for the homepage and additional files for other pages such as &lt;code&gt;about.md&lt;/code&gt;, &lt;code&gt;blog.md&lt;/code&gt;, and &lt;code&gt;contact.md&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here&#39;s an example of a basic Markdown file for the homepage:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;---
title: Home
---

# Welcome to My Example Site!

This is the homepage of my example site. Feel free to explore and learn more about what we have to offer.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Javelin uses front matter (YAML or JSON metadata at the top of each Markdown file) to define metadata such as the page title, layout, and any custom variables or options.&lt;/p&gt;
&lt;h2&gt;Creating Layouts with Handlebars&lt;/h2&gt;
&lt;p&gt;Next, let&#39;s create a layout template using Handlebars.js to define the structure and styling of our example site. Layouts are reusable templates that define the overall structure of a web page, including common elements such as headers, footers, and navigation menus.&lt;/p&gt;
&lt;p&gt;Create a new file named &lt;code&gt;default.hbs&lt;/code&gt; inside the &lt;code&gt;layouts&lt;/code&gt; directory to serve as the default layout template for your example site. Here&#39;s a simple example of a default layout template:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang=&quot;en&quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&quot;UTF-8&quot;&amp;gt;
    &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&amp;gt;
    &amp;lt;title&amp;gt;{{title}}&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;header&amp;gt;
        &amp;lt;h1&amp;gt;{{title}}&amp;lt;/h1&amp;gt;
        &amp;lt;nav&amp;gt;
            &amp;lt;ul&amp;gt;
                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/about&quot;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/blog&quot;&amp;gt;Blog&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
                &amp;lt;li&amp;gt;&amp;lt;a href=&quot;/contact&quot;&amp;gt;Contact&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;/ul&amp;gt;
        &amp;lt;/nav&amp;gt;
    &amp;lt;/header&amp;gt;
    &amp;lt;main&amp;gt;
        {{{body}}}
    &amp;lt;/main&amp;gt;
    &amp;lt;footer&amp;gt;
        &amp;amp;copy; {{year}} {{author}}
    &amp;lt;/footer&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this layout template, we use Handlebars expressions &lt;code&gt;{{title}}&lt;/code&gt;, &lt;code&gt;{{body}}&lt;/code&gt;, &lt;code&gt;{{year}}&lt;/code&gt;, and &lt;code&gt;{{author}}&lt;/code&gt; to dynamically insert content and metadata into the HTML structure. The &lt;code&gt;{{{body}}}&lt;/code&gt; expression is a Handlebars &quot;triple-stash&quot; that renders the actual content of each page.&lt;/p&gt;
&lt;h2&gt;Styling with CSS&lt;/h2&gt;
&lt;p&gt;With our content and layout in place, let&#39;s add some styling to our example site using CSS. Create a new CSS file named &lt;code&gt;styles.css&lt;/code&gt; inside the &lt;code&gt;assets/css&lt;/code&gt; directory to define the styles for your site.&lt;/p&gt;
&lt;p&gt;Here&#39;s a basic example of a CSS file to style our example site:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* styles.css */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 1rem;
}

main {
    padding: 2rem;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Feel free to customize the styles according to your preferences and design requirements.&lt;/p&gt;
&lt;h2&gt;Building and Previewing Your Site&lt;/h2&gt;
&lt;p&gt;Now that we have our content, layout, and styling in place, let&#39;s build our example site with Javelin and preview it in the browser. Open your terminal and navigate to your project directory, then run the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npx javelin-cli build&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command will compile your Markdown content, apply your layout templates, and generate a static HTML site in the &lt;code&gt;dist&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;To preview your site locally, you can use Javelin&#39;s built-in development server. Run the following command in your terminal:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;
npx javelin-cli serve&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command will start a local web server and open your site in your default web browser. You can now navigate to &lt;code&gt;http://localhost:3000&lt;/code&gt; to view your example site.&lt;/p&gt;
&lt;h2&gt;Customizing and Extending Your Site&lt;/h2&gt;
&lt;p&gt;Now that you have a basic example site up and running with Javelin, the possibilities for customization and extension are endless. Here are a few ideas to further customize and extend your example site:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Add Additional Pages&lt;/strong&gt;: Create additional Markdown files for different sections or pages of your site.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrate Plugins&lt;/strong&gt;: Explore Javelin&#39;s plugin ecosystem to add features such as syntax highlighting, SEO optimization, or analytics tracking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customize Layouts&lt;/strong&gt;: Experiment with different layout templates and styles to give your site a unique look and feel.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimize Performance&lt;/strong&gt;: Optimize your site for performance by minifying CSS and JavaScript, optimizing images, and leveraging caching techniques.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Deploying Your Site&lt;/h2&gt;
&lt;p&gt;Once you&#39;re satisfied with your example site, it&#39;s time to deploy it to a web server so that others can access it. There are many ways to deploy a static site like the one we&#39;ve created with Javelin, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Manual Deployment&lt;/strong&gt;: Upload the contents of the &lt;code&gt;dist&lt;/code&gt; directory to a web server using FTP or a file manager.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CI/CD Pipeline&lt;/strong&gt;: Set up a continuous integration and continuous deployment (CI/CD) pipeline to automate the deployment process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Static Site Hosting&lt;/strong&gt;: Use a static site hosting service such as Netlify, Vercel, or GitHub Pages to deploy your site with ease.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Choose the deployment method that best suits your needs and preferences, and share your example site with the world!&lt;/p&gt;
&lt;h2&gt;Exporting Your Site as Jar&lt;/h2&gt;
&lt;p&gt;To export your example Javelin site as a JAR (Java Archive) file, you can use Javelin&#39;s built-in functionality to package your static site into a self-contained executable JAR file. This allows you to distribute your site as a single file that can be run on any system with Java installed. Here&#39;s how you can do it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Build Your Javelin Site&lt;/strong&gt;: First, ensure that you have built your Javelin site using the &lt;code&gt;javelin-cli build&lt;/code&gt; command. This command generates the static HTML files for your site in the &lt;code&gt;dist&lt;/code&gt; directory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create a Manifest File&lt;/strong&gt;: In order to package your site as a JAR file, you need to create a manifest file (&lt;code&gt;manifest.txt&lt;/code&gt;) that specifies the main class to be executed when the JAR file is run. Create a file named &lt;code&gt;manifest.txt&lt;/code&gt; in your project directory with the following content:
&lt;pre&gt;&lt;code&gt;Main-Class: com.example.Main&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &lt;code&gt;com.example.Main&lt;/code&gt; with the fully qualified name of the main class for your Javelin site. This class should contain the &lt;code&gt;main&lt;/code&gt; method that initializes and runs your Javelin site.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Package Your Site as a JAR File&lt;/strong&gt;: Once you have created the manifest file, you can use the &lt;code&gt;jar&lt;/code&gt; command provided by the Java Development Kit (JDK) to package your site into a JAR file. Open a terminal or command prompt, navigate to your project directory, and run the following command:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;jar cfm my-site.jar manifest.txt -C dist .&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command creates a JAR file named &lt;code&gt;my-site.jar&lt;/code&gt; using the manifest file &lt;code&gt;manifest.txt&lt;/code&gt; and includes all the files and directories in the &lt;code&gt;dist&lt;/code&gt; directory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test Your JAR File&lt;/strong&gt;: Once the JAR file is created, you can test it by running it with the &lt;code&gt;java&lt;/code&gt; command. Navigate to the directory containing the JAR file in your terminal or command prompt, and run the following command:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;java -jar my-site.jar&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command will execute the JAR file, launching your Javelin site in a local web server. You can then access your site by navigating to &lt;code&gt;http://localhost:3000&lt;/code&gt; in your web browser.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Distribute Your JAR File&lt;/strong&gt;: Finally, once you have tested your JAR file and verified that your site is working correctly, you can distribute the JAR file to others. They can run your site on their own systems by simply executing the JAR file with the &lt;code&gt;java -jar&lt;/code&gt; command.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By following these steps, you can export your example Javelin site as a JAR file and distribute it as a self-contained executable, making it easy for others to run your site locally without having to set up a web server or install additional dependencies.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this comprehensive guide, we&#39;ve covered everything you need to know to create an example site with Javelin. From setting up your development environment to writing content, creating layouts, styling with CSS, and deploying your site, you now have the knowledge and tools to build beautiful and functional websites with Javelin.&lt;/p&gt;
&lt;p&gt;Whether you&#39;re building a personal blog, portfolio, documentation site, or e-commerce store, Javelin provides the flexibility and power you need to bring your vision to life. With its intuitive syntax, powerful templating system, and extensive plugin ecosystem, Javelin empowers you to create modern and highly customizable websites quickly and efficiently.&lt;/p&gt;
&lt;p&gt;So why wait? Start building your next project with Javelin today and unleash your creativity on the web!&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Mastering Vim: A Comprehensive Guide to Efficient Text Editing</title>
    <link href="https://www.knowledgebasement.com/mastering-vim-a-comprehensive-guide/" rel="alternate" type="text/html" title="Mastering Vim: A Comprehensive Guide to Efficient Text Editing"/>
    <published>2024-02-15T03:39:26Z</published>
    <updated>2024-02-15T03:39:26Z</updated>
    <id>https://www.knowledgebasement.com/mastering-vim-a-comprehensive-guide/</id>
    <summary>Vim, short for Vi IMproved, is a powerful and highly customizable text editor that has been a favorite among developers, sysadmins, and power users for…</summary>
    <content type="html">&lt;p&gt;Vim, short for Vi IMproved, is a powerful and highly customizable text editor that has been a favorite among developers, sysadmins, and power users for decades. Known for its efficiency, extensibility, and versatility, Vim offers a plethora of features and commands for editing text files with speed and precision. In this comprehensive guide, we&#39;ll explore everything you need to know to use Vim efficiently, from basic navigation to advanced customization and productivity tips.&lt;/p&gt;
&lt;h2&gt;Introduction to Vim&lt;/h2&gt;
&lt;p&gt;Vim is a modal text editor, meaning it operates in different modes for performing various tasks. The three primary modes in Vim are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Normal Mode&lt;/strong&gt;: Used for navigation, editing commands, and manipulation of text.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Insert Mode&lt;/strong&gt;: Used for inserting and editing text.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visual Mode&lt;/strong&gt;: Used for selecting and manipulating blocks of text.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Understanding these modes and how to switch between them is fundamental to using Vim efficiently.&lt;/p&gt;
&lt;h2&gt;Getting Started with Vim&lt;/h2&gt;
&lt;p&gt;Before diving into advanced Vim usage, let&#39;s start with the basics of installing Vim and launching it in a terminal.&lt;/p&gt;
&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;Vim is pre-installed on many Unix-like operating systems. However, if it&#39;s not available, you can install it using your system&#39;s package manager.&lt;/p&gt;
&lt;p&gt;On Debian/Ubuntu:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt-get install vim&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On CentOS/RHEL:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo yum install vim&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Launching Vim&lt;/h3&gt;
&lt;p&gt;To launch Vim, open a terminal and type &lt;code&gt;vim&lt;/code&gt;, followed by the name of the file you want to edit.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;vim filename.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Basic Vim Navigation&lt;/h2&gt;
&lt;h3&gt;Moving the Cursor&lt;/h3&gt;
&lt;p&gt;In Vim&#39;s Normal mode, you can move the cursor using various key bindings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;h&lt;/strong&gt;: Move left&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;j&lt;/strong&gt;: Move down&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;k&lt;/strong&gt;: Move up&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;l&lt;/strong&gt;: Move right&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Jumping Within a File&lt;/h3&gt;
&lt;p&gt;Vim provides shortcuts for jumping within a file quickly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;gg&lt;/strong&gt;: Move to the beginning of the file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;G&lt;/strong&gt;: Move to the end of the file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;gg&lt;/strong&gt;: Move to a specific line number&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ctrl + u&lt;/strong&gt;: Move half a page up&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ctrl + d&lt;/strong&gt;: Move half a page down&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Editing Text in Vim&lt;/h2&gt;
&lt;h3&gt;Entering Insert Mode&lt;/h3&gt;
&lt;p&gt;To start typing or editing text, you need to switch to Insert mode. You can do this by pressing &lt;code&gt;i&lt;/code&gt; in Normal mode.&lt;/p&gt;
&lt;h3&gt;Making Changes&lt;/h3&gt;
&lt;p&gt;While in Insert mode, you can type and edit text as you would in any other text editor. Press &lt;code&gt;Esc&lt;/code&gt; to return to Normal mode when you&#39;re done.&lt;/p&gt;
&lt;h3&gt;Undo and Redo&lt;/h3&gt;
&lt;p&gt;Vim allows you to undo and redo changes easily:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;u&lt;/strong&gt;: Undo the last change&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ctrl + r&lt;/strong&gt;: Redo the last change&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Copy, Cut, and Paste&lt;/h3&gt;
&lt;p&gt;Vim provides commands for copying, cutting, and pasting text:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;yy&lt;/strong&gt;: Copy (yank) the current line&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;dd&lt;/strong&gt;: Cut (delete) the current line&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;p&lt;/strong&gt;: Paste the contents of the clipboard after the cursor&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;P&lt;/strong&gt;: Paste the contents of the clipboard before the cursor&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Advanced Vim Features&lt;/h2&gt;
&lt;h3&gt;Searching and Substituting&lt;/h3&gt;
&lt;p&gt;Vim offers powerful search and replace capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;/pattern&lt;/strong&gt;: Search for a pattern within the file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;:s/pattern/replacement/g&lt;/strong&gt;: Replace all occurrences of a pattern with a replacement&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Split Windows&lt;/h3&gt;
&lt;p&gt;You can split the Vim window into multiple panes for editing different parts of the same file or different files simultaneously:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;:vsp&lt;/strong&gt;: Split the window vertically&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;:sp&lt;/strong&gt;: Split the window horizontally&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Macros&lt;/h3&gt;
&lt;p&gt;Vim allows you to record and playback macros, which are sequences of commands:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;q&lt;/strong&gt;: Start recording a macro into the specified register&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;@&lt;/strong&gt;: Playback the macro stored in the specified register&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Customizing Vim&lt;/h2&gt;
&lt;h3&gt;Vim Configuration File&lt;/h3&gt;
&lt;p&gt;Vim can be extensively customized using a configuration file called &lt;code&gt;.vimrc&lt;/code&gt;. This file allows you to set options, define key mappings, and configure plugins to tailor Vim to your preferences.&lt;/p&gt;
&lt;h3&gt;Plugins and Extensions&lt;/h3&gt;
&lt;p&gt;Vim&#39;s functionality can be extended through plugins and extensions. There are thousands of plugins available for various purposes, including syntax highlighting, code completion, and version control integration. Popular plugin managers like Vundle and Pathogen make it easy to install and manage Vim plugins.&lt;/p&gt;
&lt;h2&gt;Vim Productivity Tips&lt;/h2&gt;
&lt;h3&gt;Use Abbreviations&lt;/h3&gt;
&lt;p&gt;Vim allows you to define abbreviations for frequently used words or phrases:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-vim&quot;&gt;:iab btw by the way&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Learn Regular Expressions&lt;/h3&gt;
&lt;p&gt;Regular expressions are a powerful tool for searching and manipulating text. Familiarize yourself with basic regular expressions to take full advantage of Vim&#39;s search and substitution capabilities.&lt;/p&gt;
&lt;h3&gt;Practice Efficient Navigation&lt;/h3&gt;
&lt;p&gt;Mastering Vim&#39;s navigation commands can significantly improve your productivity. Practice using motions, jumps, and shortcuts to move quickly within files.&lt;/p&gt;
&lt;h3&gt;Embrace Vim&#39;s Philosophy&lt;/h3&gt;
&lt;p&gt;Vim&#39;s modal editing paradigm may feel unfamiliar at first, but embracing it can lead to significant productivity gains over time. Focus on mastering Vim&#39;s commands and modes to become more efficient at text editing.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Vim is much more than just a text editor—it&#39;s a powerful tool for editing and manipulating text efficiently. By mastering Vim&#39;s modes, commands, and features, you can streamline your workflow, increase productivity, and become a more effective text editor.&lt;/p&gt;
&lt;p&gt;In this guide, we&#39;ve covered the&lt;/p&gt;
&lt;p&gt;basics of Vim navigation and editing, explored advanced features like searching and splitting windows, and discussed tips for customizing Vim to suit your preferences. Whether you&#39;re a beginner or an experienced Vim user, there&#39;s always more to learn and discover about this versatile text editor. With practice and dedication, you can harness the full potential of Vim and take your text editing skills to the next level.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Mastering Text Processing in Linux Command Line</title>
    <link href="https://www.knowledgebasement.com/mastering-text-processing-in-linux-command-line/" rel="alternate" type="text/html" title="Mastering Text Processing in Linux Command Line"/>
    <published>2024-02-15T03:37:00Z</published>
    <updated>2024-02-15T03:37:00Z</updated>
    <id>https://www.knowledgebasement.com/mastering-text-processing-in-linux-command-line/</id>
    <summary>In the realm of system administration, data analysis, and software development, the Linux command line is a powerful tool for text processing. With a…</summary>
    <content type="html">&lt;p&gt;In the realm of system administration, data analysis, and software development, the Linux command line is a powerful tool for text processing. With a wide array of utilities and commands at your disposal, you can manipulate, analyze, and transform text data with ease and efficiency. Whether you&#39;re parsing log files, extracting information from documents, or processing structured data, mastering text processing in the Linux command line is essential for productivity and automation. In this comprehensive guide, we&#39;ll explore various techniques, commands, and best practices for harnessing the full potential of the Linux command line for text processing tasks.&lt;/p&gt;
&lt;h2&gt;Introduction to Text Processing in Linux Command Line&lt;/h2&gt;
&lt;p&gt;Text processing involves manipulating and transforming text data to extract information, perform analysis, or generate output in a desired format. The Linux command line provides a rich set of tools and utilities for performing text processing tasks efficiently and effectively. Some common scenarios where text processing is useful include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data Extraction&lt;/strong&gt;: Extracting specific fields or information from structured or unstructured text data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Transformation&lt;/strong&gt;: Converting text data from one format to another, such as CSV to JSON or XML to YAML.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Filtering&lt;/strong&gt;: Filtering text data based on specific criteria or patterns, such as grep or awk.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Aggregation&lt;/strong&gt;: Aggregating and summarizing text data, such as counting occurrences or calculating statistics.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By leveraging the command line tools and utilities available in Linux, you can streamline text processing workflows, automate repetitive tasks, and handle large volumes of data with ease.&lt;/p&gt;
&lt;h2&gt;Essential Command Line Utilities for Text Processing&lt;/h2&gt;
&lt;p&gt;The Linux command line offers a plethora of utilities and commands for text processing, each with its own set of features and capabilities. Here are some essential command line utilities commonly used for text processing:&lt;/p&gt;
&lt;h3&gt;1. &lt;strong&gt;grep&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;grep&lt;/code&gt; is a versatile command-line utility for searching text patterns in files or input streams. It allows you to search for specific patterns or regular expressions within text data and print matching lines to the output.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;grep &quot;error&quot; logfile.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. &lt;strong&gt;sed&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;sed&lt;/code&gt; (stream editor) is a powerful text processing utility for performing text transformations, substitutions, and editing operations on input streams or files. It supports a range of commands for manipulating text data based on patterns or expressions.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sed &#39;s/old/new/g&#39; input.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. &lt;strong&gt;awk&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;awk&lt;/code&gt; is a versatile text processing language that allows you to perform pattern scanning and processing of text data. It enables you to define rules or patterns for selecting and processing specific fields or columns in text data.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;awk &#39;{print $1}&#39; data.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;4. &lt;strong&gt;cut&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;cut&lt;/code&gt; is a command-line utility for extracting specific columns or fields from text data based on delimiter characters. It allows you to select and extract columns from input data and print them to the output.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;cut -d&quot;,&quot; -f1,2 data.csv&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;5. &lt;strong&gt;sort&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;sort&lt;/code&gt; is a command-line utility for sorting text data alphabetically or numerically. It allows you to sort lines of text data based on specific fields or columns, ascending or descending order.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sort -k2,2 -n data.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;6. &lt;strong&gt;uniq&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;uniq&lt;/code&gt; is a command-line utility for identifying and removing duplicate lines from sorted text data. It allows you to identify unique lines or consecutive duplicate lines in text data.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;uniq -c data.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;7. &lt;strong&gt;awk&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;awk&lt;/code&gt; is a powerful text processing language that allows you to perform pattern scanning and processing of text data. It enables you to define rules or patterns for selecting and processing specific fields or columns in text data.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;awk &#39;{print $1}&#39; data.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;8. &lt;strong&gt;tr&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;tr&lt;/code&gt; (translate) is a command-line utility for translating or deleting characters in text data. It allows you to replace or remove specific characters or character sets in input data.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;tr &#39;[:lower:]&#39; &#39;[:upper:]&#39; &amp;lt; input.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;9. &lt;strong&gt;paste&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;paste&lt;/code&gt; is a command-line utility for merging lines of text data from multiple files or input streams. It allows you to concatenate corresponding lines from different files horizontally.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;paste file1.txt file2.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;10. &lt;strong&gt;awk&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;awk&lt;/code&gt; is a versatile text processing language that allows you to perform pattern scanning and processing of text data. It enables you to define rules or patterns for selecting and processing specific fields or columns in text data.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;awk &#39;{print $1}&#39; data.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Advanced Text Processing Techniques&lt;/h2&gt;
&lt;p&gt;Beyond the basic text processing utilities, the Linux command line offers advanced techniques and strategies for handling complex text processing tasks. Here are some advanced text processing techniques and commands:&lt;/p&gt;
&lt;h3&gt;1. Regular Expressions&lt;/h3&gt;
&lt;p&gt;Regular expressions (regex) are powerful patterns used for matching and manipulating text data. They allow you to define complex search patterns for identifying specific text patterns or structures within input data.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;grep -E &#39;[0-9]{3}-[0-9]{2}-[0-9]{4}&#39; file.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. Pipeline and Redirection&lt;/h3&gt;
&lt;p&gt;Pipelines (&lt;code&gt;|&lt;/code&gt;) and redirection (&lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;) are fundamental concepts in the Linux command line for combining multiple commands, redirecting input and output streams, and chaining commands together to perform complex text processing operations.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;grep &quot;error&quot; logfile.txt | awk &#39;{print $2}&#39; &amp;gt; errors.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. Text Processing with Perl and Python&lt;/h3&gt;
&lt;p&gt;Perl and Python are powerful scripting languages commonly used for text processing and manipulation. They offer rich libraries and modules for handling text data, parsing structured formats, and performing advanced text processing operations.&lt;/p&gt;
&lt;p&gt;Example (Perl):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-perl&quot;&gt;perl -ne &#39;print if /pattern/&#39; file.txt&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example (Python):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;python -c &quot;import sys,re;[print(l) for l in sys.stdin if re.search(&#39;pattern&#39;,l)]&quot; &amp;lt; file.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;4. Text Processing with Regular Expressions&lt;/h3&gt;
&lt;p&gt;Regular expressions (regex) are powerful patterns used for matching and manipulating text data. They allow you to define complex search patterns for identifying specific text patterns or structures within input data.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;grep -E &#39;[0-9]{3}-[0-9]{2}-[0-9]{4}&#39; file.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;5. Text Processing with AWK&lt;/h3&gt;
&lt;p&gt;AWK is a versatile text processing language that allows you to perform pattern scanning and processing of text data. It enables you to define rules or patterns for selecting and processing specific fields or columns in text data.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;awk &#39;{print $1}&#39; data.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;6. Text Processing with Perl and Python&lt;/h3&gt;
&lt;p&gt;Perl and Python are powerful scripting languages commonly used for text processing and manipulation. They offer rich libraries and modules for handling text data, parsing structured formats, and performing advanced text processing operations.&lt;/p&gt;
&lt;p&gt;Example (Perl):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-perl&quot;&gt;perl -ne &#39;print if /pattern/&#39; file.txt&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example (Python):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;python -c &quot;import sys,re;[print(l) for l in sys.stdin if re.search

(&#39;pattern&#39;,l)]&quot; &amp;lt; file.txt&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Best Practices for Text Processing in Linux Command Line&lt;/h2&gt;
&lt;p&gt;To maximize efficiency and productivity when performing text processing tasks in the Linux command line, it&#39;s essential to follow best practices and guidelines. Here are some best practices for text processing in the Linux command line:&lt;/p&gt;
&lt;h3&gt;1. Use the Right Tool for the Job&lt;/h3&gt;
&lt;p&gt;Choose the appropriate command-line utility or tool based on the specific text processing task you need to perform. Each command has its strengths and capabilities, so familiarize yourself with the available options and use the most suitable tool for the task at hand.&lt;/p&gt;
&lt;h3&gt;2. Leverage Regular Expressions&lt;/h3&gt;
&lt;p&gt;Regular expressions are a powerful tool for pattern matching and manipulation in text data. Invest time in learning and mastering regular expressions, as they can significantly enhance your text processing capabilities and productivity.&lt;/p&gt;
&lt;h3&gt;3. Break Down Complex Tasks&lt;/h3&gt;
&lt;p&gt;Break down complex text processing tasks into smaller, manageable steps or commands. Use pipelines and chaining to combine multiple commands and operations together, gradually building up the desired output or result.&lt;/p&gt;
&lt;h3&gt;4. Practice Iteratively&lt;/h3&gt;
&lt;p&gt;Iterate and refine your text processing commands and scripts iteratively. Start with simple commands and gradually add complexity as needed, testing and validating each step along the way to ensure correctness and accuracy.&lt;/p&gt;
&lt;h3&gt;5. Use Version Control&lt;/h3&gt;
&lt;p&gt;Version control systems such as Git are invaluable tools for managing and tracking changes to your text processing scripts and commands. Use version control to keep track of revisions, collaborate with others, and revert changes if needed.&lt;/p&gt;
&lt;h3&gt;6. Document and Comment&lt;/h3&gt;
&lt;p&gt;Document your text processing commands and scripts thoroughly, including explanations, comments, and annotations where necessary. Clear documentation helps improve readability, maintainability, and understandability of your text processing workflows.&lt;/p&gt;
&lt;h3&gt;7. Automate and Script&lt;/h3&gt;
&lt;p&gt;Whenever possible, automate repetitive text processing tasks using scripts, shell functions, or automation tools. By automating common tasks, you can save time and effort, reduce errors, and increase productivity in your text processing workflows.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Mastering text processing in the Linux command line is a valuable skill for sysadmins, developers, data analysts, and anyone who works with text data regularly. By leveraging the rich set of utilities, commands, and techniques available in the Linux command line, you can manipulate, analyze, and transform text data with precision and efficiency.&lt;/p&gt;
&lt;p&gt;In this comprehensive guide, we&#39;ve explored essential command-line utilities, advanced text processing techniques, and best practices for maximizing productivity and effectiveness in text processing tasks. Whether you&#39;re parsing log files, extracting information from documents, or processing structured data, the Linux command line provides the tools and capabilities you need to handle text processing tasks with confidence and proficiency. With practice, experimentation, and continuous learning, you can become a master of text processing in the Linux command line, unlocking new possibilities for automation, analysis, and insight in your work.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Setting Up a Chat Server with ejabberd</title>
    <link href="https://www.knowledgebasement.com/setting-up-a-chat-server-with-ejabberd/" rel="alternate" type="text/html" title="Setting Up a Chat Server with ejabberd"/>
    <published>2024-02-14T18:10:01Z</published>
    <updated>2024-02-14T18:10:01Z</updated>
    <id>https://www.knowledgebasement.com/setting-up-a-chat-server-with-ejabberd/</id>
    <summary>In today&#39;s interconnected world, instant messaging and real-time communication have become integral parts of both personal and professional interactions.…</summary>
    <content type="html">&lt;p&gt;In today&#39;s interconnected world, instant messaging and real-time communication have become integral parts of both personal and professional interactions. Whether it&#39;s team collaboration, customer support, or social networking, having a reliable chat server is essential for facilitating seamless communication. One such powerful and versatile chat server solution is ejabberd. In this comprehensive guide, we&#39;ll explore the process of setting up a chat server using ejabberd, covering installation, configuration, and advanced customization options.&lt;/p&gt;
&lt;h2&gt;Introduction to ejabberd&lt;/h2&gt;
&lt;p&gt;ejabberd is an open-source XMPP (Extensible Messaging and Presence Protocol) server written in Erlang. XMPP is a widely adopted communication protocol designed for real-time messaging, presence information, and online collaboration. ejabberd, known for its scalability, reliability, and extensibility, is used by organizations of all sizes, from small businesses to large enterprises, to power their instant messaging and chat applications.&lt;/p&gt;
&lt;p&gt;Key features of ejabberd include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: ejabberd is designed to handle large numbers of concurrent connections and users, making it suitable for deployment in high-traffic environments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clustering&lt;/strong&gt;: ejabberd supports clustering, allowing multiple ejabberd nodes to work together as a single logical entity, distributing load and ensuring fault tolerance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extensibility&lt;/strong&gt;: ejabberd provides a modular architecture with support for plugins and extensions, enabling developers to customize and extend its functionality to meet specific requirements.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;: ejabberd includes built-in support for encryption, authentication, and access control, ensuring secure communication and protecting sensitive data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cross-platform&lt;/strong&gt;: ejabberd is compatible with various operating systems, including Linux, macOS, and Windows, making it accessible to a wide range of users and organizations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installation of ejabberd&lt;/h2&gt;
&lt;p&gt;Setting up a chat server with ejabberd is a straightforward process, thanks to its easy-to-use installation process and comprehensive documentation. In this section, we&#39;ll walk through the steps to install ejabberd on a Linux-based server.&lt;/p&gt;
&lt;h3&gt;Prerequisites:&lt;/h3&gt;
&lt;p&gt;Before installing ejabberd, make sure you have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A server running a supported Linux distribution such as Ubuntu, Debian, CentOS, or Red Hat Enterprise Linux.&lt;/li&gt;
&lt;li&gt;Root or sudo privileges to install packages and modify system configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Installation Steps:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Update Package Repository&lt;/strong&gt;:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt update&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install ejabberd&lt;/strong&gt;:
&lt;p&gt;On Debian/Ubuntu:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt install ejabberd&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On CentOS/RHEL:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo yum install ejabberd&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Start ejabberd Service&lt;/strong&gt;:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo systemctl start ejabberd&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enable ejabberd Service to Start on Boot&lt;/strong&gt;:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo systemctl enable ejabberd&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verify ejabberd Status&lt;/strong&gt;:
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo systemctl status ejabberd&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If ejabberd is running successfully, you should see an output indicating that the service is active and running.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Configuration of ejabberd&lt;/h2&gt;
&lt;p&gt;Once ejabberd is installed, the next step is to configure it according to your requirements. ejabberd provides a comprehensive configuration file where you can customize various aspects of the server, including domain settings, authentication methods, and access control.&lt;/p&gt;
&lt;h3&gt;Configuration File Location:&lt;/h3&gt;
&lt;p&gt;The main configuration file for ejabberd is typically located at &lt;code&gt;/etc/ejabberd/ejabberd.yml&lt;/code&gt;. You can edit this file using a text editor such as nano or vim.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo nano /etc/ejabberd/ejabberd.yml&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Basic Configuration:&lt;/h3&gt;
&lt;p&gt;Here are some essential configuration options to get started with ejabberd:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hostname&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;hosts:
- &quot;example.com&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Admin User&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;admins:
- &quot;admin@example.com&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Authentication Method&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;auth_method: [internal]&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Database Backend&lt;/strong&gt; (optional, default is Mnesia):
&lt;pre&gt;&lt;code&gt;sql_type: mysql
sql_server: &quot;localhost&quot;
sql_database: &quot;ejabberd&quot;
sql_username: &quot;ejabberd&quot;
sql_password: &quot;password&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Module Configuration&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;modules:
mod_mam: {}
mod_ping: {}
mod_register:
  access_from: register@example.com&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Advanced Configuration:&lt;/h3&gt;
&lt;p&gt;For advanced customization and specific use cases, ejabberd offers a wide range of configuration options and modules. Some advanced configuration options include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Clustering&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;- net_ticktime: 60
cluster:
  - ejabberd@node1.example.com
  - ejabberd@node2.example.com&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTTP Bindings&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;listen:
- 
  port: 5280
  ip: &quot;::&quot;
  module: ejabberd_http&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Authentication Methods&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;auth_method:
- sql
- anonymous
- internal&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Access Control Lists (ACLs)&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;acl:
admin:
  user:
    - &quot;admin@example.com&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Message Archive Management (MAM)&lt;/strong&gt;:
&lt;pre&gt;&lt;code&gt;mod_mam:
db_type: sql&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Administration and Management&lt;/h2&gt;
&lt;p&gt;Once ejabberd is configured and running, you can manage and administer the server using various tools and interfaces provided by ejabberd.&lt;/p&gt;
&lt;h3&gt;Web Admin Interface:&lt;/h3&gt;
&lt;p&gt;ejabberd includes a web-based administration interface that allows you to manage users, configure modules, monitor server status, and view logs. The web admin interface is accessible via a web browser by navigating to &lt;code&gt;http://example.com:5280/admin&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Command-Line Tools:&lt;/h3&gt;
&lt;p&gt;ejabberd provides command-line tools for performing administrative tasks such as user management, module configuration, and server monitoring. Some useful command-line tools include &lt;code&gt;ejabberdctl&lt;/code&gt;, &lt;code&gt;ejabberdctl register&lt;/code&gt;, and &lt;code&gt;ejabberdctl status&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Logging and Monitoring:&lt;/h3&gt;
&lt;p&gt;ejabberd logs various events and activities to log files located in &lt;code&gt;/var/log/ejabberd/&lt;/code&gt;. You can monitor server logs in real-time using tools like &lt;code&gt;tail&lt;/code&gt; or view historical logs for troubleshooting and analysis.&lt;/p&gt;
&lt;h2&gt;Integration and Customization&lt;/h2&gt;
&lt;p&gt;One of the strengths of ejabberd is its extensibility and flexibility, allowing you to integrate it with other systems, customize its behavior, and extend its functionality to meet specific requirements.&lt;/p&gt;
&lt;h3&gt;Integration with External Systems:&lt;/h3&gt;
&lt;p&gt;ejabberd supports integration with external systems and services through various protocols and APIs. You can integrate ejabberd with LDAP/Active Directory for user authentication, configure external authentication backends, or implement custom authentication modules.&lt;/p&gt;
&lt;h3&gt;Customization with Modules and Plugins:&lt;/h3&gt;
&lt;p&gt;ejabberd&#39;s modular architecture allows you to customize its behavior and extend its functionality using plugins and modules. You can develop custom modules to add new features, modify existing modules to suit your needs, or install third-party plugins from the ejabberd community.&lt;/p&gt;
&lt;h3&gt;Integration with Chat Clients:&lt;/h3&gt;
&lt;p&gt;ejabberd is&lt;/p&gt;
&lt;p&gt;compatible with a wide range of XMPP-compliant chat clients, including desktop clients like Pidgin, Adium, and Gajim, as well as mobile clients like Conversations (Android) and ChatSecure (iOS). Users can connect to ejabberd using any XMPP-compatible client and communicate with other users on the server.&lt;/p&gt;
&lt;h2&gt;Security Considerations&lt;/h2&gt;
&lt;p&gt;Ensuring the security of your chat server is paramount to protecting sensitive information, preserving user privacy, and maintaining system integrity. ejabberd provides several security features and best practices to safeguard your chat infrastructure.&lt;/p&gt;
&lt;h3&gt;Encryption and Authentication:&lt;/h3&gt;
&lt;p&gt;Enable SSL/TLS encryption to secure communication between clients and the server, preventing eavesdropping and data interception. Configure strict certificate validation to ensure the authenticity of server certificates and protect against man-in-the-middle attacks.&lt;/p&gt;
&lt;h3&gt;Access Control and Authorization:&lt;/h3&gt;
&lt;p&gt;Implement access control policies to restrict access to sensitive server resources and services. Use ACLs (Access Control Lists) to control user permissions, limit administrative privileges, and enforce security policies based on user roles and groups.&lt;/p&gt;
&lt;h3&gt;User Authentication and Identity Verification:&lt;/h3&gt;
&lt;p&gt;Enforce strong authentication mechanisms to verify the identity of users and prevent unauthorized access to the server. Implement multi-factor authentication, password policies, and account lockout mechanisms to enhance security and protect against credential-based attacks.&lt;/p&gt;
&lt;h3&gt;Regular Updates and Patch Management:&lt;/h3&gt;
&lt;p&gt;Keep ejabberd and its dependencies up-to-date with the latest security patches and software updates. Regularly monitor security advisories, subscribe to security mailing lists, and apply patches promptly to mitigate known vulnerabilities and protect against emerging threats.&lt;/p&gt;
&lt;h3&gt;Network Security and Firewall Configuration:&lt;/h3&gt;
&lt;p&gt;Secure your chat server infrastructure by configuring firewalls, intrusion detection systems, and network segmentation to control traffic flows and prevent unauthorized access. Restrict inbound and outbound network traffic to essential services and ports, and implement network security best practices to minimize attack surface.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Setting up a chat server with ejabberd is a straightforward process that enables organizations to deploy a robust, scalable, and feature-rich messaging platform for internal communication, collaboration, and customer engagement. By following the steps outlined in this guide and adopting best practices for configuration, administration, and security, you can build a reliable and secure chat infrastructure to meet the communication needs of your organization.&lt;/p&gt;
&lt;p&gt;With ejabberd&#39;s flexibility, extensibility, and compatibility with industry-standard protocols, you can tailor your chat server to suit your specific requirements, integrate it with existing systems and services, and deliver a seamless and intuitive messaging experience to users across platforms and devices. Whether you&#39;re managing a small team or a large enterprise, ejabberd provides the tools and capabilities you need to create a modern and efficient chat environment that fosters collaboration, innovation, and productivity.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Understanding and Using Linux Memory Management</title>
    <link href="https://www.knowledgebasement.com/understanding-and-using-linux-memory-management/" rel="alternate" type="text/html" title="Understanding and Using Linux Memory Management"/>
    <published>2024-02-14T18:07:03Z</published>
    <updated>2024-02-14T18:07:03Z</updated>
    <id>https://www.knowledgebasement.com/understanding-and-using-linux-memory-management/</id>
    <summary>In the realm of operating systems, memory management is a fundamental aspect that directly impacts system performance, resource utilization, and overall…</summary>
    <content type="html">&lt;p&gt;In the realm of operating systems, memory management is a fundamental aspect that directly impacts system performance, resource utilization, and overall stability. Linux, being one of the most widely used operating systems, employs sophisticated memory management techniques to efficiently handle memory resources across various hardware configurations and workloads. In this comprehensive guide, we&#39;ll delve into the intricacies of Linux memory management, exploring its key components, mechanisms, and best practices for effective utilization.&lt;/p&gt;
&lt;h2&gt;Introduction to Memory Management&lt;/h2&gt;
&lt;p&gt;Memory management in Linux revolves around the efficient allocation, deallocation, and utilization of physical and virtual memory resources. It encompasses a range of tasks, including memory allocation for processes, memory protection to prevent unauthorized access, memory swapping to alleviate memory pressure, and caching to enhance performance.&lt;/p&gt;
&lt;p&gt;Understanding the key components of memory management is crucial for optimizing system performance and ensuring reliable operation.&lt;/p&gt;
&lt;h3&gt;Key Components of Memory Management:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Physical Memory&lt;/strong&gt;: Refers to the actual RAM (Random Access Memory) installed in the system. It serves as the primary storage medium for actively running processes and the operating system kernel.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Virtual Memory&lt;/strong&gt;: Provides an abstraction layer above physical memory, allowing the operating system to manage memory resources more flexibly. Virtual memory enables processes to access memory addresses that may not correspond directly to physical RAM, thus enabling efficient memory utilization.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Page Tables&lt;/strong&gt;: Maintain the mapping between virtual memory addresses used by processes and their corresponding physical memory locations. Page tables facilitate address translation and memory access control, ensuring that processes can access only their allocated memory regions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory Management Unit (MMU)&lt;/strong&gt;: A hardware component responsible for translating virtual memory addresses to physical addresses. The MMU works in conjunction with the operating system&#39;s memory management subsystem to perform address translation efficiently.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kernel Memory&lt;/strong&gt;: Refers to memory reserved for the operating system kernel&#39;s data structures, code, and runtime stack. Kernel memory is essential for maintaining system state and executing privileged operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User Space Memory&lt;/strong&gt;: Represents the memory allocated to user-space processes for program execution and data storage. User space memory is isolated from the kernel&#39;s memory space to prevent unauthorized access and ensure system stability.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Memory Allocation and Deallocation&lt;/h2&gt;
&lt;p&gt;Memory allocation and deallocation are fundamental operations performed by the operating system to manage memory resources efficiently. Linux employs various allocation strategies and mechanisms to fulfill process memory requirements while minimizing fragmentation and resource wastage.&lt;/p&gt;
&lt;h3&gt;Memory Allocation Strategies:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Contiguous Memory Allocation&lt;/strong&gt;: Involves allocating contiguous blocks of memory to processes, ensuring that memory addresses are consecutive and uninterrupted. Contiguous allocation is commonly used for kernel memory and large memory allocations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dynamic Memory Allocation&lt;/strong&gt;: Utilizes dynamic memory allocation techniques such as malloc(), calloc(), and realloc() to allocate memory resources to processes on-demand. Dynamic allocation allows for more efficient memory utilization by allocating memory in smaller chunks as needed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Page-Based Allocation&lt;/strong&gt;: Allocates memory in fixed-size units known as pages, typically ranging from 4KB to 64KB in size. Page-based allocation simplifies memory management by providing a uniform allocation granularity and facilitating efficient memory allocation and deallocation.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Memory Deallocation Mechanisms:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Explicit Deallocation&lt;/strong&gt;: Involves explicitly releasing memory resources using functions such as free() or delete(). Explicit deallocation allows processes to release memory when it&#39;s no longer needed, preventing memory leaks and improving resource utilization.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Garbage Collection&lt;/strong&gt;: Used in managed programming languages such as Java and Python, garbage collection automatically deallocates memory objects that are no longer reachable or in use. Garbage collection helps mitigate memory leaks and simplifies memory management for developers.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Memory Protection and Access Control&lt;/h2&gt;
&lt;p&gt;Memory protection is a critical aspect of memory management that ensures the integrity and security of system memory. Linux employs various mechanisms to enforce memory protection and access control, preventing unauthorized access to sensitive memory regions and ensuring process isolation.&lt;/p&gt;
&lt;h3&gt;Memory Protection Mechanisms:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Memory Segmentation&lt;/strong&gt;: Divides memory into distinct segments, each with its own access permissions and protection attributes. Memory segmentation enables fine-grained control over memory access and helps prevent buffer overflows and memory corruption vulnerabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory Paging&lt;/strong&gt;: Divides memory into fixed-size pages and assigns access permissions to each page individually. Memory paging allows the operating system to enforce memory protection at the page level, preventing unauthorized access and ensuring data integrity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Address Space Layout Randomization (ASLR)&lt;/strong&gt;: Randomizes the memory layout of processes, making it difficult for attackers to predict the memory addresses of system components and exploit memory-based vulnerabilities. ASLR enhances system security by introducing variability into memory addresses, mitigating the risk of memory-based attacks.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Access Control Mechanisms:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;User and Group Permissions&lt;/strong&gt;: Assigns read, write, and execute permissions to users and groups, controlling their access to system memory and resources. User and group permissions help enforce data confidentiality and prevent unauthorized access to sensitive information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filesystem Permissions&lt;/strong&gt;: Extends access control to filesystem objects such as files and directories, regulating processes&#39; ability to read from, write to, or execute files. Filesystem permissions complement memory protection mechanisms by restricting access to files containing sensitive data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Process Isolation&lt;/strong&gt;: Ensures that processes are isolated from one another and cannot interfere with each other&#39;s memory space. Process isolation prevents unauthorized access to memory regions allocated to other processes, enhancing system stability and security.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Memory Swapping and Virtual Memory Management&lt;/h2&gt;
&lt;p&gt;Memory swapping and virtual memory management are essential techniques used by the Linux kernel to manage memory resources effectively, especially in situations where physical memory becomes scarce or exhausted.&lt;/p&gt;
&lt;h3&gt;Memory Swapping:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Swap Space&lt;/strong&gt;: Reserves a portion of disk space as virtual memory extension, allowing the kernel to offload inactive memory pages from physical RAM to disk when memory pressure increases. Swap space serves as a temporary storage medium for swapped-out pages until they are needed again.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Swappiness&lt;/strong&gt;: Determines the kernel&#39;s tendency to swap memory pages to disk under memory pressure. Swappiness is a tunable parameter that controls the aggressiveness of swapping, with higher values indicating a greater willingness to swap and lower values favoring memory retention.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Swapping Policies&lt;/strong&gt;: Govern the kernel&#39;s decision-making process regarding which memory pages to swap out and when. Swapping policies consider factors such as page usage frequency, page residency, and system load to optimize memory utilization and minimize performance impact.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Virtual Memory Management:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Address Translation&lt;/strong&gt;: Translates virtual memory addresses used by processes into corresponding physical memory addresses using page tables and the MMU. Address translation enables processes to access memory locations regardless of their physical location, facilitating memory abstraction and virtualization.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Demand Paging&lt;/strong&gt;: Loads memory pages into physical RAM only when they are accessed by processes, rather than preloading entire programs or datasets into memory. Demand paging conserves memory resources by prioritizing the allocation of physical memory to actively used pages, improving overall system efficiency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory Overcommitment&lt;/strong&gt;: Allows the kernel to allocate more virtual memory to processes than the available physical memory, relying on memory paging and swapping to fulfill memory demands dynamically. Memory overcommitment enables efficient utilization of memory resources but requires careful monitoring to prevent excessive swapping and performance degradation.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Memory Caching and Performance Optimization&lt;/h2&gt;
&lt;p&gt;Memory caching plays a crucial role in optimizing system performance by storing frequently accessed data in memory buffers, thereby reducing disk I/O latency and improving application responsiveness. Linux employs various caching mechanisms to enhance performance and accelerate data access.&lt;/p&gt;
&lt;h3&gt;Caching Mechanisms:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Page Cache&lt;/strong&gt;: Caches disk blocks and filesystem metadata in memory to accelerate read and
&lt;p&gt;write operations and reduce disk I/O overhead. The page cache acts as a transparent buffer between the filesystem and physical storage devices, providing fast access to frequently accessed data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Buffer Cache&lt;/strong&gt;: Caches block-level data from storage devices such as hard drives and SSDs in memory to reduce disk I/O latency and improve throughput. The buffer cache maintains a copy of recently accessed data blocks in memory, minimizing the need for frequent disk accesses.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filesystem Caching&lt;/strong&gt;: Caches directory entries, file attributes, and directory structures in memory to accelerate filesystem operations such as file lookup and directory traversal. Filesystem caching enhances overall system responsiveness by reducing filesystem overhead and improving data access efficiency.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Cache Management:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Cache Coherency&lt;/strong&gt;: Ensures that cached data remains consistent with the underlying storage devices and reflects any changes made to the data. Cache coherency mechanisms synchronize cached data with the disk or filesystem to maintain data integrity and prevent data corruption.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cache Eviction Policies&lt;/strong&gt;: Determine which data to retain in the cache and which data to evict when the cache reaches its capacity limit. Cache eviction policies use algorithms such as Least Recently Used (LRU), Most Recently Used (MRU), and First In, First Out (FIFO) to prioritize cache entries based on their access patterns and relevance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cache Flush&lt;/strong&gt;: Flushes cached data from memory to disk or storage devices to ensure data durability and consistency. Cache flush operations are performed periodically or in response to specific events such as filesystem sync operations or disk write barriers.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Best Practices for Memory Management in Linux&lt;/h2&gt;
&lt;p&gt;Optimizing memory management in Linux requires a combination of best practices, performance tuning, and resource monitoring to ensure efficient resource utilization and system stability. By following these guidelines, administrators can optimize memory usage, improve system performance, and mitigate potential issues.&lt;/p&gt;
&lt;h3&gt;Best Practices:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Monitor Memory Usage&lt;/strong&gt;: Use system monitoring tools such as top, vmstat, and sar to monitor memory usage, swap activity, and system performance metrics. Regular monitoring helps identify memory bottlenecks, resource constraints, and performance anomalies proactively.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tune Swappiness&lt;/strong&gt;: Adjust the swappiness parameter based on workload characteristics, system requirements, and performance goals. Lower swappiness values prioritize memory retention and minimize swapping, while higher values favor aggressive swapping to reclaim memory under pressure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimize Memory Allocation&lt;/strong&gt;: Allocate memory resources judiciously and avoid overcommitting memory beyond available physical and swap space. Allocate memory based on workload requirements, application demands, and expected memory usage patterns to prevent excessive swapping and performance degradation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implement Memory Limits&lt;/strong&gt;: Set memory limits and constraints for individual processes using resource management tools such as cgroups, systemd, or Docker. Enforcing memory limits prevents runaway processes from consuming excessive memory and degrading system performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enable Transparent Huge Pages (THP)&lt;/strong&gt;: Use transparent huge pages to improve memory utilization and reduce memory fragmentation by merging contiguous memory pages into larger, more efficient pages. Enabling THP can enhance performance for memory-intensive workloads such as databases and virtualization.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimize Page Cache&lt;/strong&gt;: Tune filesystem parameters, block device settings, and I/O schedulers to optimize page cache behavior and enhance disk I/O performance. Adjust cache-related parameters such as read-ahead settings, cache size, and cache flush intervals for optimal performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor and Tune Caches&lt;/strong&gt;: Monitor cache utilization, cache hit rates, and cache efficiency metrics to identify opportunities for optimization. Tune cache parameters, eviction policies, and cache management algorithms to maximize cache effectiveness and minimize cache-related overhead.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use NUMA-aware Memory Allocation&lt;/strong&gt;: Enable NUMA (Non-Uniform Memory Access) awareness for memory allocation to optimize memory access patterns and minimize memory latency in NUMA architectures. Allocate memory from local memory nodes to reduce cross-node memory access overhead and improve performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regularly Update and Patch&lt;/strong&gt;: Keep the Linux kernel, system libraries, and memory management components up-to-date with the latest security patches and performance improvements. Regular updates address known vulnerabilities, bugs, and performance issues, ensuring system stability and reliability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Profile and Benchmark&lt;/strong&gt;: Profile memory usage, memory access patterns, and application behavior to identify potential optimization opportunities and performance bottlenecks. Use benchmarking tools and workload simulations to assess system performance under different conditions and configurations.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By following these best practices and adopting proactive memory management strategies, administrators can optimize memory utilization, enhance system performance, and ensure reliable operation of Linux-based systems across a wide range of workloads and environments.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Memory management is a critical aspect of modern operating systems, playing a vital role in system performance, resource utilization, and application responsiveness. Linux, with its robust memory management subsystem, offers a wide array of features, mechanisms, and tools for efficient memory allocation, protection, caching, and optimization.&lt;/p&gt;
&lt;p&gt;In this comprehensive guide, we&#39;ve explored the key components of Linux memory management, including virtual memory, memory protection, swapping, caching, and performance optimization techniques. By understanding these concepts and best practices, administrators can effectively manage memory resources, optimize system performance, and ensure the stability and reliability of Linux-based systems in diverse computing environments.&lt;/p&gt;
&lt;p&gt;With ongoing advancements in hardware, software, and workload demands, memory management will continue to evolve, presenting new challenges and opportunities for optimization. By staying informed, embracing best practices, and leveraging available tools and technologies, administrators can navigate the complexities of memory management and maximize the efficiency and performance of Linux systems in the digital age.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Configuring a Load Balancer with HAProxy: A Comprehensive Guide</title>
    <link href="https://www.knowledgebasement.com/configuring-a-load-balancer-with-haproxy-a-comp/" rel="alternate" type="text/html" title="Configuring a Load Balancer with HAProxy: A Comprehensive Guide"/>
    <published>2024-02-14T18:04:05Z</published>
    <updated>2024-02-14T18:04:05Z</updated>
    <id>https://www.knowledgebasement.com/configuring-a-load-balancer-with-haproxy-a-comp/</id>
    <summary>In today&#39;s fast-paced digital landscape, ensuring high availability and optimal performance of web applications is paramount. Load balancing plays a…</summary>
    <content type="html">&lt;p&gt;In today&#39;s fast-paced digital landscape, ensuring high availability and optimal performance of web applications is paramount. Load balancing plays a critical role in achieving these goals by distributing incoming traffic across multiple servers, thus preventing any single point of failure and improving overall system reliability. HAProxy, a powerful open-source load balancer, stands out as a popular choice due to its flexibility, efficiency, and extensive feature set. In this guide, we will delve into the intricacies of configuring HAProxy to set up a robust load balancing solution.&lt;/p&gt;
&lt;h2&gt;Understanding Load Balancing&lt;/h2&gt;
&lt;p&gt;Before we dive into the configuration of HAProxy, it&#39;s essential to grasp the fundamental concepts of load balancing. At its core, load balancing involves distributing incoming network traffic across multiple servers, often referred to as backend servers or nodes. This distribution aims to optimize resource utilization, maximize throughput, minimize response time, and ensure high availability by eliminating single points of failure.&lt;/p&gt;
&lt;p&gt;Load balancers typically operate at the application layer (Layer 7) or transport layer (Layer 4) of the OSI model. Layer 7 load balancers are application-aware, capable of making routing decisions based on application-specific data such as HTTP headers, cookies, or URL paths. On the other hand, Layer 4 load balancers focus on routing traffic based on network-level information such as IP addresses and TCP/UDP ports.&lt;/p&gt;
&lt;h2&gt;Introducing HAProxy&lt;/h2&gt;
&lt;p&gt;HAProxy, which stands for High Availability Proxy, is an open-source software solution renowned for its performance, reliability, and versatility. Originally developed by Willy Tarreau in 2000, HAProxy has evolved into a feature-rich load balancer widely adopted by organizations ranging from startups to enterprise-level corporations.&lt;/p&gt;
&lt;p&gt;Key features of HAProxy include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Layer 4 and Layer 7 load balancing&lt;/strong&gt;: HAProxy can operate at both the network and application layers, offering flexibility in routing decisions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SSL termination and offloading&lt;/strong&gt;: It can handle SSL/TLS encryption and decryption, offloading this computationally intensive task from backend servers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Health checks&lt;/strong&gt;: HAProxy continuously monitors the health of backend servers and directs traffic away from unhealthy or unresponsive nodes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Session persistence&lt;/strong&gt;: It supports various methods for maintaining session affinity, ensuring that subsequent requests from the same client are routed to the same backend server.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dynamic configuration updates&lt;/strong&gt;: HAProxy allows for real-time configuration changes without requiring a restart, enabling seamless updates and adjustments.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installation and Basic Configuration&lt;/h2&gt;
&lt;p&gt;To get started with HAProxy, you&#39;ll first need to install it on a suitable server. HAProxy is available for various Linux distributions and can be installed using package managers such as apt, yum, or dnf.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# For Ubuntu/Debian
sudo apt-get update
sudo apt-get install haproxy

# For CentOS/RHEL
sudo yum install haproxy&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once installed, the next step is to configure HAProxy according to your specific requirements. The main configuration file for HAProxy is typically located at &lt;code&gt;/etc/haproxy/haproxy.cfg&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here&#39;s a basic example of an HAProxy configuration file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;global
    log /dev/log    local0
    log /dev/log    local1 notice
    chroot /var/lib/haproxy
    stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
    stats timeout 30s
    user haproxy
    group haproxy
    daemon

defaults
    log global
    mode http
    option httplog
    option dontlognull
    timeout connect 5000
    timeout client  50000
    timeout server  50000

frontend http_front
    bind *:80
    default_backend http_back

backend http_back
    balance roundrobin
    server server1 192.168.1.101:80 check
    server server2 192.168.1.102:80 check&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this configuration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;global&lt;/code&gt; section defines global settings such as logging, user, and group.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;defaults&lt;/code&gt; section sets default parameters for HTTP mode, logging, and timeouts.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;frontend&lt;/code&gt; section (&lt;code&gt;http_front&lt;/code&gt;) defines the frontend configuration, including the listening IP and port (&lt;code&gt;*:80&lt;/code&gt;) and the default backend (&lt;code&gt;http_back&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;backend&lt;/code&gt; section (&lt;code&gt;http_back&lt;/code&gt;) specifies the backend servers to which traffic will be forwarded. In this example, round-robin load balancing is used to distribute traffic evenly between &lt;code&gt;server1&lt;/code&gt; and &lt;code&gt;server2&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Advanced Configuration Options&lt;/h2&gt;
&lt;p&gt;While the basic configuration provided above is sufficient for many use cases, HAProxy offers a plethora of advanced configuration options to fine-tune its behavior and cater to more complex scenarios. Some of these options include:&lt;/p&gt;
&lt;h3&gt;Health Checks&lt;/h3&gt;
&lt;p&gt;HAProxy allows you to define health checks to monitor the status of backend servers and automatically remove or add servers based on their health. Health checks can be configured using the &lt;code&gt;option httpchk&lt;/code&gt; directive, specifying the HTTP method and path to be used for health checks.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;backend http_back
    option httpchk GET /health
    http-check expect status 200
    server server1 192.168.1.101:80 check
    server server2 192.168.1.102:80 check&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;SSL Termination&lt;/h3&gt;
&lt;p&gt;To offload SSL/TLS encryption and decryption from backend servers, you can configure HAProxy to terminate SSL connections at the load balancer. This is achieved by specifying SSL-related options in the frontend configuration.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;frontend https_front
    bind *:443 ssl crt /etc/haproxy/certs/
    default_backend http_back&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Session Persistence&lt;/h3&gt;
&lt;p&gt;HAProxy supports various methods for session persistence, ensuring that subsequent requests from the same client are routed to the same backend server. This can be achieved using cookies, source IP hashing, or other techniques.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;backend http_back
    balance roundrobin
    cookie SERVERID insert indirect nocache
    server server1 192.168.1.101:80 check cookie server1
    server server2 192.168.1.102:80 check cookie server2&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Rate Limiting&lt;/h3&gt;
&lt;p&gt;You can configure HAProxy to limit the number of requests per second from clients to prevent abuse or mitigate DoS attacks. This is achieved using the &lt;code&gt;reqrate&lt;/code&gt; and &lt;code&gt;connrate&lt;/code&gt; options in the &lt;code&gt;backend&lt;/code&gt; section.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;backend http_back
    stick-table type ip size 200k expire 30s store conn_rate(3s)
    tcp-request connection track-sc1 src
    tcp-request connection reject if { src_conn_rate(Abuse) ge 10 }
    server server1 192.168.1.101:80 check
    server server2 192.168.1.102:80 check&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Testing and Monitoring&lt;/h2&gt;
&lt;p&gt;After configuring HAProxy, it&#39;s essential to thoroughly test your setup to ensure that it behaves as expected and meets your performance and reliability requirements. You can use tools like curl, ab (Apache Benchmark), or JMeter to simulate traffic and monitor HAProxy&#39;s behavior.&lt;/p&gt;
&lt;p&gt;Additionally, HAProxy provides a built-in statistics page that can be enabled to monitor real-time metrics such as active connections, request rates, and backend server status. To enable the statistics page, add the following lines to your configuration file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;listen stats
    bind *:8080&lt;/code&gt;&lt;/pre&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Using the Vi text editor effectively</title>
    <link href="https://www.knowledgebasement.com/using-the-vi-text-editor-effectively/" rel="alternate" type="text/html" title="Using the Vi text editor effectively"/>
    <published>2024-02-12T13:01:35Z</published>
    <updated>2024-02-12T13:01:35Z</updated>
    <id>https://www.knowledgebasement.com/using-the-vi-text-editor-effectively/</id>
    <summary>Introduction Welcome to our beginner&#39;s guide on how to use the Vi text editor effectively. If you&#39;re new to the world of programming or system…</summary>
    <content type="html">&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome to our beginner&#39;s guide on how to use the Vi text editor effectively. If you&#39;re new to the world of programming or system administration, you&#39;ve probably heard about Vi. It&#39;s a powerful text editor built into most Unix systems, including Linux and Mac OS. This blog post will guide you through the basics of using Vi, making your coding journey easier and more efficient.&lt;/p&gt;
&lt;h2&gt;What is Vi?&lt;/h2&gt;
&lt;p&gt;Vi, short for Visual, is a text editor that allows you to create and modify any text file on your system. It&#39;s a modal editor, meaning it has different modes - command mode, insert mode, and command-line mode. Each mode has its unique functions, which we&#39;ll delve into later in this post.&lt;/p&gt;
&lt;h2&gt;Why Use Vi?&lt;/h2&gt;
&lt;p&gt;Vi is ubiquitous. It&#39;s available on almost all Unix-like systems. It&#39;s lightweight, fast, and can handle large files without slowing down your system. Plus, once you master Vi, you&#39;ll be able to work more efficiently due to its powerful command set.&lt;/p&gt;
&lt;h2&gt;Understanding Vi Modes&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Command Mode: This is the default mode when you open Vi. Here, you can move around the text, delete text, copy and paste text, and execute commands.&lt;/li&gt;
&lt;li&gt;Insert Mode: In this mode, you can insert text into your file. You can enter this mode from command mode by pressing &#39;i&#39;.&lt;/li&gt;
&lt;li&gt;Command-Line Mode: Here, you can enter commands that perform complex tasks like searching and replacing text. You can enter this mode from command mode by pressing &#39;:&#39;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Getting Started with Vi&lt;/h2&gt;
&lt;p&gt;To start using Vi, open your terminal and type &#39;vi&#39; followed by the name of the file you want to edit. For example, &#39;vi myfile.txt&#39; will open the file &#39;myfile.txt&#39; in Vi. If the file doesn&#39;t exist, Vi will create it for you.&lt;/p&gt;
&lt;h2&gt;Navigating in Vi&lt;/h2&gt;
&lt;p&gt;In command mode, you can navigate through your text using the keys &#39;h&#39; (left), &#39;j&#39; (down), &#39;k&#39; (up), and &#39;l&#39; (right). You can also move to the beginning of the line with &#39;0&#39; and to the end of the line with &#39;$&#39;.&lt;/p&gt;
&lt;h2&gt;Editing Text in Vi&lt;/h2&gt;
&lt;p&gt;To start inserting text, press &#39;i&#39; to enter insert mode. Once you&#39;re done, press &#39;Esc&#39; to return to command mode. To delete text, move the cursor to the text and press &#39;d&#39;. To copy text, use &#39;y&#39; (yank), and to paste, use &#39;p&#39;.&lt;/p&gt;
&lt;h2&gt;Searching and Replacing Text&lt;/h2&gt;
&lt;p&gt;In command-line mode, you can search for text using &#39;/&#39;. For example, &#39;/text&#39; will search for the word &#39;text&#39;. To replace text, use the command &#39;:%s/old/new/g&#39;, where &#39;old&#39; is the text you want to replace and &#39;new&#39; is the text you want to replace it with.&lt;/p&gt;
&lt;h2&gt;Saving and Exiting Vi&lt;/h2&gt;
&lt;p&gt;To save your changes and stay in Vi, use &#39;:w&#39;. To save and exit, use &#39;:wq&#39;. If you want to exit without saving, use &#39;:q!&#39;.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Vi may seem intimidating at first, but with practice, you&#39;ll find it to be a powerful tool in your coding arsenal. Remember, the key to mastering Vi is understanding its modes and commands. So, start practicing and happy coding!&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>Understanding and Using the Linux Kernel</title>
    <link href="https://www.knowledgebasement.com/understanding-and-using-the-linux-kernel/" rel="alternate" type="text/html" title="Understanding and Using the Linux Kernel"/>
    <published>2024-02-12T13:00:00Z</published>
    <updated>2024-02-12T13:00:00Z</updated>
    <id>https://www.knowledgebasement.com/understanding-and-using-the-linux-kernel/</id>
    <summary>Introduction Welcome to the world of Linux, a powerful, open-source operating system that powers a significant portion of the internet, corporate…</summary>
    <content type="html">&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome to the world of Linux, a powerful, open-source operating system that powers a significant portion of the internet, corporate servers, and even Android phones. At the heart of this system lies the Linux Kernel, a fundamental component that manages the system&#39;s operations. This blog post aims to demystify the Linux Kernel for beginners and provide a basic understanding of its use and functionality.&lt;/p&gt;
&lt;h2&gt;What is the Linux Kernel?&lt;/h2&gt;
&lt;p&gt;The Linux Kernel is the core of the Linux operating system. It acts as a bridge between applications and the actual data processing done at the hardware level. The kernel is responsible for managing the system&#39;s resources and the communication between hardware and software components.&lt;/p&gt;
&lt;h2&gt;Why is the Linux Kernel Important?&lt;/h2&gt;
&lt;p&gt;The Linux Kernel is crucial because it provides an interface for user-level interactions. It handles memory management, task scheduling, file management, and system calls, ensuring that everything runs smoothly and efficiently.&lt;/p&gt;
&lt;h2&gt;Understanding the Linux Kernel&lt;/h2&gt;
&lt;p&gt;The Linux Kernel is composed of several important subsystems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Process Management: This subsystem handles processes and tasks. It schedules their execution, manages their state, and allocates CPU resources.&lt;/li&gt;
&lt;li&gt;Memory Management: This subsystem oversees the system&#39;s physical and virtual memory. It allocates memory blocks to processes and manages memory paging and swapping.&lt;/li&gt;
&lt;li&gt;Device Drivers: These are special programs that allow the kernel to interact with hardware devices. They translate generic commands into specific hardware instructions.&lt;/li&gt;
&lt;li&gt;System Calls Interface: This is the interface through which applications interact with the kernel. It provides a set of functions that applications can use to request services from the kernel.&lt;/li&gt;
&lt;li&gt;Network Management: This subsystem manages all data transmission over networks.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Using the Linux Kernel&lt;/h2&gt;
&lt;p&gt;As a beginner, you won&#39;t directly interact with the kernel, but understanding its role can help you better understand how Linux works. Here are a few ways you might indirectly interact with the kernel:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Running Applications: When you run an application, it makes system calls to the kernel to request services like reading a file or allocating memory.&lt;/li&gt;
&lt;li&gt;Using Terminal Commands: Many terminal commands interact with the kernel. For example, the &#39;ls&#39; command makes a system call to the kernel to get a list of files in a directory.&lt;/li&gt;
&lt;li&gt;Installing Drivers: When you install a new hardware device, you often need to install a driver. This driver communicates with the kernel to control the device.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;The Linux Kernel is a powerful and complex piece of software that forms the heart of the Linux operating system. While beginners may not interact with the kernel directly, understanding its role and functionality can provide valuable insight into how Linux works. As you continue your Linux journey, you&#39;ll gain a deeper appreciation for the kernel&#39;s role in making Linux a versatile and powerful operating system.&lt;/p&gt;
&lt;p&gt;Remember, the Linux community is vast and always ready to help newcomers. Don&#39;t hesitate to seek help and ask questions as you explore the fascinating world of Linux and its kernel.&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
  <entry>
    <title>How to Set Up a DNS Server with BIND</title>
    <link href="https://www.knowledgebasement.com/how-to-set-up-a-dns-server-with-bind/" rel="alternate" type="text/html" title="How to Set Up a DNS Server with BIND"/>
    <published>2024-02-12T12:58:55Z</published>
    <updated>2024-02-12T12:58:55Z</updated>
    <id>https://www.knowledgebasement.com/how-to-set-up-a-dns-server-with-bind/</id>
    <summary>Introduction In the world of networking, the Domain Name System (DNS) plays a pivotal role in ensuring seamless communication between computers. It…</summary>
    <content type="html">&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In the world of networking, the Domain Name System (DNS) plays a pivotal role in ensuring seamless communication between computers. It translates human-friendly domain names into IP addresses, making it easier for us to browse the internet. BIND (Berkeley Internet Name Domain) is one of the most popular DNS software. This blog post will guide beginners through the process of setting up a DNS server with BIND.&lt;/p&gt;
&lt;h2&gt;What is BIND?&lt;/h2&gt;
&lt;p&gt;BIND is an open-source software that implements DNS protocols for the internet. It provides an openly redistributable reference implementation of the major components of the Domain Name System, including a DNS server (named), a DNS resolver library, and tools for verifying the proper operation of the DNS server.&lt;/p&gt;
&lt;h2&gt;Why Use BIND?&lt;/h2&gt;
&lt;p&gt;BIND is widely used because of its robustness, flexibility, and scalability. It supports DNSSEC for secure DNS data communication. It&#39;s also platform-independent, meaning it can run on various operating systems like Linux, Unix, and Windows.&lt;/p&gt;
&lt;h2&gt;Setting Up a DNS Server with BIND&lt;/h2&gt;
&lt;p&gt;Before we start, ensure you have root access to your server and BIND installed. If not, you can install BIND on a Ubuntu server using the command: sudo apt-get install bind9 bind9utils bind9-doc.&lt;/p&gt;
&lt;h3&gt;Step 1: Configure BIND&lt;/h3&gt;
&lt;p&gt;The main configuration file for BIND is named.conf. This file is usually located in the /etc/bind directory. Open this file using a text editor and add the following lines:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;zone &quot;yourdomain.com&quot; {
    type master;
    file &quot;/etc/bind/db.yourdomain.com&quot;;
};&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &quot;yourdomain.com&quot; with your actual domain name.&lt;/p&gt;
&lt;h3&gt;Step 2: Create the Zone File&lt;/h3&gt;
&lt;p&gt;Next, create the zone file that you specified in the named.conf file. This file will contain the DNS records for your domain. Use a text editor to create the file /etc/bind/db.yourdomain.com and add the following lines:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$TTL    604800
@       IN      SOA     ns.yourdomain.com. admin.yourdomain.com. (
                  3         ; Serial
             604800         ; Refresh
              86400         ; Retry
            2419200         ; Expire
             604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.yourdomain.com.
@       IN      A       192.0.2.1
@       IN      AAAA    2001:db8::1
ns      IN      A       192.0.2.1
ns      IN      AAAA    2001:db8::1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &quot;yourdomain.com&quot; with your actual domain name and replace the IP addresses with your server&#39;s IP addresses.&lt;/p&gt;
&lt;h3&gt;Step 3: Check BIND Configuration&lt;/h3&gt;
&lt;p&gt;After setting up the configuration file and zone file, check if there are any syntax errors using the named-checkconf tool:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo named-checkconf&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If there are no errors, the command will return without any output.&lt;/p&gt;
&lt;h3&gt;Step 4: Restart BIND&lt;/h3&gt;
&lt;p&gt;Finally, restart the BIND service to apply the changes:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo systemctl restart bind9&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can check the status of the BIND service with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo systemctl status bind9&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Setting up a DNS server with BIND might seem daunting at first, but with a clear understanding and step-by-step approach, it becomes manageable. This guide has provided a basic setup, but BIND&#39;s capabilities are vast and can handle complex configurations. As you become more comfortable, you can explore advanced features like DNSSEC, views, and more.&lt;/p&gt;
&lt;p&gt;Remember, the key to mastering any technical skill is practice. So, don&#39;t hesitate to set up a test environment and experiment with different BIND configurations. Happy learning!&lt;/p&gt;
</content>
    <author>
      <name>Knowledge Basement Team</name>
    </author>
    <category term="Linux"/>
  </entry>
</feed>
