{"id":20877552,"url":"https://github.com/ervaude/fs_code_snippet","last_synced_at":"2025-07-23T08:31:17.747Z","repository":{"id":40791672,"uuid":"48500229","full_name":"ervaude/fs_code_snippet","owner":"ervaude","description":"Extension for TYPO3 CMS to provide a code snippet content element","archived":false,"fork":false,"pushed_at":"2025-03-10T23:49:50.000Z","size":678,"stargazers_count":8,"open_issues_count":4,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-30T11:51:20.750Z","etag":null,"topics":["prismjs","typo3","typo3-cms-extension"],"latest_commit_sha":null,"homepage":"https://usetypo3.com","language":"CSS","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/ervaude.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-23T16:28:53.000Z","updated_at":"2024-05-11T08:00:49.000Z","dependencies_parsed_at":"2024-11-18T09:32:22.208Z","dependency_job_id":null,"html_url":"https://github.com/ervaude/fs_code_snippet","commit_stats":{"total_commits":116,"total_committers":6,"mean_commits":"19.333333333333332","dds":0.4568965517241379,"last_synced_commit":"c94fc45f627da216fecd43472356a59bc8678986"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/ervaude/fs_code_snippet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ervaude%2Ffs_code_snippet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ervaude%2Ffs_code_snippet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ervaude%2Ffs_code_snippet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ervaude%2Ffs_code_snippet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ervaude","download_url":"https://codeload.github.com/ervaude/fs_code_snippet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ervaude%2Ffs_code_snippet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266644832,"owners_count":23961587,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["prismjs","typo3","typo3-cms-extension"],"created_at":"2024-11-18T06:57:24.681Z","updated_at":"2025-07-23T08:31:17.701Z","avatar_url":"https://github.com/ervaude.png","language":"CSS","readme":"# EXT: fs_code_snippet\n\nfs_code_snippet is an extension for TYPO3. It implements a content element that enables you to render code snippets of various\nprogramming languages. It depends on fluid_styled_content rendering.\n\nIt makes use of the T3Editor in the backend and the code snippet library prism.js in the frontend.\n\n## Requirements\n\n* TYPO3 9 LTS or 10 LTS\n* fluid_styled_content\n* t3editor\n\n## Installation and Setup\nInstalling and configuring this extension is pretty straight forward. There are only a few things that can be configured.\n\n### Installation\n\nTo install the extension, perform the following steps:\n\n* Go to the Extension Manager\n* Install the extension\n* Load the static template\n\n###  Configuration\n\nMost configuration is done via TypoScript constants which are editable in the constant editor in the TYPO3 backend.\n\n* The TemplateRootPath can be overwritten with constant `{$plugin.tx_fscodesnippet.view.templateRootPath}`. However, the fallback mechanism of\n`FLUIDTEMPLATE` could be used as well to override the default template.\n\n* In the constant editor the *theme* of the code snippet can be adjusted according to the themes shipped by prism.js.\n\n* Line numbers are enabled.\n\n## Extendability\n\nPer default this extensions only provides a curated subset of programming languages from the huge list supported by prism.js.\nThe main reason for this is to prevent the included JavaScript from being bloated with lots of code you never need.\nIf you however do need support for a programming language not included in the default set, you can add any language yourself.\nYou achieve this by overwriting the TCA for the programming_language field to include more programming_languages and extend\nthe JavaScript with the corresponding syntax highlighter.\n\nTo add a new language to the TCA you can use the constant from the included CodeSnippetLanguage Enumeration to get the needed string right.\nIn any extension of yours, create the file `Configuration/TCA/Overrides/tt_content.php` and add the following code to it:\n\n.. code-block:: php\n\n    $GLOBALS['TCA']['tt_content']['columns']['programming_language']['config']['items'][] = ['Python' =\u003e \\DanielGoerz\\FsCodeSnippet\\Enumeration\\CodeSnippetLanguage::PYTHON];\n\nYou can add every language identifier that prism supports. Anyway the T3Editor won't know that syntax and will run in \"mixed\" mode.\n\nTo enable the syntax highlighting in the frontend you need to include the corresponding JavaScript component from prism.js. In case of python\nthis would be components/prism-python.js. You can either download the component from prismjs.com or github or you can use the\ngulp build shipped with this extension to generate a new all-in-one file.\n\nTo do so, go to the extension folder and edit the `gulpfile` to also include the components you need in the `buildJs` task\n(e.g. `prismBasePath + 'components/prism-python.js'`). Then run\n\n.. code-block:: bash\n\n    yarn install\n    gulp build\n\nNow you should have a `FsCodeSnippet.js` that supports Python.\n\n*Make sure to move the generated `FsCodeSnippet.js` to your own extension and include it from there. Otherwise it will be overwritten if you update fs_code_snippet at any time in the future.*\n\n---\n\n\n_Made by Daniel Goerz (@[b13](https://b13.com)) with ♥_","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fervaude%2Ffs_code_snippet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fervaude%2Ffs_code_snippet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fervaude%2Ffs_code_snippet/lists"}