mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-06 07:22:07 +08:00
Some checks failed
Docker CI / Linting Checks (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Repository Maintenance / Stale (push) Has been cancelled
Repository Maintenance / Lock Old Threads (push) Has been cancelled
Repository Maintenance / Close Answered Discussions (push) Has been cancelled
Repository Maintenance / Close Outdated Discussions (push) Has been cancelled
Repository Maintenance / Close Unsupported Feature Requests (push) Has been cancelled
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
20 lines
443 B
JavaScript
20 lines
443 B
JavaScript
import { getSettings } from "utils/config/config";
|
|
|
|
export async function getServerSideProps({ res }) {
|
|
const settings = getSettings();
|
|
const content = ["User-agent: *", !!settings.disableIndexing ? "Disallow: /" : "Allow: /"].join("\n");
|
|
|
|
res.setHeader("Content-Type", "text/plain");
|
|
res.write(content);
|
|
res.end();
|
|
|
|
return {
|
|
props: {},
|
|
};
|
|
}
|
|
|
|
export default function RobotsTxt() {
|
|
// placeholder component
|
|
return null;
|
|
}
|