{"id":20779261,"url":"https://github.com/bolt/article","last_synced_at":"2025-04-30T19:41:29.875Z","repository":{"id":45384849,"uuid":"285356260","full_name":"bolt/article","owner":"bolt","description":"📝 Bolt Extension to add the Article FieldType","archived":false,"fork":false,"pushed_at":"2023-09-25T13:56:50.000Z","size":504,"stargazers_count":11,"open_issues_count":11,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-26T17:12:46.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/bolt.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-08-05T17:13:11.000Z","updated_at":"2024-06-19T00:14:52.446Z","dependencies_parsed_at":"2024-06-19T00:14:50.177Z","dependency_job_id":"fd9adafd-6a43-4c4d-8cdf-8f2d6d1239ea","html_url":"https://github.com/bolt/article","commit_stats":{"total_commits":73,"total_committers":8,"mean_commits":9.125,"dds":0.2465753424657534,"last_synced_commit":"8d8b59896ef83a61e9358f252e76e3d0618880ff"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Farticle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Farticle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Farticle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Farticle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bolt","download_url":"https://codeload.github.com/bolt/article/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251771097,"owners_count":21641204,"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":[],"created_at":"2024-11-17T13:26:56.757Z","updated_at":"2025-04-30T19:41:29.847Z","avatar_url":"https://github.com/bolt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📝 Bolt Article Extension\n\nThis extension provides a \"Article\" field type, which is a powerful text editor\nfor creating rich content in your [Bolt](https://boltcms.io) websites. It can\nwork with grids, embeds, typographic markup and media. The editor itself is\ndeveloped by [Imperavi][article], and is licensed for usage in Bolt.\n\nThis extension allows you to add fields of `type: article` in your\nContentTypes, as defined in `contenttypes.yaml`, like any other Field type.\n\n## Installation\n\nNote: Installation is not required if you've installed the default Bolt\nproject. In that case it's already present. If you've installed Bolt through\ndifferent means, you'll need to run the command below:\n\n```bash\ncomposer require bolt/article\n```\n\nAfter installation, you can add it to any ContentType in your\n`contenttypes.yaml`, like any other field. For example:\n\n```yaml\nblogposts:\n    name: Blogposts\n    singular_name: Blogpost\n    fields:\n        title:\n            type: text\n        slug:\n            type: slug\n            uses: title\n        content:\n            type: article\n```\n\nThe result will be like this:\n\n![](https://user-images.githubusercontent.com/1833361/90976496-ecfd2400-e53d-11ea-8f15-037c97238785.png)\n\nYou can configure the editor in `config/extensions/bolt-article.yaml`. This\nconfiguration affects all the instances of the Article field that you've\nconfigured in your ContentTypes. The default configuration looks like this:\n\n```yaml\n# Settings for Bolt Article\n\ndefault:\n  plugins: [ blockcode, buttonlink, definedlinks, inlineformat, reorder, tags, underline ]\n  source: true\n  grid:\n    classname: 'article-grid'\n    columns: 12\n    patterns:\n      '4|4|4': 'col-4|col-4|col-4'\n      '4|8': 'col-4|col-8'\n      '6|6': 'col-6|col-6'\n      '8|4': 'col-8|col-4'\n\nplugins:\n  ~\n\n```\n\n## Configuring the buttons\n\nBolt's version of Article ships with all the official plugins and options. you\ncan add or remove buttons and plugins by configuring them in the `plugins:`\nparameters. Check the official Article documentation for [all available\nbuttons][buttons]. Note that some buttons might require you to enable the\ncorresponding plugin as well. See here for a list of\n[the available plugins][plugins].\n\n## Settings\n\nWhere applicable, you can add extra settings under the `default:` key in the\n`bolt-article.yaml` configuration. See the documentation for available\nsettings.\n\nNote that this documentation uses Javascript, whilst Bolt's configuration uses\nYaml. For example, the documentation for '[Paste][paste]' has this example:\n\n```javascript\nArticleEditor('#entry', {\n    css: '/your-article-dist-path/',\n    paste: {\n        autolink: false\n    }\n});\n```\n\nIn `bolt-Article.yaml` you can add this as:\n\n```yaml\ndefault:\n  buttons: [ …]\n  plugins: [ … ]\n  css: '/your-article-dist-path/'\n  paste:\n    autolink: false\n```\n\n## Adding custom plugins\n\nIf you've written your own block or plugin for Article according to the\ndocumentation [for Creating Plugins][create-plugin] or\n[for Creating Blocks][create-block], you can add it to the editor in Bolt, by\nplacing it in `/public/assets/article/_plugins`. Then, add it to the\n`bolt-article.yaml` configuration:\n\n```yaml\ndefault:\n  buttons: [ … ]\n  plugins: [ … ]\n\nplugins:\n  myplugin: [ 'myplugin/myplugin.js', 'myplugin/myplugin.css' ]\n```\n\n## Grid setup\n\nUsing Article, you can allow the editors to insert Grid elements, splitting up\nthe \"main column\" in two or more columns, allowing them more variations for\nlaying out content.\n\nBy default, Article has a simple grid that consists of 12 columns, and allows\nthe editors to pick '4 + 4 + 4', '4 + 8', '6 + 6' and '8 + 4' as options. The\ngrid will create HTML like this:\n\n```html\n\u003cdiv class=\"article-grid\"\u003e\n    \u003cdiv class=\"col-6\"\u003e\n    …\n    \u003c/div\u003e\n    \u003cdiv class=\"col-6\"\u003e\n    …\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nOn the front end of the website, this needs to be styled correctly as CSS, in\norder to work properly. This can be done in a few ways:\n\n1. Linking to the default styles.\n2. Copy the `grid.css` file to your theme to customize it.\n3. Manually styling the grid, using your own CSS.\n\nYou can link the `grid.css` that ships with Article using the following:\n\n```twig\n\u003clink rel=\"stylesheet\" href=\"{{ asset('assets/article/grid.css', 'public') }}\"\u003e\n```\n\nIf you prefer to copy the file to your own theme, you can link it using:\n\n```twig\n\u003clink rel=\"stylesheet\" href=\"{{ asset('css/article_grid.css', 'theme') }}\"\u003e\n```\n\nAlternatively, if your theme is using Bootstrap or Bulma, you can configure\nArticle to use the grid format from your preferred framework directly. See the\ndocumentation on [using Bootstrap grid][bootstrap-grid] or [using Bulma\ngrid][bulma-grid].\n\n-------\n\nThe part below is only for _developing_ the extension. Not required for general\nusage of the extension in your Bolt Project\n\n## Running PHPStan and Easy Codings Standard\n\nFirst, make sure dependencies are installed:\n\n```bash\nCOMPOSER_MEMORY_LIMIT=-1 composer update\n```\n\nAnd then run ECS:\n\n```bash\nvendor/bin/ecs check src --fix\n```\n\n[article]: https://imperavi.com/article/\n[create-plugin]: https://imperavi.com/article/docs/how-to-create-a-plugin/\n[create-block]: https://imperavi.com/article/docs/how-to-create-a-custom-block/\n[buttons]: https://imperavi.com/article/docs/get-started/\n[plugins]: https://imperavi.com/article/plugins/\n[paste]: https://imperavi.com/article/docs/settings/paste/\n[bootstrap-grid]: https://imperavi.com/article/examples/frameworks/bootstrap-grid/\n[bulma-grid]: https://imperavi.com/article/examples/frameworks/bulma-grid/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolt%2Farticle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolt%2Farticle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolt%2Farticle/lists"}