Code Monkey home page Code Monkey logo

foxhound's Introduction

Foxhound CircleCI

A react-based theme for WordPress.

screenshot

Setup

Since this is a more "experimental" theme, you'll need to have a few things set up before it'll work.

  1. WordPress 4.7 or higher, which includes the REST API content endpoints.
  2. You'll also need this WP-API Menus plugin. The REST API doesn't provide an endpoint for menus, so another plugin is necessary.
  3. Your permalinks will need to be set to /%year%/%monthnum%/%postname%/. Single-post/page views will not work without permalinks set. Category & tag archives bases should be set to category and tag, respectively.

Technical Requirements

  1. WordPress 4.7+
  2. PHP 5.4+
  3. If building locally, Node 8.9.1 + npm 5.5.1

Display & Features

This theme supports your average blogging site. It looks best with "Front page displays" set to latest posts (in Settings > Reading), however it does support a static page & blog posts on another page. This theme works best for very text-focused sites. It will display featured images on single posts & pages, but not on archive/list views. There is currently no special handling for post formats.

Restrictions

This theme does have a few "restrictions", things that don't work like they do in other WordPress themes.

The theme does not display anything if javascript is disabled. This should not affect your SEO, as google will crawl your page with JS & CSS enabled. This should not affect accessibility (99% of screen reader users have javascript enabled, in 2012). However, if your site needs to be usable without javascript, a javascript theme is not your best choice πŸ˜‰

The API cannot be blocked by a security plugin. Some plugins recommend blocking the users endpoint, but that is required to show the author archive. If you need to block the user endpoint, the rest of the theme should work, but might be unstable if anyone tries to visit an author archive.

Permalinks for pages and archives are changed by this theme. They'll be reset if/when you deactivate the theme. You might want to set up redirects using something like Safe Redirect Manager.

