Git Product home page Git Product logo

simonneutert.github.io's Introduction

Bridgetown Website README

Welcome to your new Bridgetown website! You can update this README file to provide additional context and setup information for yourself or other contributors.

Table of Contents

Prerequisites

Install

cd bridgetown-site-folder
bundle install && yarn install

Learn more: Bridgetown Getting Started Documentation.

Development

To start your site in development mode, run bin/bridgetown start and navigate to localhost:4000!

Use a theme or add some plugins to get started quickly.

Commands

# running locally
bin/bridgetown start

# build & deploy to production
bin/bridgetown deploy

# load the site up within a Ruby console (IRB)
bin/bridgetown console

Learn more: Bridgetown CLI Documentation

Deployment

You can deploy Bridgetown sites on hosts like Render or Vercel as well as traditional web servers by simply building and copying the output folder to your HTML root.

Read the Bridgetown Deployment Documentation for more information.

Contributing

If repo is on GitHub:

  1. Fork it
  2. Clone the fork using git clone to your local development machine.
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

simonneutert.github.io's People

Contributors

dependabot[bot] avatar simonneutert avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

simonneutert.github.io's Issues

modern vanilla JS "submit form in background"

  • write blog post

function submitInBackground(formId, url) {
  document.getElementById(formId).addEventListener("submit", function (e) {
    e.preventDefault();
    let form = document.getElementById(formId);

    // Get all field data from the form
    // returns a FormData object
    let data = new FormData(form);
    // transform to query string
    fetch(url, {
      //signal: searchAbortController.signal,
      method: "POST",
      cache: "no-cache",
      // TODO: google why 'dont send headers ๐Ÿฅฐ for form submission'
      body: new FormData(form),
    })
      .then((response) => response.json())
      .then((data) => {
        console.log(data);
      });

    return false;
  });
}

New Post: How to handle VCR (in Ruby and JS/NODE) when API answers with `null`

See papierkram-app-client and papierkram_api_client in the VCR/talkback integration

 let tapeBody = {};
try {
  tapeBody = JSON.parse(tape.res.body);
} catch (error) {
  tapeBody = {};
}

Ruby:

VCR.configure do |c|
  c.cassette_library_dir = 'test/cassettes'
  c.hook_into :faraday
  c.filter_sensitive_data('<API BEARER>') { ENV.fetch('PAPIERKRAM_API_KEY', nil) }
  c.filter_sensitive_data('<UNICORN>') do |interaction|
    next unless interaction.response.headers['set-cookie']

    interaction.response.headers['set-cookie'].first.split(';').first.split('=').last
  end
  c.before_record do |interaction|
    interaction.response.body.scan(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b/).each do |email|
      interaction.response.body.gsub!(email, '<EMAIL>')
    end

    json_body = begin
      JSON.parse(interaction.response.body)
    rescue JSON::ParserError => e
      puts e
      {}
    end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.