Giter Site home page Giter Site logo

pioug / blog Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 2.0 77 KB

Static blog hosted on GitHub Pages, deployed via GitHub Actions, edited on GitHub Issues, build with 11ty

Home Page: https://pioug.github.io/blog

JavaScript 39.02% Dockerfile 0.71% Shell 1.75% HTML 32.73% CSS 25.79%
blog eleventy github-actions github-issues github-pages

blog's People

Contributors

pioug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

blog's Issues

Hello World!

Proof of concept

The main idea is creating a static blog with 11ty, hosted on GitHub Pages, deployed via GitHub Action, editable with GitHub Issues. See the repository https://github.com/pioug/blog.

Workflow

  1. Create (or edit) an issue in the GitHub repository.
  2. GitHub Actions receives an issues event.
  3. A workflow fetches all issues in the repository using the GraphQL API of GitHub then uses Eleventy to compile the Markdown files using the body of the issues. The front matter is built from the title, tags and creation date of the issues.
  4. Another workflow git-commits and git-pushes the build folder to the GitHub Pages branch.
  5. GitHub Pages assets are automatically refreshed.

Why

  • Reuse the label system to manage the post tags (easy to assign, rename on GitHub).
  • Articles are updated automatically as soon as I finish editing the corresponding issues.
  • Image upload is simple as copy-pasting an image on GitHub
  • No web server, no file bucket, no CDN to manage.
  • The articles are editable in the browser.
  • Bonus: No vendor lock-in? I feel like I could easily change the Docker/scripting part (used by GH Actions) or the hosting (S3 + CF) or the static site generator or without too much trouble. I can always return to markdown files if GitHub issues are a bad idea.
  • Bonus: Giving editing permissions could be as simple as giving adding a collaborator to the repository.

How

Test

  • Support code snippet ๐Ÿ‘จโ€๐Ÿ’ป
console.log("Verify nice markdown support");
  • Include image uploaded via GitHub ๐ŸŽ†

Totakeke

it seems the GraphQL API is not work

rewrite the gulpfile.js

headers: {
      Authorization: `Bearer ${GH_API_TOKEN}`,
      "User-Agent": "ArtUsr"
    },
    asJSON: true
  });

And

 query ($number_of_issues: Int!) {
      repository(owner:"ArtUsr", name:"blog")

Before this modify , i have already enable issues and Store GitHub access token as Secrets.
My repository https://github.com/ArtUsr/1st

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.