GithubHelp home page GithubHelp logo

hexo-cdnify's People

Contributors

dependabot[bot] avatar jianglin-wu avatar zqjimlove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hexo-cdnify's Issues

If I only need the <img> tag to do cdn, how to change

    <img data-src="__default__">
    <img src="//cdn">
    <link rel="apple-touch-icon" href="__default__">
    <link rel="icon" href="_default___">
    <link rel="shortcut icon" href="__default__">
    <link rel="stylesheet" href="__default__">
    <script src="__default__"></script>
    <source src="__default__"></source>

Support for rewriting css files and inline styles

Is it possible to add support for css files, so also fonts and images in css can be loaded from the cdn?

e.g.

@font-face {
  font-family: 'Titillium Web';
  font-style: normal;
  font-weight: 600;
  src: local('Titillium WebSemiBold'), local('TitilliumWeb-SemiBold'), url(fonts/anMUvcNT0H1YN4FII8wpr46gJz9aNFrmnwBdd69aqzY.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
  font-display: swap;
}

Furthermore I also have some inline styles loading images.

<span style="background-image:url(/images/6b7f0cf87fd84937834f07bb6719c0e521445911.png)" alt="Use the ACME DNS-Challenge to get a TLS certificate" class="thumbnail-image"></span>

How to replace to a sub-folder

I want to replace it to cdn.com/blog/ instead of cdn.com
What should I do, I was tried to insert the base as https://cdn.com/blog/ but it doesn't work

Awesome Plugin - Option to replace localhost with cdn

I have added an options.local for example http://127.0.0.1 to allow for rewriting localhost urls to cdn urls like this:

rewriteURL = function(origUrl) {
    if (options.local) {
        if (origUrl.indexOf(options.local) === 0) {
            origUrl = origUrl.replace(options.local,'')
        }
    }
    return isLocalPath(origUrl) ? Url.resolve(base, origUrl) : origUrl;
},

I am posting here in case anyone can find this useful or if you want to add this permanently.

建议增加正则替换

对某个标签的某个字段的数据,通过配置正则表达式和替换内容,进行自动替换。

这样适用性更广也更灵活。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.