{"id":13559016,"url":"https://github.com/elytre/elytre","last_synced_at":"2025-04-03T14:30:57.324Z","repository":{"id":42728677,"uuid":"281988690","full_name":"elytre/elytre","owner":"elytre","description":"Build online book stores in a snap","archived":false,"fork":false,"pushed_at":"2024-09-11T22:03:18.000Z","size":2395,"stargazers_count":7,"open_issues_count":38,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T03:48:22.114Z","etag":null,"topics":["books","bookstore","serverless","static-site","static-site-generator"],"latest_commit_sha":null,"homepage":"https://elytre.app","language":"TypeScript","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/elytre.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":"2020-07-23T15:27:29.000Z","updated_at":"2024-12-12T08:43:43.000Z","dependencies_parsed_at":"2024-11-04T10:42:10.872Z","dependency_job_id":null,"html_url":"https://github.com/elytre/elytre","commit_stats":{"total_commits":307,"total_committers":3,"mean_commits":"102.33333333333333","dds":"0.16612377850162863","last_synced_commit":"5da7a252d3aff163d2fb0c1683b14a4b403d9b8b"},"previous_names":["iwazaru/walden"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elytre%2Felytre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elytre%2Felytre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elytre%2Felytre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elytre%2Felytre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elytre","download_url":"https://codeload.github.com/elytre/elytre/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247018312,"owners_count":20869991,"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":["books","bookstore","serverless","static-site","static-site-generator"],"created_at":"2024-08-01T12:05:17.656Z","updated_at":"2025-04-03T14:30:56.848Z","avatar_url":"https://github.com/elytre.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","serverless"],"sub_categories":[],"readme":"# elytre\n\n[![npm](https://img.shields.io/npm/v/elytre)](https://www.npmjs.com/package/elytre)\n[![CI](https://github.com/elytre/elytre/workflows/CI/badge.svg)](https://github.com/elytre/elytre/actions?query=workflow%3ACI)\n\nElytre is a tool to build a serverless online bookstore with a search engine\nfrom a catalog file.\n\n\u003ca href=\"build-process.png\"\u003e\n  \u003cimg\n    src=\"build-process.png\"\n    alt=\"A schema explaining that elytre uses a catalog.yaml file to create a website\"\n    width=\"700\"\n  /\u003e\n\u003c/a\u003e\n\n⚠ Elytre is still in early development and it would be unwise to use it in\nproduction at that stage. Expect breaking changes, strange bugs, broken tests\nand missing documentation until 1.0 is released (hopefully in 2021).\n\n## Install\n\nRequirements:\n\n- Node v14.15+\n- Yarn\n\n1. Create an empty directory for your project\n2. Initialize yarn: `yarn init`\n3. Add Elytre: `yarn add --exact elytre`\n4. Add both `start` and `build` scripts to your package.json:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"elytre start\",\n    \"build\": \"elytre build\"\n  }\n}\n```\n\n## Usage\n\nFor your elytre site to be built successfully, your project directory will\nrequire at least three files:\n\n- a `site.yaml` file specifying your site's info and configuration (see\n  [Site config file specification](#site-config-file-specification) below)\n- a `catalog.yaml` file describing your books catalog (see\n  [Catalog file specification](#catalog-file-specification) below).\n- a `styles.css` stylesheet to customize your site's appearance (see\n  [Stylesheet file specification](#stylesheet-file-specification) below).\n\nOptionnaly, you can add to your project directory:\n\n- a `public` directory containing assets that will be copied to the build\n  directory and can be referenced from your `styles.css` or `site.yaml` files\n- a `covers` directory containing cover images. Image file names must match the\n  following pattern: `{ean}.jpg` (e.g. `9781234567890.jpg`), and the ean in an\n  image file name must match the ean of a product described in the catalog.\n- a `pages` directory containg custom pages using the MDX format. Page file\n  names must match the following pattern: `{slug}.mdx`, where `slug` will be\n  used for the custom page url. An `about.mdx` file will be available at\n  `/pages/about`. [MDX](https://mdxjs.com/) is a extension for the\n  [markdown](https://daringfireball.net/projects/markdown/syntax) format that\n  supports JSX and allows importing React components.\n\n### Site config file specification\n\nCustomize your site's configuration by adding a `site.yaml` file in your\nproject's directory.\n\n```yaml\n# The site's title, as displayed in site's header and browser's tab\ntitle: Les Éditions Paronymie\n# The site's base url, with no trailing slash\nbaseUrl: https://paronymie.elytre.app\n# The site menus\nmenus:\n  # Menu's slot can be header, nav or footer\n  header:\n  footer: …\n  nav:\n    # Menu contains a list of entries with a label (text) and a link (url)\n    - label: About\n      link: /pages/about\n    - label: contact\n      link: /contact/\n```\n\n### Catalog file specification\n\nCustomize your products catalog by adding a `catalog.yaml` file in your\nproject's directory.\n\n```yaml\nglobal: # global properties are applied to all products\n  buyLink: https://www.librairiepartenaire.com/buy/:ean\nproducts:\n  # A product\n  - ean: 9781234567890\n    title: Chaussons d'ours\n    author: Laetitia Mani\n    contributors:\n      - name: Claude Monet\n        role: Cover artist # or \"Author\" or \"Translator\" or \"Photographer\"\n    releaseDate: 2021-01-04\n    pageCount: 641\n    originalLanguage: en # or \"fr\" or \"de\"\n    backCoverText: | # Markdown format\n      *« Lorem ipsum dolor sit amet, consectetur adipiscing elit. »*\n\n      Vivamus pharetra at tortor nec cursus. Proin accumsan sagittis molestie. Suspendisse euismod dolor quis elit egestas vulputate. Maecenas et nisl nec dui ullamcorper aliquam nec at erat. Praesent in nunc elit. Nam metus ante, ultrices sit amet lacinia non, feugiat vitae ligula. Mauris sollicitudin rutrum justo egestas dignissim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi euismod justo nec ipsum dapibus varius.\n      Praesent ac auctor velit. Phasellus metus eros, dignissim eu ex consectetur, aliquam rutrum massa. Ut pharetra tellus tortor, eu dictum felis euismod ac. Nullam ut accumsan risus, sit amet consectetur leo. Nunc tristique posuere eros, sit amet condimentum neque consequat eu.\n      Proin sollicitudin, lacus eleifend ullamcorper laoreet, turpis ante aliquet arcu, sit amet consectetur libero libero in dolor.\n\n      Quisque sodales ipsum eget lectus cursus pharetra. Nam eu eleifend ipsum.\n    extras:\n      - type: youtube # Add an embed youtube video to product's page\n        href: https://www.youtube.com/watch?v=dQw4w9WgXcQ\n    reviews:\n      - text: Un très grand talent de la littérature poire.\n        author: Mélodie\n        source: Librairie L'Arbre à Nèfles – Paris\n        sourceUrl: https://www.arbreanefles.com\n\n  # Another product\n  - ean: 9781234567811\n    title: Sous-sol\n    author: Matt Yassenar\n```\n\n### Stylesheet file specification\n\nCustomize your site's appearance by adding a `styles.css` file in your project's\ndirectory.\n\n```css\n.ElytreSite {\n  /* This is a global wrapper for all your site. Here you can set page width,\n  margins, etc. */\n}\n\n.Header {\n  /* How the site header is displayed */\n}\n\n.Header .Menu {\n  /* How the header menu is displayed */\n}\n\n.Header .Menu .MenuEntry {\n  /* How a single entry is displayed in the header menu */\n}\n\n.Product {\n  /* How a product is displayed */\n}\n\n.Product .Product-cover-image {\n  /* How a product cover image is displayed */\n}\n\n.Product .Product-infos {\n  /* How a product's infos (title, author, ean) are displayed */\n}\n\n.Product .Product-title {\n  /* How a product's title is displayed */\n}\n\n.ProductList {\n  /* How a list of products is displayed */\n}\n\n.ProductList .Product {\n  /* How a product is displayed when in a list of products */\n}\n\n.HomeView .ProductList .Product {\n  /* How a product appears when in a list on home page */\n}\n\n.ProductView .Product {\n  /* How a product is displayed when on a single product page */\n}\n\n.Error404View .Error404View-title {\n  /* How a title appears on a 404 error page */\n}\n\n.Error404View .Error404View-reason {\n  /* How the reasons appears if provided on a 404 error page */\n}\n\n.Footer {\n  /* How the site footer is displayed */\n}\n\n.Footer-powered-by {\n  /* The \"Powered by Elytre\" text in the footer can be hidden (please don't!)\n  or made more discreet here */\n}\n```\n\n### Once you've created these files, you can:\n\n#### Build your elytre site for production\n\n```console\n$ yarn build\n```\n\nThis will build your website for production in a `build` directory, ready for\ndeployment. You can serve this directory using any web server or static website\nhost.\n\n#### Start elytre in development mode:\n\n```console\n$ yarn start\n```\n\nThis will spin a local webserver for development on. Open http://localhost:1854/\nto view it in your browser. The page will reload automatically if you edit files\nin your project's directory.\n\n## Tests\n\nLint code inside this repository with:\n\n```console\n$ yarn lint\n```\n\nRun tests inside this repository with:\n\n```console\n$ yarn test\n```\n\n## Development\n\nElytre is made of two main parts:\n\n- `template/src`: a template React site that is merged with user's customization\n  files to build the final elytre site\n- `build/src`: a node tool that builds the final elytre site using the React\n  template and user's customization file\n\nBoth are written in Typescript and needs to be transpiled before it can be used.\n\n```console\n$ yarn build\n```\n\nFiles are linted, tested and transpiled before the package is published to npm.\n\nDuring development, template files can be watched and transpiled as they are\nchanged:\n\n```console\n$ yarn dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felytre%2Felytre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felytre%2Felytre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felytre%2Felytre/lists"}