{"id":16108558,"url":"https://github.com/pluja/blogo","last_synced_at":"2025-04-04T22:02:54.706Z","repository":{"id":191379715,"uuid":"684638602","full_name":"pluja/blogo","owner":"pluja","description":"A lightweight blogging engine that backs itself up to Nostr!","archived":false,"fork":false,"pushed_at":"2024-10-15T06:25:48.000Z","size":660,"stargazers_count":155,"open_issues_count":5,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T21:05:20.783Z","etag":null,"topics":["blog","blog-engine","blog-platform","blogging","go","golang","nostr","nostr-protocol"],"latest_commit_sha":null,"homepage":"https://blogo.site","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/pluja.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-29T14:49:52.000Z","updated_at":"2025-03-19T22:49:54.000Z","dependencies_parsed_at":"2023-08-29T16:39:57.210Z","dependency_job_id":"46058790-37b2-4474-bdc4-082d494989bb","html_url":"https://github.com/pluja/blogo","commit_stats":null,"previous_names":["pluja/blogo"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluja%2Fblogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluja%2Fblogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluja%2Fblogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluja%2Fblogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pluja","download_url":"https://codeload.github.com/pluja/blogo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256104,"owners_count":20909240,"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":["blog","blog-engine","blog-platform","blogging","go","golang","nostr","nostr-protocol"],"created_at":"2024-10-09T19:27:17.526Z","updated_at":"2025-04-04T22:02:54.687Z","avatar_url":"https://github.com/pluja.png","language":"Go","funding_links":[],"categories":["Clients","Go"],"sub_categories":["Long form clients"],"readme":"# 🎈 [Blogo](https://blogo.site)\n\nBlogo is a light and easy blogging engine. No complicated extras, just a straightforward blog. \n\nNow, here's the twist: Blogo can also publish your posts to Nostr for backing them up and getting even more reach. **Lift your ideas higher!**\n\n## Some blogs using Blogo\n\n- [blogo.site](https://blogo.site)\n- [blog.kycnot.me](https://blog.kycnot.me)\n- [blog.kyun.host](https://blog.kyun.host)\n\n## Features\n\n- **Easy to use**:Just put Markdown files in a folder and Blogo will take care of the rest.\n- **Fast**: Blogo is written in Golang and uses BadgerDB as the backend db.\n- **Light**: Blogo is light on resources, and light on your eyes:\n    - No JS, no tracking, no cookies.\n    - No cluttered UI, focus on reading.\n    - ~10MB Docker image.\n- **Markdown**: Write your posts in Markdown.\n    - Github Flavored Markdown is supported.\n    - Syntax Highlighting using [chroma](https://github.com/alecthomas/chroma)\n    - YAML Metadata for posts info.\n- **Feeds**: RSS, Atom and JSON feeds!\n- **Raw endpoint**: Add `/raw` to any article link to get the raw markdown!\n- **About page**: Easily create an About page so everyone can know more about you.\n- **Customizable**: You can fully customize the look and feel of your blog by editing the templates and CSS.\n    - Uses Golang Templates, TailwindCSS and pure plain CSS.\n- **Nostr**: Publish your posts to Nostr for backing them up and getting more reach.\n    - Set your own key, or let Blogo generate one for you.\n    - Set your own relay list, or use the default list.\n- **Auto-reload**: When a new post is added, or changed, blogo automatically reloads it.\n- **SEO/SSNN Optimized** - Blogo is optimized for SEO, it contains all necessary meta tags and social sharing tags!\n- **No JS**: Blogo doesn't use any JavaScript, so it's widely compatible and secure.\n- **CLI Tool**: A simple CLI tool will allow you to create new post templates.\n\n## Self-hosting using Docker Compose\n\nThe easiest way to self-host Blogo is by using Docker. \n\n1. Get the docker-compose.yml:\n\n```yml\nservices:\n  blogo:\n    image: pluja/blogo:latest\n    container_name: blogo\n    restart: unless-stopped\n    volumes:\n      - ./articles:/app/articles\n    ports:\n      - \"127.0.0.1:3000:3000\"\n    environment:\n      # CONFIG\n      BLOGO_TITLE: Blogo\n      BLOGO_DESCRIPTION: A blog built with Blogo!\n      BLOGO_KEYWORDS: blog,open source\n      BLOGO_URL: http://localhost:3000\n      #BLOGO_ANALYTICS: '\u003cscript defer src=\"https://my.analytics.site/script.js\"\u003e\u003c/script\u003e'\n      TIMEZONE: UTC\n\n      # NOSTR CONFIG\n      PUBLISH_TO_NOSTR: false\n      #NOSTR_NSEC: \"\"\n      #NOSTR_RELAYS: \"wss://nostr-pub.wellorder.net,wss://relay.damus.io,wss://relay.nostr.band\"\n```\n\n2. Edit the `docker-compose.yml` file to fit your needs.\n\n3. Run blogo:\n\n```bash\ndocker compose up -d\n```\n\nBlogo is now available at [http://localhost:3000](http://localhost:3000). You can now [create your first article](#usage).\n\n## Usage\n\nUsing Blogo is pretty simple. Once you have blogo running, you can create new articles by just running `blogo -new my-post-slug`, where `my-post-slug` is the slug of the post (used in the url). This will create a new template in the `articles` folder. Edit that file with your favorite text editor. Once done, save it and Blogo will take care of the rest (yes, it auto-reloads).\n\n\u003e If you're on docker, you can run `docker exec -it blogo blogo -new my-post-slug` to create a new post.\n\n### Metadata fields\n\nBlogo uses YAML metadata to get the post info. The metadata is located at the top of the file, between `---` and `---`.\n\nHere's a list of the available metadata fields:\n\n- `Title`: The title of the post. This will also be used as the title for sharing and SEO.\n- `Author`: The author of the post.\n- `Summary`: The summary of the post. This is used in the index page. This will also be used as the description for sharing and SEO.\n- `Image`: The image of the post. This is used as the post thumbnail / header image. This will also be used as the thumbnail when sharing.\n- `Tags`: The tags of the post. Must be a list of strings. This will also be used as the keywords for SEO.\n- `Date`: The date of the post. Must be in the format `YYYY-MM-DD HH:MM`.\n- `Draft`: Whether the post is a draft or not. Must be `true` or `false`.\n- `Layout`: The layout of the post. For now, only `post` is available.\n- `NostrUrl`: The url to the Nostr content. If set to `0` it will disable the posting of that article to Nostr even if Nostr publishing is enabled.\n\n### About page\n\nTo create an about page, just create a file called `about.md` in the `articles` folder. Blogo will automatically detect it and create a link to it in the navbar.\n\n### Static Content\n\nTo add your own static content, you can just bind-mount any folder to `/app/static/your-folder`.\n\nFor example if you are using docker compose, you can add:\n\n```\nvolumes:\n    - ./img:/app/static/img\n```\n\nThen you can just use `/static/img/your-image.jpg` in the markdown to add an image.\n\n\u003e The `/app/static` folder contains the css styles needed for styling Blogo. For this, it is recommended to always create subfolders with bind mounts inside.\n\n### Publish to Nostr\n\nIf you set the `PUBLISH_TO_NOSTR` variable in the `docker-compose.yml` file to `true`, Blogo will publish your posts to Nostr. By default, Blogo will generate an ephemeral key (changes on every restart) and use a default relay list. \n\nYou can change either of these defaults by setting any of these variables in the `docker-compose.yml` file:\n\n- `NOSTR_NSEC` - expects a valid `nsec` key. If you set this key, your posts will be always published for the same key, even on restarts.\n    - You can generate a new Nostr key pair using `blogo -nkeys`.\n- `NOSTR_RELAY_LIST` - expects a comma-separated list of relays (with protocol); eg. `wss://relay1.com,wss://relay2.net`.\n\n\u003e You can avoid publishing a particular post to Nostr by setting the `NostrUrl` metadata field in the post to `false` or `0`.\n\n\u003e Posts are published to Nostr as [Long-Form events](https://github.com/nostr-protocol/nips/blob/master/23.md) following the definition in [NIP-33](https://github.com/nostr-protocol/nips/blob/master/33.md#referencing-and-tagging).\n\n### Add analytics\n\nYou can add analytics to your blog by setting the `BLOGO_ANALYTICS` variable in the `docker-compose.yml` file to your analytics script. Blogo will automatically add it to the bottom of the page. **Make sure to put it all in a single line**!\n\n```env\nBLOGO_ANALYTICS='\u003cscript defer src=\"https://my.analytics.site/script.js\"\u003e\u003c/script\u003e'\n```\n\n## Customization\n\nYou can customize the look and feel of your blog by editing the templates and CSS. \n\n### Templates\n\nThe templates are located in the `templates` folder:\n\n- `base.html`: The base template. All other templates extend this one.\n    - Receives: A [Config](https://github.com/pluja/blogo/-/blob/main/blogo/models.go) struct with the name `Blogo`.\n- `index.html`: The index template. This is the template used for the index page, where the posts are listed.\n    - Receives: a list of articles [[]Article](https://github.com/pluja/blogo/-/blob/main/blogo/models.go) and the welcome text (string).\n- `post.html`: The post template. This is the template used for the post reading page.\n    - Receives: an [Article](https://github.com/pluja/blogo/-/blob/main/blogo/models.go).\n- `about.html`: The about template. This is the template used for the about page.\n\n### Styles\n\nThe templates are written in Golang Templates, and the CSS is written in TailwindCSS and pure CSS. Feel free to tweak them to your liking.\n\nThe CSS is located in the `static/css` folder. \n\nThe main content makes use of TailwindCSS classes, so you can just tweak that to your liking. Note: You will need to rebuild the TailwindCSS using `npx` for new classes to apply.\n\n\u003e The rendered Markdown is styled with pure CSS. You can tweak that in the `static/css/markdown.css` file. All markdwon is wrapped inside a `div` with the `markdown` id, so you can use that to style it.\n\n#### Adding more stylesheets\n\nYou can easily add custom stylesheets to any page. Place the stylesheet into the `static/css/ ` folder. Then, just use the `extra` block from the template to link them. (take a look at the `post.html` template and look for the `extra` block to see how it's done).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluja%2Fblogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpluja%2Fblogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluja%2Fblogo/lists"}