{"id":26180190,"url":"https://github.com/webvpf/wn-simpledocs-plugin","last_synced_at":"2025-04-14T22:43:50.166Z","repository":{"id":57079373,"uuid":"376278220","full_name":"WebVPF/wn-simpledocs-plugin","owner":"WebVPF","description":"Simple documentation for Winter CMS website","archived":false,"fork":false,"pushed_at":"2024-03-04T07:00:24.000Z","size":328,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T10:50:31.167Z","etag":null,"topics":["docs","documentation","documentation-site","wintercms","wintercms-plugin"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/webvpf/wn-simpledocs-plugin","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/WebVPF.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}},"created_at":"2021-06-12T11:55:08.000Z","updated_at":"2023-01-23T12:08:26.000Z","dependencies_parsed_at":"2024-03-04T08:24:25.514Z","dependency_job_id":"f3b0fcac-331a-44f6-973e-54eb32add39b","html_url":"https://github.com/WebVPF/wn-simpledocs-plugin","commit_stats":{"total_commits":30,"total_committers":3,"mean_commits":10.0,"dds":"0.30000000000000004","last_synced_commit":"1e97b6309168da100ccd076d64a0ac043a196561"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebVPF%2Fwn-simpledocs-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebVPF%2Fwn-simpledocs-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebVPF%2Fwn-simpledocs-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebVPF%2Fwn-simpledocs-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebVPF","download_url":"https://codeload.github.com/WebVPF/wn-simpledocs-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975300,"owners_count":21192198,"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":["docs","documentation","documentation-site","wintercms","wintercms-plugin"],"created_at":"2025-03-11T21:54:48.298Z","updated_at":"2025-04-14T22:43:50.135Z","avatar_url":"https://github.com/WebVPF.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wn-simpledocs-plugin\n\nSimple documentation for WinterCMS website\n\n![SimpleDocs](https://raw.githubusercontent.com/WebVPF/wn-simpledocs-plugin/main/assets/img/icons/favicon-96x96.png)\n\nScreenshots: https://github.com/WebVPF/wn-simpledocs-plugin/issues/2\n\n## Installing Composer\n\n```bash\ncomposer require webvpf/wn-simpledocs-plugin\n```\n\n## Documentation creation\n\nTo display documentation on the site, create three files (layout template and two CMS pages).\n\n## Documentation layout template\n\nCreate a new layout for your documentation template. To do this, create a file `docs.htm` with the following content in the folder `themes/nameTheme/layouts`:\n\n```twig\ndescription = \"Template for documentation\"\n\n[DocsMenu]\ndocPage = \"docs/item\"\n==\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n    \u003chead\u003e\n        \u003cmeta charset=\"utf-8\"\u003e\n        \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"\u003e\n        \u003ctitle\u003e{{ this.page.title }}\u003c/title\u003e\n        \u003clink rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/plugins/webvpf/simpledocs/assets/img/icons/favicon.ico\"\u003e\n        \u003clink rel=\"stylesheet\" href=\"/plugins/webvpf/simpledocs/assets/css/modern-normalize.min.css\"\u003e\n        \u003clink rel=\"stylesheet\" href=\"/plugins/webvpf/simpledocs/assets/css/simpledocs.css\"\u003e\n\n        {% styles %}\n\n        {% if item.css %}\n            \u003cstyle\u003e{{ item.css|raw }}\u003c/style\u003e\n        {% endif %}\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003caside class=\"docs-menubar\"\u003e\n            \u003cdiv class=\"docs-logo\"\u003e\n                \u003ca href=\"/docs\"\u003e\n                    \u003cimg src=\"/plugins/webvpf/simpledocs/assets/img/logo.png\" height=\"32\" alt=\"Documentation\"\u003e\n                    \u003cspan\u003eDocumentation\u003c/span\u003e\n                \u003c/a\u003e\n            \u003c/div\u003e\n\n            {% component 'DocsMenu' %}\n        \u003c/aside\u003e\n        \n        \u003cmain class=\"doc-content\"\u003e\n            {% page %}\n        \u003c/main\u003e\n\n        {% scripts %}\n\n        {% if item.js %}\n            \u003cscript\u003e{{ item.js|raw }}\u003c/script\u003e\n        {% endif %}\n    \u003c/body\u003e\n\u003c/html\u003e\n\n```\n\n## Documentation Pages\n\nNow we need to create two CMS pages. One of them will display **Main documentation page**, the second - documentation records.\n\nBoth of these pages will be hidden. Hidden pages are only available to logged in users (authorized in the backend). To make your documentation available to everyone on the Internet, simply remove the `is_hidden = 1` parameter from the page settings.\n\n### Documentation main page\n\nCreate a file `docs.htm` in the folder `themes/nameTheme/pages/docs`\n\n```ini\ntitle = \"Documentation\"\nurl = \"/docs\"\nlayout = \"docs\"\nis_hidden = 1\n==\n\u003cp\u003eThis is the main documentation page.\u003c/p\u003e\n\n```\n\n### Documentation record output page\n\nCreate a file `item.htm` in the folder `themes/nameTheme/pages/docs`\n\n```ini\ntitle = \"Documentation record page\"\nurl = \"/docs/:slug\"\nlayout = \"docs\"\nis_hidden = 1\n\n[DocsItem]\nslug = \"{{ :slug }}\"\nstek = \"wn\"\ntheme = \"default\"\n==\n{% component 'DocsItem' %}\n\n```\n\nStyles for quick start connected in layout:\n\n![simpledocs_1](https://user-images.githubusercontent.com/61043464/147873706-3d33e189-34aa-48eb-97cd-6861462476a6.jpg)\n\n## Code highlighting\n\nUse Markdown syntax to insert example code into the text of your document.\n\nBefore the beginning of the code and at the end, insert lines of characters \u003ccode\u003e```\u003c/code\u003e.\n\nAdd the identifier of the programming language or technology to which the code belongs to the first three quotes. For example, for HTML the identifier is `html`, for CSS - `css`, for JavaScript - `javascript` or a short synonym `js`.\n\nExample of inserting PHP code:\n\n    ```php\n    public function nameFunction()\n    {\n        return 'Text';\n    }\n    ```\n\n### Language identifiers\n\n- [All identifiers](https://github.com/WebVPF/wn-simpledocs-plugin/wiki/highlight-%D0%92%D1%81%D0%B5-%D1%8F%D0%B7%D1%8B%D0%BA%D0%B8)\n- [stack WinterCMS](https://github.com/WebVPF/wn-simpledocs-plugin/wiki/highlight-%D1%81%D1%82%D0%B5%D0%BA-WinterCMS)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebvpf%2Fwn-simpledocs-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebvpf%2Fwn-simpledocs-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebvpf%2Fwn-simpledocs-plugin/lists"}