<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Defender</title>
    <description>The latest articles on Forem by Defender (@defenderofbasic).</description>
    <link>https://forem.com/defenderofbasic</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1525430%2F3024a45f-0e5a-4be8-99fc-67c0407cbb6a.jpg</url>
      <title>Forem: Defender</title>
      <link>https://forem.com/defenderofbasic</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/defenderofbasic"/>
    <language>en</language>
    <item>
      <title>Host your Obsidian notebook on GitHub Pages for free</title>
      <dc:creator>Defender</dc:creator>
      <pubDate>Sun, 06 Oct 2024 17:58:56 +0000</pubDate>
      <link>https://forem.com/defenderofbasic/host-your-obsidian-notebook-on-github-pages-for-free-8l1</link>
      <guid>https://forem.com/defenderofbasic/host-your-obsidian-notebook-on-github-pages-for-free-8l1</guid>
      <description>&lt;p&gt;This tutorial walks you through how to publish your &lt;a href="https://obsidian.md/" rel="noopener noreferrer"&gt;Obsidian&lt;/a&gt; notes as a website, hosted on GitHub pages. No coding required. The basic result will look like this: &lt;a href="https://quartz.jzhao.xyz/" rel="noopener noreferrer"&gt;https://quartz.jzhao.xyz/&lt;/a&gt;. The look &amp;amp; feel is customizable but is outside the scope of this article. See &lt;a href="https://quartz.jzhao.xyz/showcase" rel="noopener noreferrer"&gt;quartz showcase examples&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The final workflow is shown below. You just write in Obsidian like you normally do, and run a command to publish (or configure it to automatically publish every time you save). Zero friction from idea to internet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ff4mbosduw83ikmc0yi.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ff4mbosduw83ikmc0yi.gif" alt="editing an Obsidian Vault and pushing it to GitHub" width="586" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This doubles as an introduction to GitHub for the layperson. &lt;/p&gt;

&lt;h2&gt;
  
  
  (1) Create a GitHub account
&lt;/h2&gt;

&lt;p&gt;We're using GitHub to host the source files, and to run the script that converts markdown into HTML (the tool that does this conversion is called Quartz, and it is open source). &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign up for a GitHub account: &lt;a href="https://github.com/signup" rel="noopener noreferrer"&gt;https://github.com/signup&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  (2) Fork the template
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open the template here: &lt;a href="https://github.com/DefenderOfBasic/obsidian-quartz-template" rel="noopener noreferrer"&gt;https://github.com/DefenderOfBasic/obsidian-quartz-template&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click "fork" to make a copy of it in your account:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4z8jihf4fpl5xzk853n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4z8jihf4fpl5xzk853n.png" alt="fork button" width="562" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give it a name. This will be the name of the published URL: &lt;code&gt;https://&amp;lt;USERNAME&amp;gt;.github.io/&amp;lt;REPO_NAME&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxhr53t9gp7s0sck8crkr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxhr53t9gp7s0sck8crkr.png" alt="choose a name" width="418" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  (3) Enable GitHub Actions
&lt;/h2&gt;

&lt;p&gt;Every time you make a change &amp;amp; push it to GitHub, the "actions" will run the script to generate &amp;amp; publish the HTML.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the settings page of your repo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Far0snc74kveo7fqplzbr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Far0snc74kveo7fqplzbr.png" alt="settings" width="301" height="107"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on "Pages" in the sidebar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2vvi8q7elvoydmzj3dj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2vvi8q7elvoydmzj3dj.png" alt="pages" width="325" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change the deploy source to "GitHub Actions"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yef1hd3by3ojs3c4oh1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yef1hd3by3ojs3c4oh1.png" alt="github actions" width="538" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the "Actions" page of your repo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhzaagvd6u2nyx8nis0o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhzaagvd6u2nyx8nis0o.png" alt="github actions tab" width="512" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click the green button: &lt;strong&gt;"I understand my workflows, go ahead and enable them"&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  (Optional) Test that your site is up
&lt;/h2&gt;

&lt;p&gt;At this point you can edit the files on GitHub.com in your browser and the website will be deployed. The rest of the article will be setting up the files locally so you can edit them in Obsidian.&lt;/p&gt;

