{"id":20063413,"url":"https://github.com/vanilla-os/chronos","last_synced_at":"2025-05-05T17:32:49.338Z","repository":{"id":179974646,"uuid":"659103380","full_name":"Vanilla-OS/Chronos","owner":"Vanilla-OS","description":"Chronos is a simple, fast and lightweight documentation server written in Go.","archived":false,"fork":false,"pushed_at":"2025-03-20T18:51:40.000Z","size":221,"stargazers_count":24,"open_issues_count":10,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-05T09:39:28.243Z","etag":null,"topics":["chronos","documentation","documentation-server","hacktoberfest","vanillaos"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vanilla-OS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":"vanilla-os","liberapay":"fabricators"}},"created_at":"2023-06-27T06:34:24.000Z","updated_at":"2025-04-04T03:42:44.000Z","dependencies_parsed_at":"2023-10-13T00:01:17.435Z","dependency_job_id":"55fdd51f-908f-4d38-9b0c-4762889cfae9","html_url":"https://github.com/Vanilla-OS/Chronos","commit_stats":null,"previous_names":["vanilla-os/chronos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanilla-OS%2FChronos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanilla-OS%2FChronos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanilla-OS%2FChronos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vanilla-OS%2FChronos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vanilla-OS","download_url":"https://codeload.github.com/Vanilla-OS/Chronos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542408,"owners_count":21764962,"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":["chronos","documentation","documentation-server","hacktoberfest","vanillaos"],"created_at":"2024-11-13T13:42:07.216Z","updated_at":"2025-05-05T17:32:48.936Z","avatar_url":"https://github.com/Vanilla-OS.png","language":"Go","funding_links":["https://github.com/sponsors/vanilla-os","https://liberapay.com/fabricators"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"chronos.svg\" height=\"128\"\u003e\n    \u003ch1\u003eChronos\u003c/h1\u003e\n    \u003cp\u003eA simple, fast and lightweight documentation server written in Go.\u003c/p\u003e\n    \u003chr /\u003e\n\u003c/div\u003e\n\n## Features\n\n- API based response\n- Markdown support\n- Search\n- Localization\n- Git based and/or local articles storage\n- Ristretto based cache (more cache backends coming soon)\n- Multi-repository support\n\n## Configuration\n\nEdit the `config/chronos.json` file to configure the server.\n\n## Run (dev)\n\n```bash\ngo run main.go\n```\n\n## Build\n\n```bash\ngo build -o chronos main.go\n```\n\n## Run (prod)\n\n```bash\n./chronos\n```\n\n## Repositories\n\nChronos supports multiple repositories, both local and Git based. This allows you\nto have a single server for multiple projects or multiple repositories for a single project.\n\nRepositories can be configured in the `chronos.json` file as follows:\n\n```json\n{\n  \"port\": \"8080\",\n  \"gitRepos\": [\n    {\n      \"id\": \"vosDocs\",\n      \"url\": \"https://github.com/Vanilla-OS/documentation\"\n    },\n    {\n      \"id\": \"vosVib\",\n      \"url\": \"https://github.com/Vanilla-OS/vib\",\n      \"rootPath\": \"docs/articles\"\n    }\n  ],\n  \"localRepos\": [\n    {\n      \"id\": \"myAwesomeProject\",\n      \"path\": \"/myAwesomeProject/documentation\"\n    }\n  ]\n}\n```\n\nEach repository must have a unique `id`, Chronos requires it to identify the repository\nwhen requesting articles.\n\n### Local repositories\n\nEach local repository must contain an `articles` folder with the following structure:\n\n```txt\ndocumentation\n├──articles\n├─── en\n│    └─── article1.md\n└─── it\n     └─── article1.md\n```\n\n### Git repositories\n\nYou can use a Git repositories as well, just add them to the `GitRepos` array in the `chronos.json` file,\nChronos will automatically clone them and update on each restart.\n\n## Background updates\n\nIn the current version, automatic updates are in experimental stage and are not yet fully implemented.\n\n## Article Structure\n\nEach article must have a specific structure, here's an example:\n\n```markdown\n---\nTitle: My Awesome Article\nDescription: This is a test article written in English.\nPublicationDate: 2024-02-16\nAuthors: [johnDoe]\nTags: [tag1, tag2]\n---\n\n# My Awesome Article\n\nThis is a test article written in English.\n```\n\nThe article must start with a YAML header, followed by the article body.\n\n## API Reference\n\n### Get Status\n\nGet the status of the server.\n\n- **URL**: `http://localhost:8080/`\n- **Method**: GET\n- **Response**:\n\n```json\n{\n  \"status\": \"ok\"\n}\n```\n\nCheck if a repository is available.\n\n- **URL**: `http://localhost:8080/{repoId}`\n- **Method**: GET\n- **Response**:\n\n```json\n{\n  \"status\": \"ok\"\n}\n```\n\n### Get Repos\n\nGet a list of available repositories.\n\n- **URL**: `http://localhost:8080/repos`\n- **Method**: GET\n- **Response**:\n\n```json\n\n  {\n    \"Id\": \"remote1\",\n    \"Count\": 52,\n    \"Languages\": [\n      \"bn\",\n      \"de\",\n      \"en\",\n      \"es\",\n      \"fr\",\n      \"pl\",\n      \"ta\",\n      \"th\",\n      \"uk\"\n    ],\n    \"FallbackLang\": \"\",\n    \"FallbackEnabled\": false\n  },\n  {\n    \"Id\": \"remote2\",\n    \"Count\": 8,\n    \"Languages\": [\n      \"en\"\n    ],\n    \"FallbackLang\": \"\",\n    \"FallbackEnabled\": false\n  },\n  {\n    \"Id\": \"remote3\",\n    \"Count\": 1,\n    \"Languages\": [\n      \"en\"\n    ],\n    \"FallbackLang\": \"\",\n    \"FallbackEnabled\": true\n  }\n]\n```\n\n### Get Articles\n\nGet a list of articles, grouped by language.\n\n- **URL**: `http://localhost:8080/{repoId}/articles/{lang}`\n- **Method**: GET\n- **Response**:\n\n```json\n{\n  \"title\": \"repoId\",\n  \"SupportedLang\": [\"en\", \"it\"],\n  \"tags\": [\"tag1\", \"tag2\"],\n  \"articles\": {\n    \"en\": {\n      \"articles_repo/articles/en/test.md\": {\n        \"Title\": \"Test Article\",\n        \"Description\": \"This is a test article written in English.\",\n        \"PublicationDate\": \"2023-06-10\",\n        \"Authors\": [\"mirkobrombin\"],\n        \"Tags\": [\"tag1\", \"tag2\"],\n        \"Body\": \"...\"\n      }\n    },\n    \"it\": {\n      \"articles_repo/articles/it/test.md\": {\n        \"Title\": \"Articolo di Test\",\n        \"Description\": \"Questo è un articolo di test scritto in italiano.\",\n        \"PublicationDate\": \"2023-06-10\",\n        \"Authors\": [\"mirkobrombin\"],\n        \"Tags\": [\"tag2\"],\n        \"Body\": \"...\"\n      }\n    }\n  }\n}\n```\n\n### Get Supported Languages\n\nGet a list of supported languages.\n\n- **URL**: `http://localhost:8080/{repoId}/langs`\n- **Method**: GET\n- **Response**:\n\n```json\n{\n  \"SupportedLang\": [\"en\", \"it\"]\n}\n```\n\n### Get Article by Language and Slug\n\nGet a specific article by providing its language and slug.\n\n- **URL**: `http://localhost:8080/{repoId}/articles/en/test`\n- **Method**: GET\n- **Response**:\n\n```json\n{\n  \"Title\": \"Test Article\",\n  \"Description\": \"This is a test article written in English.\",\n  \"PublicationDate\": \"2023-06-10\",\n  \"Authors\": [\"mirkobrombin\"],\n  \"Body\": \"...\"\n}\n```\n\n### Search Articles\n\nSearch articles based on a query string.\n\n- **URL**: `http://localhost:8080/{repoId}/search/{lang}?q=test`\n- **Method**: GET\n- **Response**:\n\n```json\n[\n  {\n    \"Title\": \"Test Article\",\n    \"Description\": \"This is a test article written in English.\",\n    \"PublicationDate\": \"2023-06-10\",\n    \"Authors\": [\"mirkobrombin\"],\n    \"Body\": \"...\"\n  }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanilla-os%2Fchronos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanilla-os%2Fchronos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanilla-os%2Fchronos/lists"}