{"id":26003129,"url":"https://github.com/asuh/forage","last_synced_at":"2025-03-05T20:01:45.026Z","repository":{"id":241926599,"uuid":"808222024","full_name":"asuh/forage","owner":"asuh","description":"Forage is a WordPress Starter Theme for custom themes using Laravel Blade, Vite, and Biome.","archived":false,"fork":false,"pushed_at":"2025-02-22T21:02:40.000Z","size":720,"stargazers_count":8,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T22:19:14.117Z","etag":null,"topics":["biome","blade","laravel","php","sage","theme","vite","wordpress","wordpress-laravel","wordpress-starter-theme","wordpress-theme"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asuh.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2024-05-30T16:14:45.000Z","updated_at":"2025-02-22T21:02:44.000Z","dependencies_parsed_at":"2025-02-15T19:22:21.233Z","dependency_job_id":"7bcd2d26-62a5-45f4-b63d-bcfb4eb3e014","html_url":"https://github.com/asuh/forage","commit_stats":null,"previous_names":["asuh/sage-footmate","asuh/forage"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asuh%2Fforage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asuh%2Fforage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asuh%2Fforage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asuh%2Fforage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asuh","download_url":"https://codeload.github.com/asuh/forage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242097418,"owners_count":20071252,"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":["biome","blade","laravel","php","sage","theme","vite","wordpress","wordpress-laravel","wordpress-starter-theme","wordpress-theme"],"created_at":"2025-03-05T20:00:23.130Z","updated_at":"2025-03-05T20:01:45.008Z","avatar_url":"https://github.com/asuh.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"/resources/images/Forage.png\" alt=\"Forage\" /\u003e\u003c/p\u003e\n\n# Forage\nThis theme combines two starter themes: FootMATE + Sage. [I go into more detail on my blog post about everything](https://asuh.com/forage/).\n\n## [FootMATE](https://github.com/przemekhernik/footmate.pro/tree/develop)\nFootMATE is a WordPress theme created as [a demo for the author's course](https://pragmate.dev/wordpress/how-to-build-solid-wordpress-applications/),  built to teach modern WordPress development.\n\n## [Sage](https://roots.io/sage/)\nSage is a WordPress starter theme with a modern development workflow.\n\n## Features\n\n* [Blade](https://laravel.com/docs/master/blade) as a templating engine\n* [Vite](https://vitejs.dev/) for compiling assets, concatenating, and minifying files\n* [Biome](https://biomejs.dev/) for linting and formatting both CSS and JS\n* Modern CSS \u0026 JavaScript - No preprocessors, libraries, or frameworks\n* [DocHooks](https://tentyp.dev/blog/wordpress/dochooks-sugar-syntax-for-hooking-system/) provide new functionality of class method DocBlock as hooks into WordPress API\n* [IndieWeb](https://indieweb.org/) support with baked in [Microformats2](https://microformats.org/wiki/microformats2) and [structured data](https://schema.org/)\n\n\u003e [!NOTE]\n\u003e \n\u003e Forage is in active development and might add or subtract features as it matures. It will introduce some updates that might need attention from time to time.\n\n\n## Requirements\n\nMake sure all dependencies have been installed before moving on:\n\n* [WordPress](https://wordpress.org/) \u003e= 6.5.x\n* [PHP](https://www.php.net/manual/en/install.php) \u003e= 8.2.x\n* [Composer](https://getcomposer.org/download/)\n* [Node.js](http://nodejs.org/) \u003e= 20.0.0\n* [Yarn](https://yarnpkg.com/getting-started/install)\n\n## Theme structure\n\n```shell\nthemes/your-theme-name/   # → Root of your theme\n├── app/                  # → Theme PHP\n│   ├── Assets/           # → Loader and Resolver files\n│   ├── Comments/         # → Comment_Walker\n│   ├── Core/             # → Core files\n│   ├── Integrations/     # → Various integrations\n│   └── Templates/        # → Render and Compile Templates files\n├── composer.json         # → Autoloading for `vendor/` files\n├── composer.lock         # → Composer lock file (never edit)\n├── dist/                 # → Built theme assets (never edit)\n├── node_modules/         # → Node.js packages (never edit)\n├── package.json          # → Node.js dependencies and scripts\n├── vite.config.js        # → Vite config file\n├── yarn.lock             # → Yarn lock file (never edit)\n├── resources/            # → Theme assets and templates\n│   ├── fonts/            # → Theme fonts\n│   ├── images/           # → Theme images\n│   ├── scripts/          # → Theme javascripts\n│   ├── styles/           # → Theme stylesheets\n│   ├── functions.php     # → Composer autoloader, theme includes\n│   ├── index.php         # → Never manually edit\n│   ├── screenshot.png    # → Theme screenshot for WP admin\n│   ├── style.css         # → Theme meta information\n│   └── views/            # → Theme templates\n│       └── components/   # → Component templates\n│       └── forms/        # → Forms templates\n│       └── partials/     # → Partial templates\n└── vendor/               # → Composer packages (never edit)\n```\n\n## Environment Type\n\nMultiple features of this theme require the environment type to be set.\n\n* Hot Module Reload\n* Versioning\n\nTo enable these features, add or adjust `WP_ENVIRONMENT_TYPE` in `wp-config.php` located in the root of your WordPress installation. The value needs to be either `development` or `local`.\n\n`define( 'WP_ENVIRONMENT_TYPE', 'development' );`\n\n## Theme installation\n\nInstall Forage using Composer from the theme directory:\n\n```shell\n# @ wp-content/themes/\n$ composer install\n```\n\n## Theme development\n\n* Run `yarn` from the theme directory to install dependencies\n\n### Build commands\n\n* `yarn build` — Compile and optimize the files in your assets directory\n* `yarn dev` — Compile assets when file changes are made using Vite's hot module reload\n\n### Lightning CSS (optional)\n\nLightning CSS is a fast CSS parser that can be used as a great tool to manage the project's CSS. The primary benefit is in its speed and transpiling over PostCSS/ESBuild.\n\nTo enable Lightning CSS, run `yarn add --dev lightningcss` to add Lightning CSS as a new package referenced in `devDependencies` in `package.json`.\n\nIn `vite.config.js`, uncomment the two lines containing references to Lightning CSS and it'll be active by default.\n\nFor more info on whether or not to add this package, you can check [Vite's official documentation for Lightning CSS](https://vite.dev/guide/features.html#lightning-css).\n\n## IndieWeb\n\nThis theme has many pieces that integrate with the IndieWeb ecosystem out of the box with provided [IndieWeb WordPress plugins](https://indieweb.org/WordPress/Plugins). Specifically, I recommend the following:\n\n* IndieWeb Plugin\n* Webmention\n* Syndication Links\n* IndieAuth\n* Post Kinds\n* Micropub\n\nIf you use Gutenberg, you can also try [IndieBlocks](https://wordpress.org/plugins/indieblocks/), which duplicates most of the plugins above except IndieWeb Plugin and IndieAuth.\n\n### h-card\n\nI'm highlighting a feature called [h-card](https://microformats.org/wiki/h-card), which is a Microformats2 format for publishing data about people and a vital building block for the IndieWeb to work with WordPress.\n\nIf you haven't already installed any of the above and want to test the waters, you can start with the IndieWeb Plugin. Generally, everything should just work out of the box.\n\nIf you have more than one WordPress user on your site, to use the correct person for the h-card, go to `wp-admin/admin.php?page=iw_general_options` of your WordPress instance and make sure the Default Author is correct.\n\n## Libraries, Frameworks, and Packages\n\nWhile this theme purposely doesn't include any external dependencies for projects, anything can be added to the workflow. But, before you do this, a couple of things to keep in mind.\n\n* `.jsx`, `.tsx`, `.vue` and more are provided natively in Vite. With this support, you likely don't need an additional dependency for React or Vue.\n* `.scss`, `.less`, `.styl` and more are provided natively in Vite. The only additional thing to do is add the pre-processor itself, such as:\n\nScss\n\n```\nyarn add -D sass\n```\n\n* PostCSS is provided natively in Vite. Considering this, you can write Sass syntax in `.css` files already. If you want to support Sass specific language features like Mixins or Functions, add [postcss-scss](https://github.com/postcss/postcss-scss) in `devDependencies` and you'll get most everything you need from the Sass language processed by PostCSS.\n\nWith anything mentioned above, if you add additional dependencies to `package.json`, make sure to update `vite.config.js` to include the necessary watch files and syntax.\n\n[Vite's documentation](https://vitejs.dev/guide/features.html) provides a lot of great info to extend the Vite config file.\n\n## Background\n\nThe Roots Sage project provided an excellent philosophy and approaches for a progressively developed WordPress theme, but after version 9, Sage had too many interconnected pieces, new dependencies and abstractions, and increasingly difficult to keep up with. Additionally, having focused on so many other projects and returning to an old version of this theme, Sage left much to be desired, as well as plenty of broken packages and outdated dependencies.\n\nI found FootMATE in spring of 2024 looking for an alternative to Sage. It purposely follows enough of a paradigm similar to Sage that it feels like a younger cousin. The author also decided to integrate Vite, a direction that Sage has taken in 2025. Vite is a win for productivity and DX and many projects are moving to using Vite.\n\nThe combination of the two themes satisfies my desire for good file architecture and modern tooling without much bloat or dependencies. It just works.\n\nWordPress' direction towards full-site editing and Gutenberg leaves much to be desired for developers working on WordPress. This theme, while starting from a basis of the classic theme structure, has a lot of flexibility between the two worlds of classic and modern WordPress theme development.\n\nI wrote more on the theme in [a blog post on my site](https://asuh.com/forage/).\n\n## Contributing\n\nContributions are welcome from everyone.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasuh%2Fforage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasuh%2Fforage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasuh%2Fforage/lists"}