This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const zlib = require("zlib"); | |
var dirs = ["../public/sitemap"]; | |
dirs.forEach((dir) => { | |
fs.readdirSync(dir).forEach((file) => { | |
if (file.endsWith(".xml")) { | |
// gzip | |
const fileContents = fs.createReadStream(dir + "/" + file); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<sitemap> | |
<loc>https://website.com/sitemap/sitemap-common.xml.gz</loc> | |
<lastmod>2020-04-03T08:19:46.858Z</lastmod> | |
</sitemap> | |
<sitemap> | |
<loc>https://website.com/sitemap/sitemap-posts.xml.gz</loc> | |
<lastmod>2020-04-03T08:19:46.858Z</lastmod> | |
</sitemap> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const globby = require("globby"); | |
const prettier = require("prettier"); | |
const getDate = new Date().toISOString(); | |
const webrootDomain = "https://website.com"; | |
const formatted = sitemap => prettier.format(sitemap, { parser: "html" }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset | |
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" | |
> | |
<url> | |
<loc>https://website.com/post/1</loc> | |
<lastmod>2020-04-03T16:03:19.388Z</lastmod> | |
</url> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset | |
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" | |
> | |
<url> | |
<loc>https://website.com/</loc> | |
<lastmod>2020-04-03T08:19:25.691Z</lastmod> | |
</url> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const fetch = require("node-fetch"); | |
const prettier = require("prettier"); | |
const getDate = new Date().toISOString(); | |
const fetchUrl = "https://jsonplaceholder.typicode.com/posts"; | |
const YOUR_AWESOME_DOMAIN = "https://website.com"; | |
const formatted = sitemap => prettier.format(sitemap, { parser: "html" }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const globby = require("globby"); | |
const prettier = require("prettier"); | |
const getDate = new Date().toISOString(); | |
const YOUR_AWESOME_DOMAIN = "https://website.com"; | |
const formatted = sitemap => prettier.format(sitemap, { parser: "html" }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
/* | |
play with some lines below | |
*/ | |
[ripple] .ripple--container span { | |
-webkit-transform: scale(0); | |
transform: scale(0); | |
border-radius: 100%; | |
position: absolute; | |
opacity: 0.75 !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<my-component ripple="ripple"></my-component> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.js | |
import Vue from 'vue' | |
import VueRippler from 'vue-rippler' | |
Vue.use(VueRippler) |
NewerOlder