{"id":16776985,"url":"https://github.com/adampatterson/axe","last_synced_at":"2025-03-17T02:31:37.490Z","repository":{"id":15921539,"uuid":"18663310","full_name":"adampatterson/Axe","owner":"adampatterson","description":"Axe is a simple bare-bones WordPress starter theme for Developers.","archived":false,"fork":false,"pushed_at":"2024-05-03T18:21:22.000Z","size":29676,"stargazers_count":12,"open_issues_count":23,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-21T01:45:11.786Z","etag":null,"topics":["acf","boilerplate","css","php","theme","wordpress","wordpress-workflow","workflow"],"latest_commit_sha":null,"homepage":"https://www.adampatterson.ca/development/axe-wordpress-starter-theme/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adampatterson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-11T05:25:21.000Z","updated_at":"2024-05-30T20:33:23.647Z","dependencies_parsed_at":"2023-02-18T02:45:33.343Z","dependency_job_id":"46a216d8-9420-41c5-a4a1-1b1604087e82","html_url":"https://github.com/adampatterson/Axe","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adampatterson%2FAxe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adampatterson%2FAxe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adampatterson%2FAxe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adampatterson%2FAxe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adampatterson","download_url":"https://codeload.github.com/adampatterson/Axe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841125,"owners_count":20356440,"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":["acf","boilerplate","css","php","theme","wordpress","wordpress-workflow","workflow"],"created_at":"2024-10-13T07:11:32.218Z","updated_at":"2025-03-17T02:31:37.182Z","avatar_url":"https://github.com/adampatterson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Axe\n==\n\nAxe is a simple bare bones WordPress starter structure. It is a theme meant to be a starting point to get you setup and running as fast as possible.\n\nMy build workflow might not be very orthodox but I typically review the design, Setup my Custom post types using [Custom Post Type UI](https://en-ca.wordpress.org/plugins/custom-post-type-ui/) and setup any page data structures using [ACF](http://www.advancedcustomfields.com/).\n\nSimply being able to plow ahead creating my site structures and loading in real or fake content lets me have something tangible to work with.\n\nAnother tip that I can provide is using `console.log` to output my ACF structures reducing the need to be to refer back to the admin pages.\n\n```\n/*\n * Load this in your footer, and \n * check to see if the user is logged in.\n * /\n\u003c? $data = get_fields();?\u003e\n\u003cscript\u003e\n    console.log(\u003c?= json_encode($data) ?\u003e)\n\u003c/script\u003e\n```\n\n### Supports \n\n * Favicon\n * [Header Image](https://codex.wordpress.org/Custom_Headers) \n * [Background Image](https://codex.wordpress.org/Custom_Backgrounds)\n\n### Theme Structure\n\n    Axe/\n    ├── acf-json/\n    │   └── ...\n    ├── assets/\n    │   └── ...\n    │   └── css\n    │   └── fonts\n    │   └── ico\n    │   └── img\n    │   └── js\n    │   └── vendor\n    ├── lib/\n    │   └── ...\n    ├── node_modules/\n    │   └── ...\n    ├── src/\n    │   └── ...\n    │   └── js\n    │   └── scss\n    ├── templates/\n    │   └── ...    \n    │   └── partials/\n    │   └── partials/loop-{type}.php\n    │   └── partials/blocs/\n    │   └── content-{slug}.php\n    │   └── single-{slug}.php\n    │   └── sub-{parent_slug}.php\n    ├── vendor/\n    │   └── ...    \n    ├── woocommerce/\n    │   └── ...\n    ├── composer.json\n    ├── package.json\n    └── webpack.mix.js\n\n### Build\nIncluded is a bower file preset with Bootstrap SASS, jQuery and a couple other commonly used packages. Bower will install packages to `/src/vendor`.\n\nThe [src folder](https://github.com/adampatterson/Axe/tree/master/src) stores your SASS and JS that should be compiled into `/assets`.\n\nUse whatever build tool you want. A CodeKit file has been included to get up and running FAST. There is also an optional basic Webpack config that takes advantage of [Laravel Mix](https://laravel.com/docs/5.8/mix). If you are looking for a more advanced Mix configuration then have a look at the officual docs.\n\n**Mix Installation**as\nhttps://laravel.com/docs/master/mix\n\n**Running Mix**\nhttps://laravel.com/docs/master/mix#installation\n* The `webpack.mix.js` file is located in the theme root directory\n* `npm run watch` to start browserSync with LiveReload and proxy to your custom URL\n* `npm run dev` to quickly compile and bundle all the assets without watching\n* `npm run prod` to compile the assets for production\n\n## Home page\nPlacing a file under `templates/content-home.php` will resolve the home page and would be used by `/`\n\n## Page templates\nPlacing a file under `templates/content-{slug}.php` will resolve the home page. Using `content-contact.php` would be used by `/contact`\n\n## Sub Page templates\nPlacing a file under `templates/sub-{parent_slug}.php` will resolve the home page. Using `sub-services.php` would be used by all pages under service like `/services/design`\n\n## Post format templates\nPlacing a file under `templates/format-video.php` will resolve all video formats.\n\n## Custom Post Type templates\nPlacing a file under `templates/single-books.php` will resolve all custom post type single posts.\n\n## Custom Taxonomies\nPlacing a file under `templates/archive-books.php` will resolve a custom taxonomy for Books `/books/sci-fi/` also using a custom loop. The default archive would be `archive-default.php` using the default post loop.\n\n## Custom Loops\nIf you have a custom post type called Books, creating `content-books.php` and loading a custom loop like `loop-books.php` with all the necessary \"Loop\" code would give you your custom book loop.\n\nSee [loop-post.php](https://github.com/adampatterson/Axe/blob/master/templates/loop-post.php) for an example.\n\n## Helper Functions\n\n`mix()` - Allows you to use Laravel Mix with WordPress [read more here](https://www.adampatterson.ca/2018/axe-handle-updated-to-include-webpack-mix/). \n\n`mix($filepath, $useParent = true)` - In some cases the core theme might be used with a network site and will require the ability to load assets from both the Child and Parent theme. Omitting useParent will keep the same functionality.\n\n`get_template_part_acf()` - Works exactly like `get_template_part()` except that it uses an include making it more suitable to use with ACF. You can include your custom content once which is already done for you. Have a look [here](https://github.com/adampatterson/Axe/blob/master/index.php#L2).\n\n`is_sub_page()` - Used to determine if you are on a sub page.\n\n`__t()` - Returns the template directory, It should be noted that this is easily over written in the child theme.\n\n`__a()`- Returns the assets relative to the template directory. `/assets/`\n\n`__j()` - Prints the JS path. `/assets/js/`\n\n`__i()` - Prints the Images path `/assets/img/`\n\n`__c()` - Prints the CSS path `/assets/css/`\n\n`__v()` - Prints the Vendor path (Bower, other libraries) `/assets/vendor/`\n\n`__lib($path)` - Returns the lib path (custom theme classes like Navigation walkers)`/lib/`\n\n`__m()` - Returns the `mix-manifest.json` file path.\n\n`__video()` - Echos the video path. `/assets/video/`\n\n*Functions in the parent theme should be wrapped with `function_exists` extend the child theme and prevent any conflicts.*\n\n`show_template()` - \n\n`get_the_logo()` - \n\n`if_custom_logo()` - \n\n@todo: Loop Helpers\n@todo: Widgets\n\n## Style\n```\n@import \"components/base-variables\";\n@import \"~bootstrap/scss/bootstrap\";\n```\nWith the addition of PurgeCSS to the build script you can safely include the entire Bootstrap library. Once a production build has been done, any unused CSS classes will be removed.\n\n`base-variables` houses any site specific variables that you might need.\n\n[PurgeCss](https://github.com/FullHuman/purgecss) supports white listing of css class names, some defaults have been included in the `webpack.mix.js` file [here](https://github.com/adampatterson/Handle/blob/68bdd609a582baa4df0cadec67bf0d437bb60029/webpack.mix.js#L21).\n\nIt's also possible to [whitelist](https://github.com/FullHuman/purgecss-docs/blob/master/whitelisting.md#in-the-css-directly) specific classes or chunks of css.\n\n## Dummy Content for Gutenberg\nSridhar Katakam has provided an article outlining how to add [dummy content for Gutenberg](https://sridharkatakam.com/dummy-content-for-gutenberg/). \n\n# Child theme\nhttps://github.com/adampatterson/Handle\n\nOpening `Helpers.php` and uncommenting the function on [line 6](https://github.com/adampatterson/Handle/blob/master/lib/Helpers.php#L6) would allows the child theme to serve all of your themes assets.\n\n## Plugins\nAxe will require a few plugins to run:\n\n * Advanced Custom Fields **Required**\n * Custom Post Type UI\n * WooCommerce\n * JetPack\n\n### Credits\nTemplate tags are heavily modified versions of [_S](http://underscores.me/)\nSome of the class registration was inspired from by [Alecaddd](https://github.com/Alecaddd/awps)\n\n#### Disclaimer\nThis theme is made for Me, and with my efficiencies in mind. That said, If you have anything to add then send me an email hello@adampatterson.ca\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadampatterson%2Faxe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadampatterson%2Faxe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadampatterson%2Faxe/lists"}