Git Product home page Git Product logo

huh's Introduction

Who?

huh was dreamt up by secret pizza party and brought to life by the amazing Dan Hauk. Seriously, Dan is the best. He took a broad idea and really brought it to life like only he could. The SPP offices are open on Christmas Day but we close on May 5th (Dan's birthday) as it's a company wide holiday.

What?

huh is the best way to offer in dashboard documentation for all your WordPress projects. The content is generated from a markdown file which makes it super quick & easy to update your documentation whenever you want. You can learn more from the launch post here.

Where?

We think huh is awesome and we really want you to use it in all your projects. It's totally free/open source and you can find it on github.

Wanna Contribute?

If you found a bug, report it here. If you're a developer, we welcome pull requests of all types!

Development Workflow

  1. Make sure you have git, node, and npm installed and a working WordPress installation.

  2. Clone this repository inside your theme directory.

    $ git clone https://github.com/secretpizzaparty/huh.git
    $ cd huh
    
  3. Watch the front-end CSS/Sass for changes and rebuild accordingly with Grunt. Please only modify the Sass files to keep the CSS consistent and clean.

    $ npm install
    $ grunt watch
    
  4. Open /wp-admin/ in your browser.

  5. Have fun!

Why?

secret pizza party is in the process of developing a bunch of new WordPress themes and while they are quite simple there is still a need for a wee bit of documentation. External documentation is dumb and everything should be contained in the dashboard. We created huh to make that happen.

How?

Adding huh to your theme is incredibly easy.

Formatting your markdown

huh pulls all of your <h1> tags to use as a table of contents. Each section of your documentation will be contained between these <h1> tags. For example:

# First section
The content of the first section of your documentation would go here. You can include links, bullets, images, anything!

# Second section
This would be the next section.

## You can even use subheadings
It will all be formatted correctly, but only the first-level headings will show on the table of contents.

Adding huh to your theme

Once you have your documentation formatted correctly, adding huh to your theme is simple.

Just download the zipped plugin and extract it to your theme directory. At the bottom of your theme's functions.php file add the following lines:

require get_stylesheet_directory() . '/huh/huh.php';
function secretpizzaparty_huh() {
	// Enter the URL of your markdown file below
	$markdown_url = 'https://raw.githubusercontent.com/secretpizzaparty/huh/master/README.md';
	$huh = new WP_Huh();
	$huh->init( $markdown_url );
}
add_action( 'admin_init', 'secretpizzaparty_huh' );

Make sure you change the URL of the $markdown_url variable to point to your markdown file. It's that easy!

huh's People

Contributors

burlesonbrad avatar cfinke avatar danhauk avatar nickhamze avatar noplanman 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

huh's Issues

IE compatibility

Due to use of ES6 the current script is not working in Internet Explorer. Are you considering adding something like Babel or anything else to make this also work in IE?

Turned it into a plugin, maybe you want to have a look

Hey @danhauk thanks for huh, it's pretty cool as it is. For a project I'm working on, I needed a few additional things:

  • Allow multiple .md sources, works thanks to Daron Spence
  • Turn it into a plugin
  • Allow custom docs per admin page
  • Make it work in the theme customizer
  • Allow docs to be shown on all admin pages, using an array index of all
  • Make the plugin strings translatable
  • Use Babel to transpile the JS
  • Show the admin page you are on when using WP_DEBUG

Things I'll add soon:

  • Support for IE11 and Safari 10 using a Promise polyfill and a Fetch polyfill
  • Maybe add a settings screen to add .md files

Questions for you:

  • In case you would like to use my fork, please go ahead
  • If I would try to submit the plugin to w.org, should I change the name? How should I give props to you guys?

Thanks again for this cool idea, additionally we might want to try and combine it with our User Feedback plugin in the future.

Back link gets cropped

When the content for a particular section is long, the "Back" link gets cut off. See screenshot.

screen shot 2017-01-15 at 8 51 49 pm

Support for plugins?

I am yet to fully explore the source code, but want to quickly ask whether Hub supports plugins as well or is the functionality limited only to themes?

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.