![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
choo-dat-hypha
Advanced tools
A Choo plugin for reading a content directory with Hypha
npm i choo-dat-hypha
Create a new Choo app and use the choo-dat-hypha
plugin.
var choo = require('choo')
var app = choo()
app.use(require('choo-dat-hypha')())
if (!module.parent) app.mount('body')
else module.exports = app
Format some plain text files using smarkt fields.
title: Technopastoral
----
date: January 19, 2038
----
tags:
- garden
- engineering
----
text: To deprogram oneself necessitates keeping to very specific schedules, which are what Foucault, once again, described as techniques of the self, echoing Seneca.
Organize them within a directory structure alongside media assets.
/content
/about
index.txt
/blog
/38-01-19-technopastoral
index.txt
header.jpg
index.txt
Now your content gets loaded into your Choo app’s state, and a route is created for each of your pages!
To easily access the data for each of your pages simply compare the state.href
against your state.content
object in a composable function.
// wrapper.js
var xtend = require('xtend')
module.exports = wrapper
function wrapper (view) {
return function (state, emit) {
var page = state.content[state.href || '/'] || { }
return view(xtend(state, { page: page }), emit)
}
}
Now simply wrap your views!
// view.js
var html = require('choo/html')
var wrapper = require('./wrapper')
module.exports = wrapper(view)
function view (state, emit) {
return html`
<body>
The current page is ${state.page.title}
</body>
`
}
State is extended with these objects:
state.content = { }
state.site = {
blueprints: { },
config: { },
info: { },
loaded: false,
p2p: false
}
Emitting this event will reload state.content
.
Listen to this event for when content is loaded.
FAQs
A Choo plugin for reading a content directory with Hypha
The npm package choo-dat-hypha receives a total of 0 weekly downloads. As such, choo-dat-hypha popularity was classified as not popular.
We found that choo-dat-hypha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.