{"id":14971016,"url":"https://github.com/defite/gatsby-theme-defite","last_synced_at":"2026-02-06T01:40:52.208Z","repository":{"id":57106875,"uuid":"223646613","full_name":"Defite/gatsby-theme-defite","owner":"Defite","description":"My personal page theme","archived":false,"fork":false,"pushed_at":"2021-06-29T08:55:18.000Z","size":2932,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T04:28:30.871Z","etag":null,"topics":["gatsby-theme","gatsbyjs","theme-ui"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Defite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-23T20:10:28.000Z","updated_at":"2022-06-03T17:35:05.000Z","dependencies_parsed_at":"2022-08-20T17:10:58.652Z","dependency_job_id":null,"html_url":"https://github.com/Defite/gatsby-theme-defite","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defite%2Fgatsby-theme-defite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defite%2Fgatsby-theme-defite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defite%2Fgatsby-theme-defite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Defite%2Fgatsby-theme-defite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Defite","download_url":"https://codeload.github.com/Defite/gatsby-theme-defite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240271520,"owners_count":19774859,"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":["gatsby-theme","gatsbyjs","theme-ui"],"created_at":"2024-09-24T13:44:30.471Z","updated_at":"2026-02-06T01:40:52.163Z","avatar_url":"https://github.com/Defite.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gatsby theme for Defite.ru\n\n![Gatsby theme for Defite.ru](https://user-images.githubusercontent.com/299118/82766238-0d75ef00-9e26-11ea-9a93-4c46a384273d.png)\n\n**[Preview live site](https://defite.ru/en/)**\n\n## Why?\n\nI wanted to store theme files separate from content files.\n\n## Installation\n\n### You don't have Gatsby site\n\n```\nnpm i --save react react-dom gatsby @defite/gatsby-theme-defite\n```\n\n### You already have Gatsby site\n\n```\nnpm i --save @defite/gatsby-theme-defite\n```\n\nIn both cases copy contents of `site` folder from the repository into your gatsby folder and replace example content with yours.\n\n## Config\n\n`gatsby-config.js` is a bit messy, but it's working and once you've configured it, you won't touch it anymore.\n\n```\nmodule.exports = {\n    plugins: [\n        {\n            resolve: '@defite/gatsby-theme-defite',\n            options: {\n                contentPath: '/content/', //root folder for posts and pages\n                siteMetadata: {\n                    en: {\n                      title: 'John Doe',\n                      description: 'Another Gatsby site',\n                    },\n                    siteUrl: 'https://another-gatsby-site.com',\n                },\n                manifestOptions: {\n                    name: 'John Doe',\n                    short_name: 'John Doe',\n                    start_url: '/',\n                    background_color: '#ffffff',\n                    theme_color: '#663399',\n                    display: 'minimal-ui',\n                    icon: 'assets/gatsby-icon.png'\n                },\n                langs: ['en'] // your menu, title of page etc.\n            }\n        }\n    ]\n}\n```\n\n## Language support\n\nThe theme supports different languages. It also works with a single language.\n\nTo support multiple languages you must add your language to `langs` array in `gatsby-config.js`. First item in the array will be your default language and also it will be shown on on `/` url.\n\n## Menu\n\nMenu is created automatically from your pages. You can control order of menu items and which page to show.\n\n```\n---\nshowInMenu: true // false to not to show \nmenuOrder: 2\n---\n```\n\n### Translate pages\n\nTo translate the page for both English and Russian, I've created two Markdown pages like this:\n\n```\n- content\n  - pages\n      - home.en.md\n      = home.ru.md\n```\n\nInsude `home.en.md` you will find this:\n\n```\n---\ntemplateKey: home\npath: /en/\ntitle: Home\n---\n```\n\nFor russian (or default) I use this template:\n\n```\n---\ntemplateKey: home\npath: /\ntitle: Home\n---\n```\n\n### Translate posts\n\nPosts dir have a little bit different structure:\n\n```\n- content\n  - posts\n    - en\n      - hello-world.en.md\n    - ru\n      - hello-world.ru.md\n```\n\nI did this not to create chaos inside the posts directory. I hope it will fit everybody's needs.\n\nInside `hello-worlds.ru.md` you'll find:\n\n```\n---\ntemplateKey: blog-post\npath: /blog/hello-world\ntitle: Hello world\nexcerpt: console.log('Hello world');\ndate: \"2018-01-02T08:45:09.284Z\"\npublished: true\n---\n```\n\n`published` key is for making published or draft posts. It is convenient for systems like [Forestry](https://forestry.io).\n\n`excerpt` key is for making short descriptions of the post in the blog listing page.\n\n### Post preview image\n\n![Post preview image](https://user-images.githubusercontent.com/299118/82766167-6ee98e00-9e25-11ea-9358-3e61f9909ba0.png)\n\nIn order to add preview image for post, add `coverImg` key to markdown:\n\n```\n---\ncoverImg: /uploads/your-cover-image.jpg\n---\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefite%2Fgatsby-theme-defite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefite%2Fgatsby-theme-defite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefite%2Fgatsby-theme-defite/lists"}