Non Numeric features in Logistic Regression

I understand that the fitted values for Logistic Regression can be expressed as:

$$P(Y_i=1) = \left(1+\exp(-\hat{\theta}^TX_i)\right)^{-1}$$

where $X_i$ is the feature vector, which will work well when the features take only numeric values.

However, when the features are non-numerical, can we use the same approach as given here for a Linear Regression model? Or is there a better way which we can use for Logistic Regression?