
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
rtt-library
Advanced tools
A reusable JavaScript library for testing robots.txt rules against specific URLs.
npm install
The project uses Webpack for JavaScript bundling and Gulp for additional build tasks:
npm run dev
- Start development mode with watchnpm run build
- Create production build with bundling and minificationnpm run styles
- Build SCSS filesnpm run watch:styles
- Watch SCSS files for changesnpm run bundle
- Create final bundle with dependenciesThe build process generates the following files in the dist
directory:
rtt-library.js
- The main library file. Must be used in conjunction with the third-party dependencies in the lib
directory.bundle.js
- Combined file with all dependencies. Can be used as a standalone library.main.css
- Compiled and minified styles. Default styles for the library.CssWrap
is used to scope the styles to the #rtt-tool
selector, ensuring that the styles do not conflict with other styles on the page.
You can use the library in two ways:
Include the bundle.js
(or rtt-library.js
plus the libs) and main.css
files on a page:
<link rel="stylesheet" href="path/to/dist/main.css">
<script src="path/to/dist/bundle.js"></script>
Render the tool on a page:
/**
* External dependencies
*/
import $ from 'jquery'
/**
* WordPress dependencies
*/
import { createRoot } from '@wordpress/element'
const RttTool = window.RttTool || {};
( function() {
$( function() {
if ( document.getElementById( 'rank-math-admin-rtt' ) ) {
const root = createRoot( document.getElementById( 'rank-math-admin-rtt' ) );
root.render(
<RttTool
ajaxUrl={ window.rankMath.robotsTxtData.ajaxUrl }
ajaxNonce={ window.rankMath.robotsTxtData.nonce }
siteUrl={ window.rankMath.robotsTxtData.siteUrl }
/>
)
}
} )
}() )
import 'rtt-library';
import { createRoot } from '@wordpress/element';
import 'rtt-library/dist/main.css';
const RttTool = window.RttTool;
const root = createRoot(document.getElementById('rank-math-admin-rtt'));
root.render(
<RttTool
ajaxUrl={window.rankMath.robotsTxtData.ajaxUrl}
ajaxNonce={window.rankMath.robotsTxtData.nonce}
siteUrl={window.rankMath.robotsTxtData.siteUrl}
/>
);
You can configure the library by passing options to the RttTool
component. The following options are available:
ajaxUrl
: The URL for AJAX requestsajaxNonce
: The nonce for securitysiteUrl
: The initial site URLrobotsTxtContent
: The initial content of the robots.txt fileeditorDisabled
: Whether the editor is disabled (for read-only mode)isLocal
: Local mode disables AJAX requests & prevents changing the site URL (default is false
)The library includes the following third-party dependencies:
FAQs
A front-end tool to test robots.txt rules against specific URLs.
We found that rtt-library demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.