{"id":13448092,"url":"https://github.com/intraxia/wp-gistpen","last_synced_at":"2025-03-22T02:30:40.437Z","repository":{"id":18678057,"uuid":"21886740","full_name":"intraxia/wp-gistpen","owner":"intraxia","description":"A self-hosted alternative to putting your code snippets on Gist.","archived":true,"fork":false,"pushed_at":"2023-01-19T03:13:20.000Z","size":30750,"stargazers_count":70,"open_issues_count":74,"forks_count":9,"subscribers_count":7,"default_branch":"next","last_synced_at":"2024-10-28T13:12:02.643Z","etag":null,"topics":["gist","php","prismjs","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/wp-gistpen/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intraxia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-16T04:27:25.000Z","updated_at":"2023-08-14T22:55:45.000Z","dependencies_parsed_at":"2023-02-10T20:01:17.633Z","dependency_job_id":null,"html_url":"https://github.com/intraxia/wp-gistpen","commit_stats":null,"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intraxia%2Fwp-gistpen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intraxia%2Fwp-gistpen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intraxia%2Fwp-gistpen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intraxia%2Fwp-gistpen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intraxia","download_url":"https://codeload.github.com/intraxia/wp-gistpen/tar.gz/refs/heads/next","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244897632,"owners_count":20528270,"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":["gist","php","prismjs","wordpress","wordpress-plugin"],"created_at":"2024-07-31T05:01:35.364Z","updated_at":"2025-03-22T02:30:39.764Z","avatar_url":"https://github.com/intraxia.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# WP-Gistpen #\n\n**Contributors:** JamesDiGioia  \n**Donate link:** http://jamesdigioia.com/  \n**Tags:** gist, code snippets, codepen  \n**Requires at least:** 5.2  \n**Requires PHP**: 5.6  \n**Tested up to:** 5.2  \n**Stable tag:** 2.0.0-beta.0  \n**License:** GPLv2  \n**License URI:** http://www.gnu.org/licenses/gpl-2.0.html  \n\n## Description ##\n\nA self-hosted alternative to putting your code snippets on Gist.\n\n[![Build Status](https://travis-ci.org/intraxia/wp-gistpen.svg?branch=latest)](https://travis-ci.org/intraxia/wp-gistpen)  [![Maintainability](https://api.codeclimate.com/v1/badges/0eee18837a01d55dd33e/maintainability)](https://codeclimate.com/github/intraxia/wp-gistpen/maintainability)\n\nYou use WordPress because you want control over your writing. Why give Gist or Codepen your code snippets? WP-Gistpen is a self-hosted replacement for your WordPress blog.\n\nFeatures include:\n\n* Revision saving\n* Gist import \u0026 export\n* PrismJS syntax highlighting\n* Prism-based text editor\n* oEmbed snippet embedding\n\n## Installation ##\n\n### Using the WordPress Dashboard ###\n\n1. Navigate to the 'Add New' in the plugins dashboard\n2. Search for 'wp-gistpen'\n3. Click 'Install Now'\n4. Activate the plugin on the Plugin dashboard\n\n### Uploading in WordPress Dashboard ###\n\n1. Download `wp-gistpen.zip` from the WordPress plugins repository.\n2. Navigate to the 'Add New' in the plugins dashboard\n3. Navigate to the 'Upload' area\n4. Select `wp-gistpen.zip` from your computer\n5. Click 'Install Now'\n6. Activate the plugin in the Plugin dashboard\n\n### Using FTP ###\n\n1. Download `wp-gistpen.zip`\n2. Extract the `wp-gistpen` directory to your computer\n3. Upload the `wp-gistpen` directory to the `/wp-content/plugins/` directory\n4. Activate the plugin in the Plugin dashboard\n\n## Frequently Asked Questions ##\n\n### What are the plugin's requirements? ###\n\nYour PHP version should be 5.4+, and you must be running WordPress v4.7+. This is because WP-Gistpen relies on the WP-API infrastructure.\n\n### How do I create an archive page for my Gistpens? ###\n\nGo to the \"Pages\" screen and create a new, blank page with the name \"Gistpens\" and click publish. That URL will now display all of your Gistpens. You can link to this page in the menu to direct users to your Gistpens archive page. You can change the name of the page; just make sure the slug of the page is \"gistpens\".\n\n### How do I create a Gistpen and insert it into the post? ###\n\nTo add a new Gistpen, go to Gistpens -\u003e Add New, and add your code. You can enable or disable Gist syncing on a a per-Gistpen basis.\n\nYou can also create and insert a Gistpen directly into your post/page from the visual editor by clicking the code button. From the pop-up, search for your gistpen, select it, and click insert. Your shortcode will be inserted into the editor.\n\n### How do I highlight specific lines in my Gistpen? ###\n\nTo highlight a specific line, add `highlight=^^`, where ^^ is a line number or range of numbers you want highlighted, like this ([via PrismJS documentation](http://prismjs.com/plugins/line-highlight/)):\n\n* A single number refers to the line with that number\n* Ranges are denoted by two numbers, separated with a hyphen (-)\n* Multiple line numbers or ranges are separated by commas.\n* Whitespace is allowed anywhere and will be stripped off.\n\nExamples:\n\n* `highlight=\"5\"`: The 5th line\n* `highlight=\"1-5\"`: Lines 1 through 5\n* `highlight=\"1,4\"`: Line 1 and line 4\n* `highlight=\"1-2,5,9-20\"`: Lines 1 through 2, line 5, lines 9 through 20\n\n### How do I link to a specific line? ###\n\nYou can link to a specific line in your Gistpen by linking to `#gistpen-{gistpen-slug}.{lines}`. The lines don't need to be highlighted in advance for the link to work, and they will be highlighted when the link is clicked. The `{lines}` should match the same format as above.\n\n### How do I get my Gist token from GitHub? ###\n\n1. Login to GitHub.\n2. Go to Settings -\u003e Applications.\n3. Under \"Personal access tokens\", click \"Generate New Token.\"\n4. Give it a name, click create\n\t* The default settings work, but make you sure you at least include the `gist` and `user` scopes.\n5. Copy the generated token.\n6. Paste it into the settings page.\n7. ???\n8. Profit!\n\n### How do I sync my Gistpens to Gist? ###\n\nGistpens can be exported en masse. All Gistpens will be synced, only if the Gistpen hasn't been synced yet, but **regardless of whether syncing for the Gistpen is enabled**. Syncing will then be enabled on the exported Gistpens.\n\nIf you do not want this, you can enable/disable Gistpen syncing on a per-Gistpen basis. Just click the checkbox on the Gistpen edit page, and any changes will be reflected on the corresponding Gist on update. If you uncheck that box, future changes will not be reflected on Gist.\n\nTo go this, go to the Gistpens settings page and click \"Jobs\". Next to the the \"Export Job\", click \"Dispatch Job\". After the Job is done, check out the log messages to ensure everything exported correctly.\n\n### How do I import my Gistpens from Gist? ###\n\nGo to the Gistpents settings page and click \"Jobs\". Next to the \"Import Job\", click \"Dispatch Job\", then check out the log messages to ensure everything was imported correctly.\n\n## Screenshots ##\n\n![](screenshot-1.png)\n\nThe Insert Gistpen dialog after you click the pen in the visual editor.\n\n![](screenshot-2.png)\n\nDefault theme - How your code will appear in your post.\n\n![](screenshot-3.png)\n\nTwilight theme with line numbers enabled. Check out all the themes at [PrismJS.com](http://prismjs.com).\n\n![](screenshot-4.png)\n\nThe current options page – first page.\n\n![](screenshot-5.png)\n\nThe current options page – second page.\n\n![](screenshot-6.png)\n\nThe current options page – third page.\n\n![](screenshot-7.png)\n\nPrismJS-based text editor.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintraxia%2Fwp-gistpen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintraxia%2Fwp-gistpen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintraxia%2Fwp-gistpen/lists"}