在Azure Web App中使用Docsify时出错

时间:2018-03-02 16:17:43

标签: docsify

我正在尝试在Azure Web App中运行Docsify。我得到的404看起来似乎有一些关于配置网站的东西,或许?

Failed to load resource: the server responded with a status of 404 (Not Found)
index.html/README.md 

有没有人在Azure Web App中使用Docsify成功?

2 个答案:

答案 0 :(得分:0)

我找到了答案。您需要允许IIS提供markdown文件。您可以将以下内容添加到web.config(或者将添加为 web.config,如果您还没有<configuration> <system.webServer> <staticContent> <remove fileExtension=".md" /> <mimeMap fileExtension=".md" mimeType="text/markdown" /> </staticContent> </system.webServer> </configuration> ,则可以这样做:

class SendEmailAsyncTask extends AsyncTask<Void, Void, Boolean> {

String emailid = "email="+user_email+"&hash="+randomcode;
String link = "http://www.google.com"+emailid;
String body = "Please verify your email address by clicking on this link "+link ;

 Mail m = new Mail("abc@gmail.com", "abc@123");

 public SendEmailAsyncTask() {
 if (BuildConfig.DEBUG)
    Log.v(SendEmailAsyncTask.class.getName(), "SendEmailAsyncTask()");
String[] toArr = {user_email};
m.setTo(toArr);
m.setFrom("abc@gmail.com");
m.setSubject(subject);
m.setBody(body);
}

@Override
protected void onPreExecute() {
    super.onPreExecute();


}

@Override
protected Boolean doInBackground(Void... params) {
    if (BuildConfig.DEBUG) Log.v(SendEmailAsyncTask.class.getName(), "doInBackground()");

    try {
        m.send();

        Handler handler = new Handler(Looper.getMainLooper());

        handler.postDelayed(new Runnable() {

            @Override
            public void run() {
                Toast.makeText(SignupActivity.this, "Email Sent", Toast.LENGTH_SHORT).show();

            }
        }, 1000 );



        return true;


    } catch (AuthenticationFailedException e) {
        Log.e(SendEmailAsyncTask.class.getName(), "Bad account details");

        Handler handler = new Handler(Looper.getMainLooper());

        handler.postDelayed(new Runnable() {

            @Override
            public void run() {
                Toast.makeText(SignupActivity.this, "Incorrect account details", Toast.LENGTH_SHORT).show();

            }
        }, 1000 );


        e.printStackTrace();

        statusDialog.setMessage("Account Details are not correct");
        return false;
    } catch (MessagingException e) {

        Handler handler = new Handler(Looper.getMainLooper());

        handler.postDelayed(new Runnable() {

            @Override
            public void run() {
                Toast.makeText(SignupActivity.this, "Email sending failed", Toast.LENGTH_SHORT).show();

            }
        }, 1000 );



        e.printStackTrace();

        return false;
    } catch (Exception e) {
        e.printStackTrace();

        return false;
    }
}


@Override
protected void onPostExecute(Boolean aBoolean) {
    super.onPostExecute(aBoolean);

}
}

Doscify GitHub上的问题是here

答案 1 :(得分:0)

我用了这个

window.$docsify = {
      homepage: 'readme.md'
}