Skip to content

Commit

Permalink
refactor: rename docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hotchilipowder committed Oct 25, 2024
1 parent 409e752 commit ecbd98f
Show file tree
Hide file tree
Showing 14 changed files with 100 additions and 57 deletions.
20 changes: 10 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ Welcome to My Dev Config's documentation!
:maxdepth: 2
:caption: Contents:

docs/neovim.rst
docs/git.rst
docs/docker.rst
docs/snippets.rst
docs/sphinx.rst
docs/homelab.rst
docs/cookiecutter.rst
docs/tikz.rst
docs/vps.md
docs/resources.rst
rsts/neovim.rst
rsts/git.rst
rsts/docker.rst
rsts/snippets.rst
rsts/sphinx.rst
rsts/homelab.rst
rsts/cookiecutter.rst
rsts/tikz.rst
mds/vps.md
rsts/resources.rst


Indices and tables
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
71 changes: 24 additions & 47 deletions docs/docs/git.rst → docs/rsts/git.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ Install

.. tabs::

.. tab:: MacOS

MacOS

.. tab:: Linux (Apt)

.. code-block:: bash
Expand All @@ -35,6 +31,11 @@ Install
./configure --prefix=$HOME/.local
make && make install
.. tab:: MacOS

brew install git


Proxy
=====

Expand All @@ -46,24 +47,11 @@ Just set following cmdline:
git config --global https.proxy http://xxx
Common git skill
================

关于git学习的资料,可以查看 \ `git教程 <https://www.liaoxuefeng.com/wiki/896043488029600>`_\

Set git proxy
-------------


.. code-block:: bash
git config --global http.proxy xxx
git config --global https.proxy xxx


Change history user.name and user.email
Expand Down Expand Up @@ -119,26 +107,13 @@ Lazygit

`Lazygit <https://github.com/jesseduffield/lazygit>`_ is a simple terminal UI for git commands.

MacOS osxkeychain
=================

Mac 上清除 git osxkeychain 保存的登录名密码

.. code-block:: bash
git config --local --unset credential.helper
git config --global --unset credential.helper
git config --system --unset credential.helper

但是还有进一步删除这个文件下的配置, more detail see \ `this link <https://stackoverflow.com/questions/16052602/how-to-disable-osxkeychain-as-credential-helper-in-git-config>`_

.. code-block:: bash

git config --show-origin --get credential.helper


Github Action
============
=============

首先,github action 已经成为了软件开发领域不可获取的部分。

Expand Down Expand Up @@ -167,11 +142,29 @@ My config
* Make snippsts to rst

* push html to github page




My Github Issues
================

MacOS osxkeychain
-----------------

Mac 上清除 git osxkeychain 保存的登录名密码

.. code-block:: bash
git config --local --unset credential.helper
git config --global --unset credential.helper
git config --system --unset credential.helper
但是还有进一步删除这个文件下的配置, more detail see \ `this link <https://stackoverflow.com/questions/16052602/how-to-disable-osxkeychain-as-credential-helper-in-git-config>`_

.. code-block:: bash
git config --show-origin --get credential.helper
How to change default editor into vim
Expand All @@ -185,8 +178,6 @@ How to change default editor into vim
Permission to x denied to github-actions[bot]
---------------------------------------------

Expand Down Expand Up @@ -241,17 +232,3 @@ Github CheatSheet
- Row 2, column 2
- Row 2, column 3

.. tabs::

.. tab:: MacOS

MacOS

.. tab:: Linux

Linux

.. tab:: Windows

Windows

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
66 changes: 66 additions & 0 deletions docs/docs/sphinx.rst → docs/rsts/sphinx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,72 @@ Sphinx with Latex
然后使用 \ :code:`make latexpdf`\


修改为单个页面的pdf
-------------------

关于定制化单个页面,如何实现latex的有效编译,需要查看手册: \ `Latex customization <https://www.sphinx-doc.org/en/master/latex.html>`_

例如:

.. code-block:: python
latex_engine = 'xelatex'
latex_elements = {
'passoptionstopackages': r'''
\PassOptionsToPackage{svgnames}{xcolor}
''',
'pointsize': '12pt',
'fontpkg': r'''
\setmainfont{Georgia}
''',
'maketitle': r'''
\date{Fall 2024}
\maketitle
''',
'tableofcontents': "",
'preamble': r'''
\usepackage{xeCJK}
\usepackage{hyperref}
\usepackage{url}
\raggedbottom % 避免章节之间产生多余的空白页
\setlength{\parskip}{5pt} % 段落之间空格
''',
'sphinxsetup': r'''
TitleColor=DarkGoldenrod
''',
'printindex': r'\footnotesize\raggedright\printindex',
}
latex_show_urls = 'footnote'
latex_documents = [
('project1/index', 'project1.tex', 'Title 1', 'Author 1', 'howto'),
]
latex_additional_files = ["iclr2024_conference.sty"]
特别需要指出的,如果改成了 \ :code:`howto`\ 那么对应的是 article类。
如果是默认的会是 \ :code:`Manual`\。



多个配置文件对于不同的页面
--------------------------


例如,我们的某个教学项目,包括教程、练习题和代码手册等。
但是上述的单个页面的 \ :code:`conf.py`\ 比较难满足这种需求,因为tex的预加载可能存在差异。
这个时候最好的方式便是分不同的 \ :code:`conf.py`\ , 然后进行处理。

例如,我们可以创建一个 \ :code:`confs/projects/conf.py`\

然后使用 \ :code:`make latexpdf`\ 的时候指定配置文件

.. code-block:: bash
make latexpdf SPHINXOPTS="-c ./confs/projects"
Expand Down
File renamed without changes.

0 comments on commit ecbd98f

Please sign in to comment.