Update projects/mkdocs-love.md
This commit is contained in:
@@ -1,3 +1,189 @@
|
||||
Let's refine the steps to ensure everything is clear and precise for setting up, building, and deploying your MkDocs project.
|
||||
|
||||
### 1. Clean Up the Existing Repository Conflict
|
||||
|
||||
1. **Remove the Local Git Initialization**:
|
||||
```sh
|
||||
cd /Users/medusa/repos/scratch/loves-lament-planckian-abyss
|
||||
rm -rf .git
|
||||
```
|
||||
|
||||
2. **Create a New Directory and Clone the Repository**:
|
||||
```sh
|
||||
cd ..
|
||||
mkdir mkdocs-clone
|
||||
cd mkdocs-clone
|
||||
git clone git@github.com:crazystorm720/mkdocs.git
|
||||
```
|
||||
|
||||
3. **Move Files to the New Directory**:
|
||||
```sh
|
||||
cp -r ../loves-lament-planckian-abyss/* mkdocs/
|
||||
```
|
||||
|
||||
4. **Navigate to the Cloned Repository**:
|
||||
```sh
|
||||
cd mkdocs
|
||||
```
|
||||
|
||||
5. **Add and Commit the Moved Files**:
|
||||
```sh
|
||||
git add .
|
||||
git commit -m "Initial commit with moved files"
|
||||
git push origin main
|
||||
```
|
||||
|
||||
### 2. Set Up the MkDocs Project
|
||||
|
||||
1. **Create the Conda Environment**:
|
||||
```sh
|
||||
conda env create -f environment.yml
|
||||
```
|
||||
|
||||
2. **Activate the Environment**:
|
||||
```sh
|
||||
conda activate mkdocs-env
|
||||
```
|
||||
|
||||
3. **Install Additional Python Packages**:
|
||||
```sh
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 3. Build and Serve the MkDocs Site
|
||||
|
||||
1. **Build the MkDocs Site**:
|
||||
```sh
|
||||
mkdocs build
|
||||
```
|
||||
|
||||
2. **Serve the MkDocs Site**:
|
||||
```sh
|
||||
mkdocs serve --dev-addr 192.168.2.219:8000
|
||||
```
|
||||
|
||||
### 4. Deploy the MkDocs Site
|
||||
|
||||
1. **Deploy to GitHub Pages**:
|
||||
```sh
|
||||
mkdocs gh-deploy
|
||||
```
|
||||
|
||||
### 5. Deactivate and Clean Up
|
||||
|
||||
1. **Deactivate the Conda Environment**:
|
||||
```sh
|
||||
conda deactivate
|
||||
```
|
||||
|
||||
2. **Optionally Remove the Environment**:
|
||||
```sh
|
||||
conda env remove -n mkdocs-env
|
||||
```
|
||||
|
||||
### Combined Steps
|
||||
|
||||
Here are all the steps combined for a streamlined workflow:
|
||||
|
||||
```sh
|
||||
# Clean up existing repository conflict
|
||||
cd /Users/medusa/repos/scratch/loves-lament-planckian-abyss
|
||||
rm -rf .git
|
||||
|
||||
cd ..
|
||||
mkdir mkdocs-clone
|
||||
cd mkdocs-clone
|
||||
git clone git@github.com:crazystorm720/mkdocs.git
|
||||
|
||||
cp -r ../loves-lament-planckian-abyss/* mkdocs/
|
||||
cd mkdocs
|
||||
|
||||
git add .
|
||||
git commit -m "Initial commit with moved files"
|
||||
git push origin main
|
||||
|
||||
# Set up the MkDocs project
|
||||
conda env create -f environment.yml
|
||||
conda activate mkdocs-env
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Build and serve the MkDocs site
|
||||
mkdocs build
|
||||
mkdocs serve --dev-addr 192.168.2.219:8000
|
||||
|
||||
# Deploy the MkDocs site
|
||||
mkdocs gh-deploy
|
||||
|
||||
# Deactivate and clean up
|
||||
conda deactivate
|
||||
conda env remove -n mkdocs-env
|
||||
```
|
||||
|
||||
### Updated Project Files
|
||||
|
||||
#### `environment.yml`
|
||||
|
||||
```yaml
|
||||
name: mkdocs-env
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python=3.11
|
||||
- pip
|
||||
- mkdocs
|
||||
- mkdocs-material
|
||||
- pandoc
|
||||
- texlive-core
|
||||
- pygments
|
||||
- ghp-import
|
||||
- pyyaml
|
||||
- requests
|
||||
- pip:
|
||||
- mkdocs-include-markdown-plugin
|
||||
```
|
||||
|
||||
#### `requirements.txt`
|
||||
|
||||
```txt
|
||||
mkdocs-include-markdown-plugin
|
||||
```
|
||||
|
||||
#### `mkdocs.yml`
|
||||
|
||||
```yaml
|
||||
site_name: Love's Lament: A Transcendent Exploration of the Planckian Abyss
|
||||
theme:
|
||||
name: material
|
||||
nav:
|
||||
- Home: index.md
|
||||
- Introduction: intro.md
|
||||
- The Elusive Eon: planck_time.md
|
||||
- The Unendurable Anguish: yearning_factor.md
|
||||
- Conclusion: conclusion.md
|
||||
plugins:
|
||||
- search
|
||||
- git-revision-date-localized
|
||||
- macros
|
||||
markdown_extensions:
|
||||
- pymdownx.superfences
|
||||
- pymdownx.arithmatex
|
||||
- pymdownx.highlight
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.snippets
|
||||
- pymdownx.tabbed
|
||||
- pymdownx.tasklist
|
||||
- pymdownx.tilde
|
||||
extra_javascript:
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.js
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/contrib/auto-render.min.js
|
||||
extra_css:
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css
|
||||
```
|
||||
|
||||
These steps and configurations should provide a comprehensive guide to setting up, building, and deploying your MkDocs project while resolving any conflicts and ensuring a smooth workflow.
|
||||
|
||||
---
|
||||
|
||||
You have a conflict because you initialized a Git repository locally and then tried to clone another repository into the same directory. This can cause confusion for Git and lead to errors like the ones you’re seeing. Here’s how to clean up the situation:
|
||||
|
||||
1. **Remove the Local Git Initialization**:
|
||||
|
||||
Reference in New Issue
Block a user