{"id":13707031,"url":"https://github.com/HexmosTech/glee","last_synced_at":"2025-05-05T23:32:00.494Z","repository":{"id":191665760,"uuid":"685121598","full_name":"HexmosTech/glee","owner":"HexmosTech","description":"Dev-friendly Blogging Setup","archived":false,"fork":false,"pushed_at":"2024-12-08T13:48:39.000Z","size":9892,"stargazers_count":60,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-08T14:30:03.889Z","etag":null,"topics":["cli","ghost-blog","markdown","markdown-to-html"],"latest_commit_sha":null,"homepage":"https://hexmos.com/glee","language":"Go","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/HexmosTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2023-08-30T15:02:48.000Z","updated_at":"2024-12-08T13:48:14.000Z","dependencies_parsed_at":"2023-10-03T23:57:01.752Z","dependency_job_id":"a7c68be2-e898-4a88-8a19-11a99f1c3bdd","html_url":"https://github.com/HexmosTech/glee","commit_stats":null,"previous_names":["hexmostech/glee"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexmosTech%2Fglee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexmosTech%2Fglee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexmosTech%2Fglee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HexmosTech%2Fglee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HexmosTech","download_url":"https://codeload.github.com/HexmosTech/glee/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252593256,"owners_count":21773436,"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":["cli","ghost-blog","markdown","markdown-to-html"],"created_at":"2024-08-02T22:01:16.075Z","updated_at":"2025-05-05T23:31:58.965Z","avatar_url":"https://github.com/HexmosTech.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# glee: Dev-friendly Blogging Setup\n\n\u003cdiv align=\"center\"\u003e\n\n[![glee go binary release](https://github.com/HexmosTech/glee/actions/workflows/go-release.yml/badge.svg)](https://github.com/HexmosTech/glee/actions/workflows/go-release.yml)\n\n\u003c/div\u003e\n\n\u003cimg src=\"assets/glee-readme-banner.png\" width=\"90%\" /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://www.producthunt.com/posts/glee-2?utm_source=badge-top-post-badge\u0026utm_medium=badge\u0026utm_souce=badge-glee\u0026#0045;2\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=418974\u0026theme=light\u0026period=daily\" alt=\"glee - Dev\u0026#0045;friendly\u0026#0032;blogging\u0026#0032;setup | Product Hunt\" style=\"margin-top:20px;width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Overview\n\nMost technical teams struggle to put together a modern and dev-friendly blogging setup.\nOur free product `glee` helps your devs compose, backup \u0026 collaborate on blog posts using markdown files\nso that they can ship awesome content without frustration.\n\nWith glee, you can create and update [Ghost](https://ghost.org/) blogs. Since glee operates on plain markdown files, your blog posts are now git-friendly, allowing for easy collaboration.\n\n`glee` command will read **metadata** from the YAML preface of your Markdown post ([sample_post.md](https://github.com/HexmosTech/glee/blob/main/sample_post.md?plain=1)), convert the post content into HTML, Store the content images either in your Ghost database or on AWS S3, and then publish them to your Ghost platform. Set up the `glee` CLI tool with a single command.\n\n## Benefits\n\n- Publish markdown files into Ghost blog post\n- Install and configure with minimal effort\n- Multiple image backends (AWS S3, ghost)\n- Create and update posts with a single command\n- Support for syntax highlighting and Table of Contents\n- Collaborate with content writers in your team\n- Create various titles for your blog post\n- 100% Free and Open Source Software\n\n## Watch Demo\n\n[![IMAGE ALT TEXT](http://img.youtube.com/vi/nlM4b65_GSU/0.jpg)](http://www.youtube.com/watch?v=nlM4b65_GSU \"glee: Dev-friendly Blogging Setup\")\n\n## Installation/Update\n\nRun the following command to either install or update `glee`:\n\n### For Linux/MacOS systems or Linux via [WSL](https://ubuntu.com/wsl):\n\n```bash\nwget -O - https://raw.githubusercontent.com/HexmosTech/glee/main/install.sh | bash\n```\n\n### For Windows:\n\nOpen the Command Prompt (cmd) as an administrator and execute the following command:\n\n```cmd\npowershell -Command \"(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/HexmosTech/glee/main/install.bat', 'install.bat'); Start-Process 'install.bat';\"\n```\n\nAlternatively, you can download the [executable (exe) file](https://github.com/HexmosTech/glee/releases) and then move it into the `system32` folder using the command:\n\n```cmd\nMove-Item -Path \"C:\\Path\\to\\Downloads\\glee_windows.exe\" -Destination \"C:\\Windows\\system32\\glee.exe\"\n```\n\nNote: If you encounter any security issues on Windows, turn off the [Real-time protection](https://support.microsoft.com/en-us/windows/turn-off-defender-antivirus-protection-in-windows-security-99e6004f-c54c-8509-773c-a4d776b77960) in the virus and threat protection settings.\n\n## Configuration\n\nAfter the installation, `glee` will create a configuration file ([.glee.toml](https://github.com/HexmosTech/glee/blob/main/.glee.toml)) in your home directory.\n\nOpen the configuration file `$HOME/.glee.toml` and modify the ghost, image backend and AWS S3 credential (optional).\n\n### Ghost Configuration\n\n#### Ghost Admin API Key\n\nAdmin API keys are used to generate short-lived single-use JSON Web Tokens (JWTs), which are then used to authenticate a request (GET,POST,PUT) using Ghost Admin API.\n\n- Admin API keys can be obtained by creating a new Custom Integration under the Integrations screen in Ghost Admin.\n \u003cp align=\"left\"\u003e\n  \u003ca href=\"\"\u003e\n  \u003cimg alt=\"img-name\" src=\"assets/glee-custom-integration.png\" width=\"450\"\u003e \n    \u003cbr/\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\n- Save the Custom Integration and Copy the Admin API Key to [.glee.toml](https://github.com/HexmosTech/glee/blob/main/.glee.toml) file.\n\n \u003cp align=\"left\"\u003e\n  \u003ca href=\"\"\u003e\n  \u003cimg alt=\"img-name\" src=\"assets/glee-admin-api-edited.jpg\" width=\"450\"\u003e \n    \u003cbr/\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\n#### Ghost Version\n\nInclude the Ghost platform version in the TOML file.\nYou can find the version in the Ghost admin settings.\nThe version notation is as follows: 'v4' represents version 4, 'v5' represents version 5, and so forth.\n\n \u003cp align=\"left\"\u003e\n  \u003ca href=\"\"\u003e\n  \u003cimg alt=\"img-name\" src=\"assets/ghost -version.png\" width=\"450\"\u003e \n    \u003cbr/\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\n#### Ghost URL\n\nThe `GHOST_URL` represents the domain where your Ghost blog is hosted.\n\n### Blog Configuration\n\nThe `blog-configuration` section in the `.glee.toml` file serves as the global configuration for all blog posts published using `glee`. For instance, if `sidebar_toc` is set to `true` in the `blog-configuration`, then all blog posts published through glee will have the sidebar table of contents enabled. However, you have the flexibility to customize the configuration for individual blogs by utilizing the local configuration defined within the `YAML` structure of your markdown file.\n\n### Image Storage Backend Configuration\n\nAll images in the markdown file can be stored either in your `ghost database` or an `AWS S3` bucket. We calculate the hash for each image and use that as the filename in `s3`. This ensures that each unique image is stored only once in the server and that there are no naming conflicts.\n\n1. **Your Ghost Database (default)**\n\nYou can store the image in the same db where your content resides. To use Ghost as an image backend provide\n\n```toml\n[image-configuration]\n\nIMAGE_BACKEND = \"ghost\"\n```\n\nin the [.glee.toml](https://github.com/HexmosTech/glee/blob/main/.glee.toml#L13) file.\n\n2. **AWS S3**\n\nOr, you can store the images in your `AWS S3` bucket as well. To use `S3` as an image backend provide\n\n```toml\n[image-configuration]\n\nIMAGE_BACKEND = \"s3\"\n```\n\nin the [.glee.toml](https://github.com/HexmosTech/glee/blob/main/.glee.toml#L13) file.\n\nAlso, Configure the `S3` Credentials in the [.glee.toml](https://github.com/HexmosTech/glee/blob/main/.glee.toml) file.\n\nFind further [information](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) and [tutorial](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) to learn more about `AWS S3`.\n\n## Usage\n\nAfter installation and configuration, you can convert Markdown file into a Ghost blog post using the following command:\n\n```bash\nglee your-post.md\n```\n\n## Markdown File Structure\n\nThe Markdown file used by `glee` consists mainly of two parts:\n\n- A YAML Interface for metadata\n- Content\n\n```markdown\n---\nyaml\n---\n\n[TOC]\nyour content\n```\n\n### Example markdown file\n\nSee [sample_post.md](https://github.com/HexmosTech/glee/blob/main/sample_post.md?plain=1) for learning how to structure an example post.\nFind additional field reference in [official docs](https://ghost.org/docs/admin-api/#posts).\n\n## Features\n\n\n### Platform-Specific Titles\nWith glee, you can customize the title of your article for users coming from various platforms such as Reddit, HN, Medium, etc. The `yaml` syntax for handling multiple titles is as follows:\n\nFirst, include the below code snippet in the `Admin Dashboard -\u003e Settings -\u003e Code Injection -\u003e Site Header`:\n\n```js\n\u003cscript\u003e\nfunction changetitle(title_data_str) {\n    document.addEventListener(\"DOMContentLoaded\", function() {\n        {\n            const urlParams = new URLSearchParams(window.location.search);\n            const articleTitleElement = document.querySelector('.article-title');\n            const title = title_data_str;\n            if (urlParams.has('src')) {\n                {\n                    const srcValue = urlParams.get('src');\n                    if (title[srcValue] !== undefined) {\n                        {\n                            articleTitleElement.textContent = title[srcValue];\n                            document.title = title[srcValue];\n                        }\n                    }\n                }\n            }\n        }\n    });\n}\n\u003c/script\u003e\n```\n\nThen, inside the YAML file:\n\n```yaml\ntitle:\n   default: new default title\n   hn: title from glee for HN\n   reddit: title from glee for Reddit\n   ....\n   ....\n```\n\nIf you only need a single title, use the following syntax:\n\n```yaml\ntitle: your default title\n```\n\nAdditionally, you can enhance the user experience by adding the following CSS style to create a transition effect when switching titles:\n\n```css\n\u003cstyle\u003e\n    .article-title {\n      opacity: 0;\n       filter: blur(3px);\n      animation: fadeIn 1s ease 1s forwards;\n    }\n\n    @keyframes fadeIn {\n      to {\n        opacity: 1;\n         filter: blur(0px);\n      }\n    }\n\u003c/style\u003e\n```\n\nInclude the above code snippet in the `Admin Dashboard -\u003e Settings -\u003e Code Injection -\u003e Site Header`.\n\nRemember to specify the `src` query parameter when sharing your article on platforms. For example: https://journal.hexmos.com/spam-detection-ml/?src=reddit\n\n### Download and Replace Remote Images\n\nBy utilizing the `-i` or `--download-image` flag, you can conveniently download remote images referenced in the blog post. These images will be stored in the `images` directory within the current folder. Moreover, glee will automatically replace the remote image URLs (`![Markdown Logo](https://markdown-here.com/img/icon256.png)`) with their respective local paths (`![Markdown Logo](images/icon256.png)`) in the Markdown file.\n\n\n### Specifying author\n\nThe `authors` field in the markdown frontmatter can specify multiple\n**staff emails**. Note that this is different from _member emails_.\n\n### Draft vs Publishing\n\nThe YAML field `status` determines status of the post. Pick `status: draft` or `status: published`\nas required.\n\n### Slug field to support updating\n\nIf your post doesn't contain a `slug` field (post name in the URL), then `glee` will not publish.\nThis is to help with future updates/edits from the markdown file. If you see this error, give a url\nfriendly fragment as `slug` in your markdown:\n\n\u003e ERROR: Include a URL friendly slug field in your markdown file and retry! This is required to support updates\n\n### Automatically generate Table of Contents (TOC)\n\n`glee` support two kinds of TOC.\n\n1. TOC in Content\n\nFor Adding TOC include the string `[TOC]` in your content area:\n\n```markdown\n---\nyaml\n---\n\n[TOC]\nyour content\n```\n\n2. TOC as Sidebar\n\nThe YAML field `sidebar_toc` determines including sidebar table of content. Pick `sidebar_toc:true` or `sidebar_toc:false` as required.\n\n### Syntax Highlighting\n\nglee supports five themes: Monokai, Native, Pastie, Vim, and Fruity, for highlighting your code block. You can configure the theme globally in the glee configuration file inside `blog-post-configuration` or for a specific blog post using the `code_hilite_theme` option in the YAML structure. The default theme is Monokai.\n\nLanguages supported: https://pygments.org/languages/\n\nFenced code blocks docs: https://python-markdown.github.io/extensions/fenced_code_blocks/\n\n### Collaboration\n\nWhen multiple team members are working simultaneously on the same Ghost blog, they can collaborate seamlessly using any version control system. `glee` will update the blog content with each `glee` command.\n\n## Debugging\n\nUtilize the `--debug` or `-d` option with your glee command to uncover underlying issues.\n\n```bash\n glee sample_post.md --debug\n```\n\n## View Global Configuration\n\nUtilize the `--config` or `-c` option with your glee command to view the glee configurations.\n\n```bash\nglee sample_post.md --config\n```\n\n## Check Current Version\nUtilize the `--version` or `-v` option with glee command to check the current installed version.\n\n## Local Testing\n\nClone the repository and test the `glee` tool locally.\n\n### Option 1: Build into a go binary\n\n#### Prerequisites:\n\n1. Install the Go programming language, which can be downloaded from [here](https://go.dev/doc/install).\n\nTo create a local standalone executable using Go, execute the following command:\n\n```bash\n./installbin.sh\n```\n\nOnce the installation is complete, you can easily run:\n\n```bash\nglee your-post.md\n```\n\n### Option 2: Run the Go Files Directly\n\nNavigate to the project's root directory and execute the following command:\n\n```bash\ngo run . your-post.md\n```\n\n### Blog Post about glee\n\n[glee for Ghost: Why we abandoned the Web Editor and Adopted Markdown Files](https://journal.hexmos.com/glee/)\n\n## Acknowledgement\n\n- `glee` utilizes the [Ghost Admin API](https://ghost.org/docs/admin-api/) for interaction with the Ghost blog platform.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHexmosTech%2Fglee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHexmosTech%2Fglee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHexmosTech%2Fglee/lists"}