Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello World! #1

Open
6 tasks done
pioug opened this issue Jul 9, 2019 · 0 comments
Open
6 tasks done

Hello World! #1

pioug opened this issue Jul 9, 2019 · 0 comments

Comments

@pioug
Copy link
Owner

pioug commented Jul 9, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant