Title: haxtheweb
Author: btopro
Published: <strong>2020 年 5 月 21 日</strong>
Last modified: 2020 年 6 月 1 日

---

搜索插件

![](https://ps.w.org/haxtheweb/assets/banner-772x250.png?rev=2316092)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/haxtheweb/assets/icon-256x256.png?rev=2316092)

# haxtheweb

 作者：[btopro](https://profiles.wordpress.org/btopro/)

[下载](https://downloads.wordpress.org/plugin/haxtheweb.3.9.4.zip)

 * [详情](https://cn.wordpress.org/plugins/haxtheweb/#description)
 * [评价](https://cn.wordpress.org/plugins/haxtheweb/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/haxtheweb/#developers)

 [支持](https://wordpress.org/support/plugin/haxtheweb/)

## 描述

Here is a short description of the plugin. This should be no more than 150 characters.
No markup here.

### haxtheweb

Bringing the HAX block editor to ClassicPress & WordPress. [HAX](https://haxtheweb.org/)
is short for headless authoring experience, meaning that it is a block editor that
is disconnected from the CMS its used in. HAX recognizes editable blocks by using
the [web component standard](https://www.webcomponents.org/). HAX provides editing
capabilities in a way that attempts to write clean HTML markup the same way an expert
end-user could, but without ever touching code! The code is writen in a way that
experts and developers can jump in and modify as needed given the semantic nature
of webcomponents!

### 3rd party dependencies

While you can host assets locally, the HAX editor defaults to leveraging the Penn
State Web components CDN.
 You can modify this on the Settings -> Writing page. 
Additional details on this service: – Penn State CDN domain https://cdn.webcomponents.
psu.edu/ is served from Amazon CloudFront – You can view assets that are exposed
via CDN here https://webcomponents.psu.edu/ in StorybookJS – Privacy polcies the
university adheres to: https://policy.psu.edu/policies/ad53 – The source of HAX 
and your web components is configurable and you can change it to leverage your own(
details below)

### Dependencies

 * If using WordPress, you’ll need to get the [Classic Editor plugin](https://wordpress.org/plugins/classic-editor/)
    - ClassicPress does not have this dependency
 * Make sure that your Permalink settings are for pretty links or calls to load 
   data via JSON will fail https://stackoverflow.com/questions/44204307/rest-api-
   init-event-not-fired

### Usage

This should give you the dependencies you need to get going.
 1. Download this plugin
and place it in wp-content/plugins/haxtheweb 2. If using WordPress you’ll also need
the Classic Editor plugin; and then you’ll have to enable it as the default editor(
wp-admin/options-writing.php) 3. Enable the Plugins (wp-admin/plugins.php) 4. Make
sure Settings -> Permalinks is set to “Post name” 5. Go to Settings -> Writing and
scroll down to change your settings 6. Go to edit or create a new page / post 7.
Enjoy HAX’ing the web

### Configuration

HAX adds options to the Writing Settings page (wp-admin/options-writing.php) to 
allow for further integrations and customizations though the default settings are
fine to get up and started with.

### Note on usage

The default is to serve the Javascript required for HAX and its web components from
a CDN. We default to a Penn State mirror of the required assets so you can get up
and running quickly. We recommend that if you choose to go into production with 
HAX, that you look at doing a build routine locally (outlined below) or leveraging
one of the faster CDNs available.

### Hooking up additional “apps” in the “Find” area

To connect to popular services like YouTube, Flickr, and Vimeo you’ll need an API
key. You can find details on how to get these keys as well as where to put them 
on the Writing Settings (wp-admin/options-writing.php) page.

### Front end Developers

You may build HAX from source if needed. HAX defaults to use CDNs which will effectively
point to
 this directory or some mutation of it — https://github.com/elmsln/HAXcms/
tree/master/build

If you want to build everything from source, your welcome to use yarn / npm to do
so though our
 build routine effectively will end in the same net result. If you
want to do custom build routines such as rollup or webpack and not use our prebuilt
copies / split build approaches, then your welcome to check the box related to not
loading front end assets in the settings page in order to tailor the build to your
specific needs.

### Getting dependencies

You need polymer cli (not polymer but the CLI library) in order to interface with
web components in your site. Get polymer cli installed prior to usage of this (and(
yarn)[https://yarnpkg.com/lang/en/docs/install/#mac-stable] / an npm client of some
kind)
 `bash $ yarn global add polymer-cli Perform this on your computer locally,
this doesn’t have to be installed on your server.

### Usage

 * Find `CopyThisStuff` directory in `/wp-content/plugins/haxtheweb`.
 * create a `/wp-content/haxtheweb` directory
 * copy the files from `CopyThisStuff` into `/wp-content/haxtheweb`

Then run the following (from the directory you copied it over to) in order to get
dependencies:
 `bash $ yarn install Now run polymer build and you’ll have files 
in build/ which contain everything you’ll need to get wired up to web components
in your site. Modifying build.js or package.json can be used in order to get new
elements and have them be implemented.

### Shouldn’t I put web components in my theme?

We don’t think so. While it may seem counter intuitive, the theme layer should be
effectively implementing what the site is saying is available. If you think of standard
HTML tags are being part of this (p, div, a, etc) then it makes a bit more sense.
You don’t want functional HTML components to ONLY be supplied if your theme is there,
you want your theme to implement and leverage the components.

### New to web components?

We built our own tooling to take the guess work out of creating, publishing and 
testing web components for HAX and other projects. We highly recommend you use this
tooling though it’s not required:
 – https://open-wc.org – great, simple tooling
and open community resource – https://github.com/elmsln/wcfactory – Build your own
web component library – https://github.com/elmsln/lrnwebcomponents – Our invoking
of this tooling to see what a filled out repo looks like

## 屏幕截图

 * [[
 * Showcasing the editor highlighting a video that’s been uploaded via HAX.

## 常见问题

### Developer functions

By default, the auto-loaded elements (things you make with HAX and hit save) need
to have the website taught how to render. This means that their web component JS
files will be added to the site in order for them to render for users. This list
can be modified on the Writing Settings page wp-admin/options-writing.php.

## 评价

此插件暂无评价。

## 贡献者及开发者

「haxtheweb」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ btopro ](https://profiles.wordpress.org/btopro/)

[帮助将「haxtheweb」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/haxtheweb)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/haxtheweb/)，查看[SVN仓库](https://plugins.svn.wordpress.org/haxtheweb/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/haxtheweb/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/haxtheweb/)。

## 更新日志

3.9.3 – notice fix on some pages
 3.9.2 – Media integration and attachments! 3.9.1–
Search Media directly from HAX editor!

## 额外信息

 *  版本 **3.9.4**
 *  最后更新：**6 年前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 4.9 或更高版本 **
 *  已测试的最高版本为 **5.4.19**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/haxtheweb/)
 * 标签
 * [classic editor](https://cn.wordpress.org/plugins/tags/classic-editor/)[disable gutenberg](https://cn.wordpress.org/plugins/tags/disable-gutenberg/)
   [editor](https://cn.wordpress.org/plugins/tags/editor/)
 *  [高级视图](https://cn.wordpress.org/plugins/haxtheweb/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/haxtheweb/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/haxtheweb/reviews/)

## 贡献者

 *   [ btopro ](https://profiles.wordpress.org/btopro/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/haxtheweb/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://haxtheweb.org/)