This theme does not support hierarchical category archives - only parent category archive pages can be displayed. This may be fixed in a later version of the theme (see #30).

Plugins might not work as expected, especially if they add content to the front end of your site. Most Jetpack features do still work.

If you're logged in to your site, the admin bar will currently not update when you navigate pages, so the "Edit X" link will only reflect the page you initially loaded. You can force-reload the page to update the admin bar, as a work-around.

Thanks to…

These are a few of the packages/plugins that made this theme possible.

Development

You can also install Foxhound yourself from this repo, by building it yourself. Download or clone this repo into your /themes folder, then run npm to install and build the javascript & CSS files. The process will look like this

git clone https://github.com/ryelle/Foxhound foxhound
cd foxhound
npm install
npm run build

Now you'll see a build/app.js file in the theme, and it will be available for you to switch to in wp-admin. If you're having trouble getting the theme active, please file an issue & I'll help you out.

If you don't have npm installed, you can find instructions on the npm website.

There are a few other NPM scripts you can run:

npm run dev runs webpack, with configuration enabling source maps. Eventually build will also compress/uglify built files, so this would skip that too (but that's currently disabled).

npm run watch runs webpack --watch, everything the previous command but it will also watch the source files for changes and recompile automatically. Best to run while developing. This does not live reload.

npm run lint runs eslint over all the javascript files. Webpack does this as well, before compiling, but only notifies you of errors. This command will catch warnings too.

On the PHP side, we're also adding in some prefixes for permalinks (also called routes).

Support

If you notice anything broken (that isn't mentioned in the "restrictions" section), let me know by creating an issue.

Thanks for checking out Foxhound!

foxhound's People

Contributors

greenkeeper[bot] avatar mattonomics avatar melchoyce avatar ryelle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foxhound's Issues

Explore fallback for Menus plugin

Drop the PHP code in for rendering the menu, so at least the menu itself will display? It will work, but probably won't have the correct focus/hover styles...

Password Protected posts

Now that the API supports this, the theme should offer a way of asking for the password & re-requesting a post with it.

Disable attachment URLs

Since we're not going to get #7 before v1.0, we should just disable attachment URLs.

set publicly_queryable to false in register_post_type() ?

Document this (lack of) functionality.

Preload the first page's posts

Only on the homepage, load the first page of API responses to speed up the page render.

The logic to pre-render any initial response is out-of-scope for this ticket, but could happen eventually.

Wordpress 4.7 REST API and GraphQL

Assuming that the WP REST API Plugin is merged into WP 4.7 core, will the Foxhound theme be switched over to the WP API in core instead?

Also, do you have any plans to use GraphQL with the WP API in core?

Invariant Violation after navigating from an item with a featured image to a term archive

Invariant Violation: findComponentRoot(..., .2.1.$post-0): Unable to find element.
This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually
due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>,
or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the
element with React ID ``.

When navigating to another page, error is a little more helpful:

Warning: setState(...): Can only update a mounted or mounting component. This usually
means you called setState() on an unmounted component. This is a no-op. Please check
the code for the Media component.

Possibly due to using PostsStore/the same fetchSingle action for both Media and it's parent SinglePost component.

Menu navigation

This again 😧

Clicking menu items correctly updates the classes, but clicking other inter-site links does not.

Clicking a submenu item doesn't close the menu.

It seemed unnecessary to link the Navigation to the store, but I think it's the best/only way to know when the page changes.

Error: Cannot resolve module 'object-assign'

Hiya,

Very excited to see your theme, but getting an error when trying to install on a local vagrant instance. Everything seemed fine during install until during 'gulp' I got 5 errors:

ERROR in ./js/stores/navigation-store.js
ERROR in ./js/stores/posts-store.js
ERROR in ./js/stores/term-store.js
ERROR in ./js/stores/comments-store.js
ERROR in ./js/dispatcher/dispatcher.js

each followed by: Module not found: Error: Cannot resolve module 'object-assign' in /Users

foxhound errors

Jetpack compat?

I ❀ Jetpack and would like to keep likes, galleries, and stats working.

How to add new route to a page that uses different component?

Hi Kelly

Firstly, thank you for the awesome work!

I need to add another page component but I couldn't figure out how to do that. Basically I need to add a contact page with a form. And plugins won't work so I think redux form is the way to go.

So I added the component - I was using the the existing single-page component as the template, make some changes on it and added to the routes, with a specific slug /page/contact.
But it keeps using the same single-page. Could you please give me a hint of what I have missed out?

I tried Custom contact form won't work because react sees it as controlled input so no way to type.
I also try another php page template that doesn't have #main in it but obviously won't work either because it's a spa now.

Could you please help.

Many thanks!

An in-range update of debug is breaking the build 🚨

Version 2.5.0 of debug just got published.

Branch Build failing 🚨
Dependency debug
Current Version 2.4.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As debug is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci Your tests failed on CircleCI Details
Commits

The new version differs by 26 commits .

  • 355e327 release 2.5.0
  • d85c0c6 build perf, fix for bowerfile, fix for webworker
  • dc043cf Merge pull request #378 from yamikuronue/replace-babel-with-browserify
  • f512cf2 Merge remote-tracking branch 'upstream/master' into replace-babel-with-browserify
  • f098331 Merge pull request #388 from ForsakenHarmony/patch-1
  • a16cf42 Merge pull request #387 from kribblo/patch-1
  • 78e31a8 Update browser.js
  • 408ae94 Use typeof window.process !== 'undefined'
  • f484cfe fix merge errors
  • 23af483 Merge remote-tracking branch 'upstream/master' into replace-babel-with-browserify
  • 3e1a15d fix: merged again, because it didn't take. Guess I did it wrong?
  • 67182fd fix: Whoops, didn't merge the tests properly. Resolved.
  • 2a01c6c Merged from upstream/master. I left the dist/debug in place because my hook now updates it automatically, but I removed the babelrc file since we don't need it anymore.
  • 6e934e9 Fix for #381. Moved .babelrc into test folder, where it is used and which is not built with the module. (#383)
  • 6a8d525 chore: add coveralls

There are 26 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of debug is breaking the build 🚨

Version 2.4.0 of debug just got published.

Branch Build failing 🚨
Dependency debug
Current Version 2.3.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As debug is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci Your tests failed on CircleCI Details
Commits

The new version differs by 7 commits .

  • b82d4e6 release 2.4.0
  • 41002f1 Update bower.json (#342)
  • e58d54b Node: configurable util.inspect() options (#327)
  • 00f3046 Node: %O (big O) pretty-prints the object (#322)
  • bd9faa1 allow colours in workers (#335)
  • 501521f Use same color for same namespace. (#338)
  • e2a1955 Revert "handle regex special characters"

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Shrink font on smaller screens

Line length is awkward because the font is large on title & first paragraph. Shrink down a little on phone-sized screens (probably should use the <600 breakpoint?)

Test

  • Testing
  • Another test

Post Format archives not supported

/type/quote etc

Not much of an issue because we don't technically have styling/support for post formats, but this would be an easy archive to support.

Add "credits" to readme

Mostly to credit the wpapi JS wrapper, but I should probably credit other projects I'm using.

Performance: Slow on IE?

I haven't paid attention to performance... at all. But it's intermittently freezing in my IE VM. Let's check out performance improvements.

Add child theme instructions

A traditional child theme isn't really possible, but an interested user could at least change the CSS if they want, so let's add info about this to some documentation.

An in-range update of jsdom is breaking the build 🚨

Version 9.9.0 of jsdom just got published.

Branch Build failing 🚨
Dependency jsdom
Current Version 9.8.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As jsdom is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ ci/circleci Your tests failed on CircleCI Details
Commits

The new version differs by 13 commits .

  • 05e0c53 Version 9.9.0
  • fedc336 Add CDATA sections
  • 30f7906 Add document.embeds, plugins, and scripts
  • 5261738 Implement document.title correctly per-spec
  • ae19887 Implement document.body correctly per-spec
  • 656f606 Add more selector tests
  • bb12085 Fix CORS POST JSON XHRs with Authorization
  • 8bb591d Fix EventListener once handling
  • 45f4458 Add Node's wholeText property
  • 3c50533 Only log "not implemented" errors if form submission isn't canceled
  • 60555c0 Allow insertAdjacentHTML without a parent element sometimes
  • 139b9d7 Upgrade whatwg-url dependency to 4.1.0
  • 4c40a11 Fix a README typo

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.