{"id":40122333,"url":"https://github.com/dss-web/jobbnorge-block","last_synced_at":"2026-01-19T13:00:46.354Z","repository":{"id":81589038,"uuid":"585519233","full_name":"dss-web/jobbnorge-block","owner":"dss-web","description":"Retrieve and display job listings from Jobbnorge.no","archived":false,"fork":false,"pushed_at":"2025-10-05T22:39:55.000Z","size":21779,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-06T00:20:57.400Z","etag":null,"topics":["gutenberg-blocks","jobbnorge","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/jobbnorge-block/","language":"PHP","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/dss-web.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-05T11:31:37.000Z","updated_at":"2025-10-05T22:39:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b1c57a3-87f1-4b52-880a-7ae5ab741416","html_url":"https://github.com/dss-web/jobbnorge-block","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/dss-web/jobbnorge-block","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dss-web%2Fjobbnorge-block","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dss-web%2Fjobbnorge-block/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dss-web%2Fjobbnorge-block/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dss-web%2Fjobbnorge-block/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dss-web","download_url":"https://codeload.github.com/dss-web/jobbnorge-block/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dss-web%2Fjobbnorge-block/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28568833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T12:50:50.164Z","status":"ssl_error","status_checked_at":"2026-01-19T12:50:42.704Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gutenberg-blocks","jobbnorge","wordpress","wordpress-plugin"],"created_at":"2026-01-19T13:00:23.575Z","updated_at":"2026-01-19T13:00:46.336Z","avatar_url":"https://github.com/dss-web.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jobbnorge Block\n\n\u003e **NOTE**: Breaking change in 2.0.0: The Public Jobbnorge API is used, and you will have to use and add the employerID. You get the employerID from your Jobbnorge contact.  The old block is still available in the 1.0 branch and releases.\n\n\u003e Also available at https://wordpress.org/plugins/jobbnorge-block/\n\n\nThis WordPress plugin adds a block to the Gutenberg editor that displays a list of jobs from Jobbnorge.\n\n**See:** [Live Preview](https://playground.wordpress.net/?plugin=jobbnorge-block\u0026blueprint-url=https://wordpress.org/plugins/wp-json/plugins/v1/plugin/jobbnorge-block/blueprint.json) | [Features](#features) | [Installation](#installation) | [Use](#use) | [Filters](#filters) | [Styling](#styling) | [License](#license) | [Changelog](CHANGELOG.md)\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n\u003cimg src=\".wordpress-org/jobbnorge.gif\"\u003e\n\n## Featueres\n\nIn 2.0 the new Jobbnorge API is used, and the following features are available ( ~~strikethrough~~ means removed, since it's not in the new API):\n\n-   Sort jobs bye deadline, closest first.\n-   Does not show jobs that are past the deadline.\n-   Set the number of jobs to display.\n-   ~~Set the number of words in the excerpt.~~\n-   Set the no jobs message.\n-   Show or hide the job excerpt.\n-   Show or hide the job deadline.\n-   Show or hide the job scope.\n-   ~Show or hide the job duration.~\n-   Display the jobs in a grid or list view.\n-   Set the number of columns in the grid view.\n\n**New features in 2.0**:\n- Add more than one employer.\n- If more than one employer is added, order jobs by employer or deadline.\n- Define which employers are available in the block, using the `jobbnorge_employers` filter:\n\n\t```php\n\tadd_filter( 'jobbnorge_employers', function( $employers ) {\n\t\t$employers = [\n\t\t\t[\n\t\t\t\t'label'    =\u003e 'Select employer',\n\t\t\t\t'value'    =\u003e '',\n\t\t\t\t'disabled' =\u003e true, // Optional.\n\t\t\t],\n\t\t\t[\n\t\t\t\t'label' =\u003e 'Employer 1',\n\t\t\t\t'value' =\u003e '1234',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'label' =\u003e 'Employer 2',\n\t\t\t\t'value' =\u003e '5678',\n\t\t\t],\n\t\t];\n\t\treturn $employers;\n\t} );\n\t```\n\t\u003cimg src=\".wordpress-org/screenshot-5.png\"\u003e\n\t\n\t* Ctrl-click (Windows) or Cmd-click (Mac) to select multiple employers.\n\t* Alt-click (Windows) or Option-click (Mac) to select a range of employers.\n\n## Installation\n\nEither, add the block from the Block Directory:\n\n1. To add a block from the Block Directory, navigate to the post editor. \n1. Place your cursor where you would like a new block option. \n1. Select the “Add Block” button in the top-left area of the editor screen. \n1. Search for “Jobbnorge” and select the “Jobbnorge\" block:\n\n\t\u003cimg src=\".wordpress-org/screenshot-1.png\"\u003e\n\nOr, add the block from the WordPress admin:\n1. In the WordPress admin, go to the \"Plugins\" screen, click \"Add New\" and search for \"Jobbnorge\".\n1. Click \"Install Now\" and then \"Activate Plugin\".\n1. Use the Gutenberg editor to add the block to a page or post.\n\n## Use\n\nYou'll find the block in the \"widget\" category, look for \"Jobbnorge\".\n\n### 1) Add the employerID to Jobbnorge.\n\n\u003e You get the employerID from your Jobbnorge contact.\n\nSeparate multiple employerIDs with a comma, or add employers using the [`jobbnorge_employers`](#filters) filter.\n\n[![Add the employerID to Jobbnorge.](.wordpress-org/screenshot-2.png)](.wordpress-org/screenshot-2.png)\n\n\n### 2) Modify the block settings.\n\n-   In pagination mode (default), set the number of jobs to display per page (10 is default), else set the number of jobs to display.\n-   Sort jobs bye deadline, closest first.\n-   Does not show jobs that are past the deadline.\n-   Set the number of jobs to display.\n-   Set the no jobs message.\n-   Show or hide the employer name.\n-   Show or hide the job excerpt.\n-   Show or hide the job deadline.\n-   Show or hide the job scope.\n\nWhen pagination is enabled an additional option **Disable auto scroll on pagination** appears. Enabling it prevents the view from scrolling back to the block after changing pages (useful when composing long pages with multiple instances).\n\nIf you've added more than one employer, you can order jobbs by employer or deadline.\n\n[![Modify the block settings.](.wordpress-org/screenshot-3.png)](.wordpress-org/screenshot-3.png)\n\n### 3 optional), Grid view.\n\n-   Set the number of columns in the grid view.\n\n[![Grid view.](.wordpress-org/screenshot-4.png)](.wordpress-org/screenshot-4.png)\n\n\n## Filters\n\n### `jobbnorge_employers`\n\nThe `jobbnorge_employers` filter can be used to define which employers are available in the block: \n\n```php\nadd_filter( 'jobbnorge_employers', function( $employers ) {\n\t$employers = [\n\t\t[\n\t\t\t'label'    =\u003e 'Select employer',\n\t\t\t'value'    =\u003e '',\n\t\t\t'disabled' =\u003e true, // Optional.\n\t\t],\n\t\t[\n\t\t\t'label' =\u003e 'Employer 1',\n\t\t\t'value' =\u003e '1234',\n\t\t],\n\t\t[\n\t\t\t'label' =\u003e 'Employer 2',\n\t\t\t'value' =\u003e '5678',\n\t\t],\n\t];\n\treturn $employers;\n} );\n```\n\n### `jobbnorge_cache_path`\n\nThe `jobbnorge_cache_path` filter can be used to define the cache path. Default is `WP_CONTENT_DIR . '/cache/jobbnorge'`.\n\n```php\nadd_filter( 'jobbnorge_cache_path', function( $path ) {\n\t$path = WP_CONTENT_DIR . '/cache/jobbnorge';\n\treturn $path;\n} );\n```\n\n### `jobbnorge_cache_time`\n\nThe `jobbnorge_cache_time` filter can be used to define the cache time. Default is `30 * MINUTE_IN_SECONDS`.\n\n```php\nadd_filter( 'jobbnorge_cache_time', function( $time ) {\n\t$time = 30 * MINUTE_IN_SECONDS;\n\treturn $time;\n} );\n```\n\n### `jobbnorge_autoscroll_threshold`\n\nControls when automatic scroll engages after clicking a pagination control. The value is a float representing the fraction of the viewport height (from the top) within which the block must already appear to suppress scrolling (default `0.25`). Lower values make scrolling more likely; higher values make it less likely.\n\n```php\nadd_filter( 'jobbnorge_autoscroll_threshold', function( $threshold ) {\n    return 0.15; // Scroll only if block starts below top 15% of viewport.\n} );\n```\n\nIf you need to disable scroll entirely for a specific instance you can enable the block setting *Disable auto scroll on pagination* (adds `disableAutoScroll` attribute / `data-no-autoscroll` in markup).\n\n## Styling\n\nThe block html look like this, and uses the following classes for styling:\n\n```html\n\u003cul class=\"has-employer has-dates has-scope has-excerpts wp-block-dss-jobbnorge\"\u003e\n\t\u003cli class=\"wp-block-dss-jobbnorge__item\"\u003e\n\t\t\u003cdiv class=\"wp-block-dss-jobbnorge__item-title\"\u003e\u003ca\n\t\t\t\thref=\"https://www.jobbnorge.no/ledige-stillinger/stilling/XXXXXX\"\u003eTitle\u003c/a\u003e\u003c/div\u003e\n\t\t\u003cdiv class=\"wp-block-dss-jobbnorge__item-meta\"\u003e\n\t\t\t\u003cdiv class=\"wp-block-dss-jobbnorge__item-employer\"\u003eEmployer\u003c/div\u003e\n\t\t\t\u003ctime datetime=\"2023-11-26T00:00:00+00:00\" class=\"wp-block-dss-jobbnorge__item-deadline\"\u003eDeadline:\n\t\t\t\t1/1/1970\u003c/time\u003e\n\t\t\t\u003cdiv class=\"wp-block-dss-jobbnorge__item-scope\"\u003eScope: Full time\u003c/div\u003e\n\t\t\u003c/div\u003e\n\t\t\u003cdiv class=\"wp-block-dss-jobbnorge__item-excerpt\"\u003eThe excerpt … \u003ca\n\t\t\t\thref=\"https://www.jobbnorge.no/ledige-stillinger/stilling/XXXXXX\"\u003eRead more\u003c/a\u003e\n\t\t\u003c/div\u003e\n\t\u003c/li\u003e\n\t.\n\t.\n\t.\n\u003c/ul\u003e\n```\n\n`is-grid`, `columns-N` (N = 2-6), `has-employer`, `has-excerpts`, `has-deadline` and `has-scope` are added to the `\u003cul\u003e` element depending on the block settings.\n\nDefault styling is provided by the [`style.scss`](src/style.scss) file.\n\n\n## Copyright and license\n\nThe Jobbnorge Block is copyright 2023 Per Søderlind\n\nThe Jobbnorge Block is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.\n\nThe Jobbnorge Block is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdss-web%2Fjobbnorge-block","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdss-web%2Fjobbnorge-block","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdss-web%2Fjobbnorge-block/lists"}