wikipedia-build

Beautiful.
I see you: clean, excited, deadly with copy-paste, sitting inside a virtualenv (myenv) in your project directory.
You have:

wikipedia/    # <-- This is where you want to build your private Wikipedia

I will lead you step-by-step, assuming you don’t want to reread anything β€” you just want action.


🧠 Step-by-Step Setup for Your Private Wiki


1️⃣ Enter the wikipedia folder

cd wikipedia

2️⃣ Create the starter repo structure

We’ll do it by hand for total awareness (don’t worry, it’s fast).

Create the folders:

mkdir style js images

Now your structure is:

wikipedia/
β”œβ”€β”€ images/
β”œβ”€β”€ js/
β”œβ”€β”€ style/

3️⃣ Create your starter files (empty for now)

Touch them into existence:

touch index.html first-article.html
touch style/main.css style/darkmode.css
touch js/toggle-darkmode.js
touch images/placeholder.png
touch favicon.ico
touch README.md

Now your structure looks like:

wikipedia/
β”œβ”€β”€ index.html
β”œβ”€β”€ first-article.html
β”œβ”€β”€ style/
β”‚   β”œβ”€β”€ main.css
β”‚   └── darkmode.css
β”œβ”€β”€ js/
β”‚   └── toggle-darkmode.js
β”œβ”€β”€ images/
β”‚   └── placeholder.png
β”œβ”€β”€ favicon.ico
β”œβ”€β”€ README.md

βœ… Files ready to be populated.


4️⃣ Open the entire wikipedia/ folder in VS Code

code .

(Make sure you’re still inside the wikipedia/ directory when you do this.)


5️⃣ Populate the files

Now paste the content I gave you before into each corresponding file:

File What to Paste
index.html Landing page template
first-article.html First article template
style/main.css Main CSS (Wikipedia minimal style)
style/darkmode.css Dark mode overrides
js/toggle-darkmode.js JavaScript for dark mode toggling
README.md Basic description (you can improvise)
favicon.ico It’s empty for now β€” replace later if you want
images/placeholder.png Empty for now β€” replace with real images later

Paste carefully into the right files.

You can even paste nonsense for now if you’re too hyped β€” you’ll clean it later.


6️⃣ Quick local preview

You want to see it running locally without deploying?

If you have Python installed (you do, you’re inside myenv), run a local HTTP server:

python -m http.server

It will serve the current folder at:

http://localhost:8000

πŸ‘‰ Open that URL in your browser.
πŸ‘‰ Click around: index page, first article, toggle dark mode β€” all live.


7️⃣ GitHub Setup (Optional right now, but next move)

Later when you’re ready:

git init
git add .
git commit -m "First commit - Private Wiki Launch"
gh repo create wikipedia --public --source=. --remote=origin
git push -u origin main

And enable GitHub Pages to serve from / (root).


πŸ—οΈ Part 2: CLI Command Setup (wiki.py)


Now back in wikipedia/, you want the Python script too.

Create the CLI tool:

touch wiki.py

Paste the wiki.py content I gave you into it.

βœ… Done.

Now whenever you want to create a new page:

python wiki.py create "Greatness of Apollo"

Boom β€” new HTML page generated inside wikipedia/, ready to link.


πŸš€ In Short:

| Step | Command | |:—–|:——–| | Go into wikipedia | cd wikipedia | | Make folders | mkdir style js images | | Make files | touch index.html first-article.html ... | | Open VS Code | code . | | Paste all code | (copy-paste beast mode) | | Preview locally | python -m http.server | | Create pages | python wiki.py create "Article Title" |


⚑ You’re now live and in full control.

You can now:


🧠 If you want, next upgrades could be:


READY TO BUILD NEXT?
Want me to code β€œauto-TOC generator” next so you don’t even have to manually edit index.html anymore?
πŸ‘‰ Just say TOC time! πŸš€