&lt;p&gt;To confirm everything so far is working, try editing the &lt;code&gt;source/content/index.md&lt;/code&gt; file in your repo as shown below. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rjF0E45sllI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;When you make an edit, you'll see a yellow pending circle that will turn green after a minute or so (might need to refresh).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7druke2zgrzxoaubtsqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7druke2zgrzxoaubtsqb.png" alt="CI build" width="599" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once it's green, see your website at &lt;code&gt;https://&amp;lt;USERNAME&amp;gt;.github.io/&amp;lt;REPO_NAME&amp;gt;&lt;/code&gt;. You should see the words you just edited! 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  (4) Download the repository with GitHub desktop
&lt;/h2&gt;

&lt;p&gt;In this step we'll use GitHub desktop to sync the repository from GitHub.com to your computer. This is like adding a Dropbox/Google Drive folder to your computer so you can move files back &amp;amp; forth from your computer to the server.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download GitHub desktop: &lt;a href="https://desktop.github.com/download/" rel="noopener noreferrer"&gt;https://desktop.github.com/download/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Sign in to GitHub.com&lt;/strong&gt; to connect it to your account&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Clone a repository from the Internet...&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3eyrvo6zku5d2c00h09.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3eyrvo6zku5d2c00h09.png" alt="clone the repo" width="500" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the repository that you forked AND note the &lt;strong&gt;local path&lt;/strong&gt; on your computer. You will open this folder in the next step.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcbkx80uy203g42ptltf5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcbkx80uy203g42ptltf5.png" alt="select repo" width="492" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Clone&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  (5) Open the Obsidian Vault
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In Obsidian, click &lt;strong&gt;Open folder as vault&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7pud09qdjgh22qhpeyi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7pud09qdjgh22qhpeyi.png" alt="open folder as vault" width="466" height="85"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the location of the repository from the previous step, and open the folder: &lt;code&gt;source/content/&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;(in my case the full path is &lt;code&gt;C:/Users/Defender/Documents/GitHub/obsidian-quartz-template/source/content&lt;/code&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now you can edit this as a normal Obsidian vault. This should come configured with the &lt;code&gt;Git&lt;/code&gt; community plugin. To push your changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ctrl+P (or Cmd+P on macOS) then type &lt;code&gt;Git sync&lt;/code&gt; to get the option&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ff4mbosduw83ikmc0yi.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ff4mbosduw83ikmc0yi.gif" alt="editing an Obsidian Vault and pushing it to GitHub" width="586" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to GitHub.com, you'll see the yellow dot, and green arrow eventually&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  Thanks for reading! Please let me know if you have any questions/get stuck and we can improve this guide!
&lt;/h4&gt;

&lt;p&gt;I really believe a lot of value in society is unlocked when the layperson understands the basics of working with technology. I think putting something on our species' planetary network is as basic of a need as using the telephone. I've written a couple things in service of this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/defenderofbasic/get-your-own-piece-of-internet-real-estate-in-5-minutes-1dpj"&gt;Get your own piece of internet real estate in 5 minutes&lt;/a&gt; -&amp;gt; how to host your website with Glitch.com and write basic HTML. Another good, free static hosting option that is as easy as editing a google doc.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/defenderofbasic/your-first-bookmarklet-3213"&gt;Your first bookmarklet&lt;/a&gt; -&amp;gt; how to automate little actions in your workflow, especially now with ChatGPT generating the code so you don't even have to code, can just describe what you want &amp;amp; wire it up.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This Obsidian / Quartz template contains a &lt;code&gt;source/raw_html&lt;/code&gt; folder that is copied into the final build. This means you can use this to deploy any arbitrary HTML, generate something from your favorite LLM and paste it here, or create a personal archive of web pages that are important to you.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>amateur</category>
      <category>homecookedsoftware</category>
    </item>
    <item>
      <title>Get your own piece of internet real estate in 5 minutes</title>
      <dc:creator>Defender</dc:creator>
      <pubDate>Wed, 03 Jul 2024 21:08:14 +0000</pubDate>
      <link>https://forem.com/defenderofbasic/get-your-own-piece-of-internet-real-estate-in-5-minutes-1dpj</link>
      <guid>https://forem.com/defenderofbasic/get-your-own-piece-of-internet-real-estate-in-5-minutes-1dpj</guid>
      <description>&lt;p&gt;There are tons of options out there for publishing content on our planet's global communication network: Instagram, Substack, Mastodon, YouTube, Reddit. These are all great, you should use whatever works, wherever you find your audience. &lt;/p&gt;

&lt;p&gt;There is one way of putting stuff on the internet that is rarely advertised, because no one really makes money from it: making your own website.&lt;/p&gt;

&lt;h3&gt;
  
  
  You don't need to be a "coder" to have your own piece of the internet. If you can maintain a google doc, you can maintain a web page
&lt;/h3&gt;

&lt;p&gt;I love Robin Sloan's philosophy on this. He talks about &lt;a href="https://www.robinsloan.com/notes/home-cooked-app/" rel="noopener noreferrer"&gt;making software like making a home-cooked meal&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;People don’t only learn to cook so they can become chefs. Some do! But many more people learn to cook so they can eat better, or more affordably. Because they want to carry on a tradition. Sometimes they learn because they’re bored! Or even because they enjoy spending time with the person who’s teaching them.&lt;br&gt;
... &lt;br&gt;
This messaging app I built for, and with, my family, it won’t change unless we want it to change. There will be no sudden redesign, no flood of ads, no pivot to chase a userbase inscrutable to us. It might go away at some point, but that will be our decision. &lt;strong&gt;What is this feeling? Independence? Security? Sovereignty?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This last piece is really important. Websites that I made 20 years ago still work. The companies I used for hosting don't exist anymore, but I can easily move my website anywhere else (just like copying text out of one note app into note app!)&lt;/p&gt;

&lt;h3&gt;
  
  
  step 0: sign up to Glitch for web hosting
&lt;/h3&gt;

&lt;p&gt;Glitch.com is one website I really like that gives us free web hosting.&lt;/p&gt;

&lt;p&gt;Sign up: &lt;a href="https://glitch.com/signup" rel="noopener noreferrer"&gt;https://glitch.com/signup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I made this template for you: &lt;/p&gt;

&lt;h3&gt;
  
  
  step 1: copy this template
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open this template: &lt;a href="https://glitch.com/edit/#!/personal-website-template-v2" rel="noopener noreferrer"&gt;https://glitch.com/edit/#!/personal-website-template-v2&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click "Remix to Edit" in the top right&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft519obg7myhim633vwoj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft519obg7myhim633vwoj.png" width="396" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  step 2: edit the HTML
&lt;/h3&gt;

&lt;p&gt;Change the title of the web page by editing the text. Text between &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; tags is a "header". &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; stands for paragraph, etc. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjtv4hbsymmm2nyzv2t2y.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjtv4hbsymmm2nyzv2t2y.gif" width="1339" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  step 3: share your website
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Click "settings" on the left, then "Edit project details" to change the domain name of your website&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgofova7njx4we9a3jk2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgofova7njx4we9a3jk2.png" width="609" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click "open in a new window" in the preview pane&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftnf5luz3s4bq35jg7d8k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftnf5luz3s4bq35jg7d8k.png" width="426" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;congrats! that is your website link, anyone on the planet with that URL can read your words!!&lt;/p&gt;

&lt;h3&gt;
  
  
  That's it!
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;you can use this to collect links to all your work online &lt;/li&gt;
&lt;li&gt;google or ask chatGPT "how do I do X in HTML", the sky is limit!&lt;/li&gt;
&lt;li&gt;every website you've ever seen is HTML. You can just copy any part of it and put it on your website!!! &lt;/li&gt;
&lt;li&gt;you can upload pictures (drag and drop them into the &lt;code&gt;Assets&lt;/code&gt; tab), or embed youtube videos (click "share" then "embed")&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For inspiration, see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://neocities.org/" rel="noopener noreferrer"&gt;https://neocities.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sundaysites.cafe/" rel="noopener noreferrer"&gt;https://sundaysites.cafe/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The other free web host I like to use is GitHub Pages. It's nice if you prefer editing your website files on your computer vs in the browser. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>amateur</category>
      <category>homecookedsoftware</category>
    </item>
    <item>
      <title>Your first bookmarklet</title>
      <dc:creator>Defender</dc:creator>
      <pubDate>Fri, 24 May 2024 21:06:13 +0000</pubDate>
      <link>https://forem.com/defenderofbasic/your-first-bookmarklet-3213</link>
      <guid>https://forem.com/defenderofbasic/your-first-bookmarklet-3213</guid>
      <description>&lt;p&gt;Bookmarklets are a great way to automate or tweak things across your web experience. &lt;a href="https://x.com/DefenderOfBasic/status/1788143504671088825" rel="noopener noreferrer"&gt;I made one recently&lt;/a&gt; that allows me to click a button to show all my interactions with any given twitter user.&lt;/p&gt;

