5

Setting up Indieweb Homepage

 3 years ago
source link: https://willschenk.com/articles/2019/setting_up_indieweb/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Setting up Indieweb Homepage

Will Schenk

Articles Contact Tags

Setting up Indieweb Homepage

the dream of the nineties is alive on the indieweb

Published April 19, 2019 #howto #indieweb #p2p #microformats

Remember microformats? Me neither! Back when the web was open and we were trying to find ways to interconnect independent things? Let’s bring them back!

Steps: Simple

  1. Get a domain

  2. Host your own site on it

  3. On the index page, create an h-card

  4. Inside of that h-card an identity markers.

  5. That’s it.

Example

You should replace this stuff with your own. Check out the standard’s documentation for more details.

<div class="h-card">

  <h1 class="p-name">Will Schenk</h1>
  <img class="u-photo" src="photo" width="300">

  <p>
    I work at
    <a href="https://happyfuncorp.com" class="p-org">HappyFunCorp</a>
    where I am a
    <span class="p-job-title">software craftman</span>
  </p>

  <p>
    <ul>
      <li><a href="https://willschenk.com" class="u-url u-uid" rel="me">Will Schenk</a></li>
      <li><a href="mailto:[email protected]" class="u-email" rel="me">[email protected]</a></li>
      <li><a href="https://twitter.com/@wschenk" rel="me">Twitter</a></li>
      <li><a href="https://instagram.com/wschenk" rel="me">Insta</a></li>
      <li><a href="https://linkedin.com/in/will-schenk-420266" rel="me">LinkedIn></a></li>
    </ul>
  </p>
</div>

You should obviously replace that information with your own.

Testing

After you deploy, the easiest way to test is to go to https://indiewebify.me/validate-h-card/

So do that.

But lets build a simple tester so we can see how to interact with it.

$ mkdir indieweb
$ cd indieweb
$ npm init
$ yarn add microformat-node node-fetch

Then create index.js to pull it down and print it out:

const fetch = require( 'node-fetch' );
const microformat = require('microformat-node');

(async () => { const page = await fetch( 'https://willschenk.com' ) const text = await page.text() const info = await microformat.get({html: text})

console.log( JSON.stringify( info ) ) })()



And you should see the nicely parsed information! Now what to do with this all!

See also

Easy scraping with httpie and jq

Pulling my GitHub starred repositories into Hugo

I recently saw a tweet mentioning the combination of using HTTPie (a command line HTTP client), jq (a lightweight and flexible command-line JSON processor) and Gron (Make JSON greppable!) was “all you needed to build a scraper.” Lets see if that’s true.

Read more

Building a slimmer go Docker container

All we need is the binary

Go binaries are self contained, which means that they don’t need anything special installed in the environment to deploy them. When people make Dockerfiles to build go projects, they often include the the golang compilers and build tools, which isn’t necessary for running the container. I’m going to use healer Docker container that “Automatically heal docker containers that report themselves unhealthy” as an example of reducing the image size from 648MB to 17MB.

Read more

Bootstrapping a react app

with bootstrap and font awesome

Here’s a quick recipe for getting a blank react project with bootstrap up and running. We’ll walk though all of the steps that you’ll need to get a basic bootstrap based framework up and running, ready for theming and component implementation using redux.

Read more

Made in Brooklyn, NY.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK