美文网首页
新版gitlab页面底部添加ICP备案号

新版gitlab页面底部添加ICP备案号

作者: i娟儿 | 来源:发表于2022-05-17 11:29 被阅读0次

    目前国内的服务器均要求在底部增加备案号,
    由于gitlab是用ruby语言编写的可能很多人看不懂复杂的目录结构,其实gitlab也属于mvc结构的项目,如果您不懂ruby或者gitlab的项目结构,可以直接按以下步骤修改公共view视图的footer文件并重启服务(只针对新版的gitlab目录结构,旧版的请搜索devise_empty.html.haml文件):

    第一步:添加备案号:

    修改的文件名:_footer.html.haml
    文件默认路径:/opt/gitlab/embedded/service/gitlab-rails/app/views/devise/shared

    将下面的这一串

    %hr.footer-fixed
    .container.footer-container
      .footer-links
        - unless public_visibility_restricted?
          = link_to _("Explore"), explore_root_path
          = link_to _("Help"), help_path
          = link_to _("About GitLab"), "https://about.gitlab.com/"
        = footer_message
    

    修改为:

    %hr.footer-fixed
    .container.footer-container
      .footer-links
        - unless public_visibility_restricted?
          = link_to _("Explore"), explore_root_path
          = link_to _("Help"), help_path
        = link_to _("京ICP备20012475号(主体备案号)"), "http://beian.miit.gov.cn/"
    = footer_message
    

    第二步:重启gitlab服务,等待1-2分钟再查看即可生效

    着陆云gitlab仓库

    相关文章

      网友评论

          本文标题:新版gitlab页面底部添加ICP备案号

          本文链接:https://www.haomeiwen.com/subject/zetnurtx.html