{"id":18143515,"url":"https://github.com/herschel666/microblog-action","last_synced_at":"2025-04-23T01:02:12.601Z","repository":{"id":41871424,"uuid":"330132497","full_name":"herschel666/microblog-action","owner":"herschel666","description":"Render a static Microblog from Github Issues. :ticket:","archived":false,"fork":false,"pushed_at":"2025-04-11T03:51:58.000Z","size":2660,"stargazers_count":3,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"KillYourMaster","last_synced_at":"2025-04-11T04:29:32.009Z","etag":null,"topics":["microblog","publishing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/herschel666.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-16T10:00:38.000Z","updated_at":"2022-12-12T01:36:02.000Z","dependencies_parsed_at":"2024-04-04T00:27:15.068Z","dependency_job_id":"16c81822-5e9c-4d74-b50c-221cd05cd1c6","html_url":"https://github.com/herschel666/microblog-action","commit_stats":{"total_commits":370,"total_committers":2,"mean_commits":185.0,"dds":0.2702702702702703,"last_synced_commit":"465a2d9720f6549dc9002fcce0d3e4e3f999f85a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herschel666%2Fmicroblog-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herschel666%2Fmicroblog-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herschel666%2Fmicroblog-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herschel666%2Fmicroblog-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herschel666","download_url":"https://codeload.github.com/herschel666/microblog-action/tar.gz/refs/heads/KillYourMaster","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250349040,"owners_count":21415912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["microblog","publishing"],"created_at":"2024-11-01T19:07:52.993Z","updated_at":"2025-04-23T01:02:12.548Z","avatar_url":"https://github.com/herschel666.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microbog-Action\n\n\u003e Render a static Microblog from Github Issues. :ticket:\n\n## Features\n\n- supports blogposts and static pages\n- automatically creates a RSS feed\n- comes with 10 themes (powered by class-less CSS libraries)\n- custom CSS\n- static frontpage\n- deploy arbitrary files from `/static`-folder\n- deployment-agnostic: renders the site into a `_site`-folder\n- mark drafts with a `WIP`-label\n- limit publishing to issues with a certain label\n- only publish closed labels (when open issues as a quality indicator is relevant)\n- each blogpost's Canonical URL points to the original issue\n- custom 404 page\n\n## Usage\n\n**Full-blown configuration**\n\n```yaml\nname: Build and Deploy Microblog\n\non:\n  issues:\n    types: [opened, edited, reopened, closed, deleted, labeled, unlabeled]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Build Microblog\n        uses: herschel666/microblog-action@beta\n        with:\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n          url: 'https://myblog.tld/optional-path'\n          title: 'My Awesome Microblog'\n          description: 'See what I have written.'\n          theme: 'water.css'\n          date-format: 'yyyy-M-d'\n          posts-per-page: 20\n          pages: 'docs/**/*.md'\n          static-frontpage: 'welcome.md'\n          custom-styles: 'css/custom.css'\n          custom-javascript: 'js/custom.js'\n          label: 'blog'\n          closed: true\n          out-dir: '.tmp/site'\n          static-dir: 'misc/files'\n          lang: 'de'\n          i18n.next: 'Nächste Artikel'\n          i18n.prev: 'Vorherige Artikel'\n          i18n.posts: 'Artikel'\n\n      - Deploy Microblog\n        uses: ... # Use your preferred service to deploy the contents of /_site\n```\n\n**Minimal configuration**\n\n```yaml\nname: Build and Deploy Microblog\n\non:\n  issues:\n    types: [opened, edited, reopened, closed, deleted, labeled, unlabeled]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Build Microblog\n        uses: herschel666/microblog-action@beta\n        with:\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n          url: 'https://myblog.tld/optional-path'\n```\n\n## Configuration\n\n| Option            | Required | Type                   | Default               | Description                                                                                                                            |\n| ----------------- | -------- | ---------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| repo-token        | `true`   | `string`               | ·                     | Set to `${{ secrets.GITHUB_TOKEN }}` to enable the Action to fetch the issues via the Github API.                                      |\n| url               | `true`   | `string`               | ·                     | Full URL of the Microblog. If it's located in a sub-folder, add that path here, too (e.g. `mysite.tld/microblog`).                     |\n| title             | `false`  | `string`               | `\u003cowner\u003e's Microblog` | The title of your Microblog.                                                                                                           |\n| description       | `false`  | `string`               | `''`                  | Optional description, that's displayed below the title in the Microblog's header.                                                      |\n| theme             | `false`  | `string`               | `'new.css'`           | Choose from ten available themes ([list of themes](#themes)).                                                                          |\n| date-format       | `false`  | `string`               | `'d.M.yyyy H:mm'`     | Format of displayed dates. Powered by [`date-fns`'s `format`-function](https://date-fns.org/v2.16.1/docs/format).                      |\n| posts-per-page    | `false`  | `number`               | `10`                  | Amount of blogposts displayed per page.                                                                                                |\n| pages             | `false`  | `string` \\| `string[]` | `'pages/*.md'`        | A glob or a list of globs pointing to markdown files, which will be rendered as static pages.                                          |\n| static-frontpage  | `false`  | `string`               | `''`                  | To show static content rather than blogposts on the frontpage, set the filename of the Markdown file, that's supposed to be displayed. |\n| custom-styles     | `false`  | `string`               | `''`                  | Path to a CSS file relative to the repo root. If set, the contents of the file will be inlined in the Microblog's HTML head.           |\n| custom-javascript | `false`  | `string`               | `''`                  | Path to a JS file relative to the repo root. The contents of the file will be inlined at the bottom of each HTML page.                 |\n| label             | `false`  | `string`               | `''`                  | Set the name of a label, that marks issues that are supposed to be published as blogposts.                                             |\n| closed            | `false`  | `boolean`              | `false`               | Set this to `true` if you want to maintain your blogposts as closed issues.                                                            |\n| out-dir           | `false`  | `string`               | `'_site'`             | Path of the output folder for the rendered site relative to the repo root                                                              |\n| static-dir        | `false`  | `string`               | `'static'`            | Path of [the static folder](#static-files) relative to the repo root                                                                   |\n| lang              | `false`  | `string`               | `'en'`                | The Microblog's language as ISO 639-1 language code.                                                                                   |\n| i18n.next         | `false`  | `string`               | `'next'`              | Label of the next-link                                                                                                                 |\n| i18n.prev         | `false`  | `string`               | `'previous'`          | Label of the prev-link                                                                                                                 |\n| i18n.posts        | `false`  | `string`               | `'Posts'`             | Label of the posts-link                                                                                                                |\n\n## Blogposts\n\nBy default every issue in a repo is published as a blogpost. **Microblog-Action** supports\nGithub-flavored Markdown with [Remark](https://remark.js.org/).\n\nTo mark an issue as a draft, add a label named `WIP` or `wip` to it. Furthermore you can limit the\nset of published issues by setting the `label`-option and thereby only publish issues as blogposts,\nthat have a certain label.\n\nIf the amount of open issues as a quality indicator is relevant to you, combine the `label`-option\nwith the `closed`-option and power your Microblog by closed issues that have a certain label.\n\n## Static pages\n\n**Microblog-Action** will publish every Markdown file, that matches the glob `\u003crepo\u003e/pages/*.md` as static\npage by default.\n\nTo change the source or to add more sources, adjust the `pages`-option of the action. If you e.g. want to render the repo's `README.md` and\nthe contents of a `docs/`-folder, set the `pages`-option like this:\n\n```yaml\n- name: Build Microblog\n  uses: herschel666/microblog-action@beta\n  with:\n    repo-token: ${{ secrets.GITHUB_TOKEN }}\n    url: 'https://myblog.tld/optional-path'\n    pages:\n      - 'docs/**/*.md'\n      - 'README.md'\n```\n\nBeware that **Microblog-Action** will flatten the folder-structure, so every page will end up at the\ntop-level of the site. This means, that two pages — `docs/examples.md` and `docs/api/examples.md` — will\nconflict. Only the first one will be rendered.\n\n### Frontmatter\n\n**Microblog-Action** supports frontmatter for static pages. Although currently only the\n`title`- \u0026 the `hidden`-properties are processed.\n\nIt is recommended to set the title, otherwise the file's basename is used as label in the main\nnavigation. Set the title at the beginning of a file like this.\n\n```yaml\n---\ntitle: Title of the page\n---\n```\n\nTo hide a page from the main navigation add the optional `hidden`-property to the frontmatter and set it to `true`.\n\n```yaml\n---\nhidden: true\n---\n```\n\n### Static frontpage\n\nIt's also possible to make one of the static pages the frontpage of the Microblog — in contrast to\nthe list of blogposts, that's displayed by default. Given you have a file at `\u003crepo\u003e/pages/welcome.md` that\nyou want to display on the frontpage, set the `static-frontpage`-option to `welcome.md`. The lists\nof blogposts will then be available at `/\u003cposts\u003e.html` — the actual slug of the posts's page depends\non the value of the `i18n.posts`-option.\n\n### Custom 404 page\n\nCreating a custom 404 page is pretty straight forward: create a `404.md` in the static pages folder and set it to `hidden` in the frontmatter.\n\n```\n---\nhidden: true\n---\n```\n\nThis generates a file `404.html` that your static hosting service should display in case a resouce\ncould not be found.\n\n## Themes\n\n**Microblog-Action** aims to be minimal — in general as well as when it comes to styling. That's why\nthe basic approach is to go with a class-less CSS approach. This might change in the future, though.\n\nBut for now, the available themes are basically so-called class-less CSS libraries.\n\n- [`water.css`](https://kognise.github.io/water.css/)\n- [`mvp.css`](https://andybrewer.github.io/mvp/)\n- [`awsm.css`](https://igoradamenko.github.io/awsm.css/elements.html)\n- [`bahunya`](https://kimeiga.github.io/bahunya/)\n- [`sakura.css`](https://oxal.org/projects/sakura/demo/)\n- [`style.css`](https://css-pkg.github.io/style.css/)\n- [`tufte-css`](https://github.com/edwardtufte/tufte-css)\n- [`tacit`](https://yegor256.github.io/tacit/)\n- [`new.css`](https://newcss.net/)\n- [`bullframe.css`](https://github.com/marcop135/bullframe.css)\n\nSo if you want to use the `sakura.css`-theme, set the `theme`-option to `'sakura.css'`.\n\n## Custom CSS\n\nIn case the class-less CSS lib doesn't quite do the trick there's the possiblity to add custom CSS.\nCreate a `.css`-file and assign its file path to the `custom-styles`-option. **Microblog-Action**\nwill fetch the contents of that file and inline it in the HTML head of each page.\n\n## Static files\n\n**Microblog-Action** will copy all contents of the `\u003crepo\u003e/static`-folder (if it exists) into the root of\nthe destination folder. It will flatten the directory structure when doing this. So a file like\n`/static/deeply/nested/info.txt` will end up as `_site/info.txt`.\n\nStatic files are a great way to e.g. to provide `robots.txt` and/or `humans.txt` files. Or, if\nyou're using Netlify for hosting, you can keep a\n[`netlify.toml`-file](https://docs.netlify.com/configure-builds/file-based-configuration/) in the\n`/static`-folder.\n\n## Deployment\n\n**Microblog-Action** does not care how you deploy your Microblog. It just provides the site in a\n`_site`-folder for you to do whatever you want with it.\n\n### Example \"Github Pages\"\n\nHere's a configuration for deploying your Microblog to Github Pages:\n\n```yaml\nname: Build and Deploy Microblog\n\non:\n  issues:\n    types: [opened, edited, reopened, closed, deleted, labeled, unlabeled]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Build Microblog\n        uses: herschel666/microblog-action@beta\n        with: ...\n\n      - name: Deploy Microblog\n        uses: JamesIves/github-pages-deploy-action@3.7.1\n        with:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          BRANCH: gh-pages\n          FOLDER: _site\n          CLEAN: true\n```\n\n### Example \"Netlify\"\n\nHere's a configuration for deploying your Microblog to Netlify:\n\n```yaml\nname: Build and Deploy Microblog\n\non:\n  issues:\n    types: [opened, edited, reopened, closed, deleted, labeled, unlabeled]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Build Microblog\n        uses: herschel666/microblog-action@beta\n        with: ...\n\n      - name: Deploy Microblog\n        uses: nwtgck/actions-netlify@v1.1\n        with:\n          publish-dir: './_site'\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          production-deploy: true\n          enable-pull-request-comment: false\n          enable-commit-comment: false\n        env:\n          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}\n          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}\n```\n\n### Other deployment types\n\nWhatever Github Action is able to push the contents of the `_site`-folder onto a server will be a\nvalid deployment action.\n\n## Questions\n\nI you have questions, feel free to ping me on twitter:\n[@Herschel_R](https://twitter.com/Herschel_R).\n\n---\n\nThe MIT License (MIT)\n\nCopyright (c) 2021 Emanuel Kluge\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherschel666%2Fmicroblog-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherschel666%2Fmicroblog-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherschel666%2Fmicroblog-action/lists"}