You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
2.0 KiB

<script type="text/javascript">
(function () {
RED.nodes.registerType('micropub-create', {
category: 'output',
color: '#a6bbcf',
defaults: {
name: {value: ""},
endpoint: {value: "", type: "indieauth"}
},
inputs: 1,
outputs: 1,
icon: "bridge.png",
label: function () {
return this.name || "micropub";
}
})
})();
</script>
<script type="text/x-red" data-template-name="micropub-create">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-endpoint"><i class="icon-tag"></i> Endpoint</label>
<input type="text" id="node-input-endpoint" placeholder="Endpoint">
</div>
</script>
<script type="text/x-red" data-help-name="micropub-create">
<p>Posts to Micropub endpoints</p>
<p>Connect to your Micropub powered blog and post messages.</p>
<p>Input Parameters:</p>
<p><code>msg.payload</code> - Should be an Micropub object using MF2, it will be sent without modification to the endpoint. If the payload is a string, it will be sent as a content value.</p>
<p><code>msg.payload.type</code> - Should be an array with the type.</p>
<p><code>msg.payload.properties</code> - Should be on object with MF2 properties.</p>
<p><code>msg.payload.properties.name</code> - Should be an array with a string.</p>
<p><code>msg.payload.properties.content.html</code> - Should be a string.</p>
<p><code>msg.payload.properties.content.value</code> - Should be a string.</p>
<p>Output Values:</p>
<p>This message will be passed on unchanged, but the <code>location</code> of the post will be added.</p>
<p><code>msg.location</code> - When succesful this will contain the location of this post.</p>
</script>