&lt;p&gt;This tutorial will walk you through creating your first bookmarklet to edit a value inside a specific element on the page. It will insert a search term into the HackerNews search element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjk15xnwuybuiavif89rw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjk15xnwuybuiavif89rw.gif" width="580" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We're going to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the browser devtools to find the HTML element we want&lt;/li&gt;
&lt;li&gt;Write some JavaScript code in the console to manipulate this element&lt;/li&gt;
&lt;li&gt;Wrap this code into a bookmark so that when you click it, it runs the code, thus making a "bookmarklet" (a bookmark that runs your code snippet)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 1 - get the element with devtools
&lt;/h2&gt;

&lt;p&gt;I'm going to use this page as an example: &lt;a href="https://news.ycombinator.com/news" rel="noopener noreferrer"&gt;https://news.ycombinator.com/news&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Chrome, right click on the page and click "inspect" to open devtools&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpr8by8cwxtkn4zeddb7g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpr8by8cwxtkn4zeddb7g.png" width="501" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There's a lot of tools here. The important ones to notice are: (1) you can see the HTML, you can click on parts of the HTML to highlight the element on the page (2) you can use this little picker in the top left to click on any element visually, and it will show you where it is in the HTML.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Select the picker and then click on the search box&lt;/strong&gt; as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehl3z1nv1nsmf77ikase.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehl3z1nv1nsmf77ikase.gif" width="797" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok, now we have the HTML element. We need to get its "address" (or CSS selector) so we can get it with JavaScript and control it/do stuff with it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Right click on the element&lt;/strong&gt; and select "copy" &amp;gt; "copy selector"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7eai5auru607lcvo86ll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7eai5auru607lcvo86ll.png" width="757" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It'll be something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#hnmain &amp;gt; tbody &amp;gt; tr:nth-child(4) &amp;gt; td &amp;gt; center &amp;gt; form &amp;gt; input[type=text]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 - write JavaScript to control the element
&lt;/h2&gt;

&lt;p&gt;Switch to the "console" tab. And paste in the following code and hit enter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;selector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`#hnmain &amp;gt; tbody &amp;gt; tr:nth-child(4) &amp;gt; td &amp;gt; center &amp;gt; form &amp;gt; input[type=text]`&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;My element:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2byeo48n7sz9oo6h6zei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2byeo48n7sz9oo6h6zei.png" alt="Image description" width="604" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first line puts the selector into a variable. This snippet says "get the element, using this selector":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, &lt;code&gt;console.log()&lt;/code&gt; prints whatever we put in. &lt;/p&gt;

&lt;p&gt;Let's put the element into a variable instead of just printing it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;element&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, you can ask ChatGPT what to do/google it. You have an HTML element, in javascript, and we want to do something with it.&lt;/p&gt;

&lt;p&gt;In this case, I want to set a search string. To do that, google/chatgpt will tell you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;your input here&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdx5q1p0we6yr66vfvnhs.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdx5q1p0we6yr66vfvnhs.gif" width="797" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You now have a piece of code that does something! You can continue to tweak this as needed and interactively see if it works, line by line. &lt;/p&gt;

&lt;p&gt;My personal process is usually to have a file to save all the "correct code so far" and in the console I'm just writing things line by line to test them. You can refresh to reset the state. &lt;/p&gt;

&lt;p&gt;If you wanted another piece of code to submit the "search" so it goes to the search results page, you would get the HTML element of the form that this search bar lives inside, and then google "given an HTML form element, how to submit it with javascript", get the code for that, and test it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 - wrap it into a bookmarklet
&lt;/h2&gt;

&lt;p&gt;Now you have your code that does something. We're going to make it into a bookmark so you can run it on the page with a single button click.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a bookmark, like you normally would&lt;/li&gt;
&lt;li&gt;Edit it, and instead of a URL, paste in your code, wrapped in:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;javascript&lt;/span&gt;&lt;span class="p"&gt;:(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
&lt;span class="c1"&gt;// your code here&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(the only annoying thing right now is you need to add a semicolon at the end of each line for it to work. I might make a tool in the future to automate this part)&lt;/p&gt;

&lt;p&gt;So my full code looks like this that I paste into my bookmark:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;javascript&lt;/span&gt;&lt;span class="p"&gt;:(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;selector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`#hnmain &amp;gt; tbody &amp;gt; tr:nth-child(4) &amp;gt; td &amp;gt; center &amp;gt; form &amp;gt; input[type=text]`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;element&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my search term&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjk15xnwuybuiavif89rw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjk15xnwuybuiavif89rw.gif" width="580" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>bookmarklet</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
