zoukankan      html  css  js  c++  java
  • 开始使用MarkDown来写博客

    开始使用MarkDown来写博客

    源起

    自带的工具非常的不好用,于是一直用的是Word,但是Word确实太难看了点,在加上MardDown确实是很流行,在Github上很多文档都是用这个写的。

    工具的选择

    MarddownPad 2蛮好用的,但是需要付费。大概16USD
    Sublime text 2 非常好用,速度也快
    还有很多工具各有优点也缺点,但是我最关心的是2点。插入代码问题和图片插入的问题。

    插入代码比如这个样子

    public void onArticleSelected(int position) {
        FragmentManager fm = getActivity().getSupportFragmentManager();
        //ProgressbarFragment articleFrag = (ProgressbarFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.squareProgressBar1);
        ProgressbarFragment articleFrag = (ProgressbarFragment)fm.findFragmentByTag("progress");
        if (articleFrag != null) {
            // If article frag is available, we're in two-pane layout...
    
            // Call a method in the ArticleFragment to update its content
            articleFrag.updateArticleView(position);
        } else {
            // Otherwise, we're in the one-pane layout and must swap frags...
    
            // Create fragment and give it an argument for the selected article
            ProgressbarFragment newFragment = new ProgressbarFragment();
            Bundle args = new Bundle();
            args.putInt(ProgressbarFragment.ARG_POSITION, position);
            newFragment.setArguments(args);
    
            FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
    
            // Replace whatever is in the fragment_container view with this fragment,
            // and add the transaction to the back stack so the user can navigate back
            transaction.replace(R.id.fragmentContainer, newFragment);
            //transaction.addToBackStack(null);
    
            // Commit the transaction
            transaction.commit();
        }
    }
    

    插入图片

    在cnblogs里插入图片,我目前只是根据博客里面给出的公告点击上面的图片按钮,然后在将点击按钮上传图片或者将图片拖到上传图片的按钮上。上传完后,会在录入框里自动加入图片的Markdown代码。上面的图片就是自动生成的代码。

    小结

    上面的文章我使用了代码插入功能和图片插入功能。然后还有一些基本的语法。

    资料推荐

    我这里推荐一个不错的语法Markdown 语法说明 (简体中文版)

    工具

    • MarkdownPad 一个收费的Windows下的Markdown编辑工具。
    • Sublime Text 2 一个说是收费但是还是可以随便用的工具,非常快速,强大,插件齐全,值得后期研究。
  • 相关阅读:
    git各种操作:基本操作 and 多人协作 and 冲突解决
    mini-ndn0.5.0 安装教程 (避免踩坑)
    ubuntu18.04 更换镜像源
    自定义日志轮转
    linux常用命令
    Thinkphp6 + uniapp框架,接口访问跨域问题
    机器学习-主成分分析PCA与奇异值分解SVD
    机器学习-数据预处理&特征工程
    机器学习-梯度提升树(xgboost)
    github打不开怎么办
  • 原文地址:https://www.cnblogs.com/canglin/p/4444138.html
Copyright © 2011-2022 走看看